variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v1 | Schema:
branches (alias: agov)(status, amount, id, date)
items(code, name, id, value)
Task: Find amount from branches where status appears in items entries with matching code.
SQL: | SELECT amount FROM branches AS agov
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_07300 | train |
v2 | Schema:
shipments (alias: vnob)(amount, date, level, name)
sales(level, id, code, amount)
Task: Retrieve id from shipments that have at least one corresponding entry in sales sharing the same level.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_07301 | train |
v2 | Schema:
staff (alias: xnob)(name, code, date, value)
products(id, salary, date, code)
Task: Find name from staff where a matching record exists in products with the same status.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "products",
"outer_alias": "xnob",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_07302 | train |
v3 | Schema:
requests (alias: ejof)(status, salary, level, value)
tasks(id, value, salary, status)
Task: Find value from requests where amount exceeds the count of salary from tasks for the same id.
SQL: | SELECT value FROM requests AS ejof
WHERE amount > (
SELECT COUNT(salary) FROM tasks AS znob
WHERE znob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_07303 | train |
v2 | Schema:
requests (alias: ejof)(date, id, level, name)
categories(id, value, amount, code)
Task: Find name from requests where a matching record exists in categories with the same type.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_07304 | train |
v1 | Schema:
regions (alias: okiv)(level, value, name, status)
shipments(salary, id, level, amount)
Task: Retrieve value from regions whose type is found in shipments rows where type matches the outer record.
SQL: | SELECT value FROM regions AS okiv
WHERE type IN (
SELECT type FROM shipments AS vnob
WHERE vnob.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "shipments",
"outer_alias": "okiv",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_07305 | train |
v3 | Schema:
accounts (alias: jac)(type, amount, id, name)
items(type, date, status, code)
Task: Find name from accounts where value exceeds the maximum salary from items for the same level.
SQL: | SELECT name FROM accounts AS jac
WHERE value > (
SELECT MAX(salary) FROM items AS ikob
WHERE ikob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07306 | train |
v3 | Schema:
shipments (alias: vnob)(amount, id, level, status)
staff(status, id, value, level)
Task: Find id from shipments where amount exceeds the maximum salary from staff for the same level.
SQL: | SELECT id FROM shipments AS vnob
WHERE amount > (
SELECT MAX(salary) FROM staff AS xnob
WHERE xnob.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "vnob",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_07307 | train |
v1 | Schema:
products (alias: nad)(value, code, amount, id)
schedules(salary, level, id, name)
Task: Select code from products where level exists in schedules for the same type.
SQL: | SELECT code FROM products AS nad
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.type = nad.type
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "nad",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07308 | train |
v3 | Schema:
projects (alias: uliv)(id, date, value, code)
requests(name, id, type, level)
Task: Retrieve amount from projects with amount above the AVG(value) of requests rows sharing the same level.
SQL: | SELECT amount FROM projects AS uliv
WHERE amount > (
SELECT AVG(value) FROM requests AS ejof
WHERE ejof.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "requests",
"outer_alias": "uliv",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_07309 | train |
v1 | Schema:
projects (alias: uliv)(date, status, amount, salary)
items(date, status, id, type)
Task: Find amount from projects where code appears in items entries with matching id.
SQL: | SELECT amount FROM projects AS uliv
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_07310 | train |
v2 | Schema:
managers (alias: hac)(type, status, salary, amount)
schedules(salary, type, amount, code)
Task: Find id from managers where a matching record exists in schedules with the same id.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "schedules",
"outer_alias": "hac",
"inner_alias": "vmob",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07311 | train |
v2 | Schema:
orders (alias: kab)(value, name, status, level)
categories(status, value, name, salary)
Task: Find code from orders where a matching record exists in categories with the same level.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07312 | train |
v3 | Schema:
requests (alias: ejof)(status, salary, code, date)
accounts(name, status, date, value)
Task: Retrieve id from requests with amount above the SUM(salary) of accounts rows sharing the same code.
SQL: | SELECT id FROM requests AS ejof
WHERE amount > (
SELECT SUM(salary) FROM accounts AS jac
WHERE jac.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_07313 | train |
v3 | Schema:
schedules (alias: vmob)(id, salary, type, level)
invoices(code, name, amount, date)
Task: Retrieve code from schedules with value above the SUM(amount) of invoices rows sharing the same id.
SQL: | SELECT code FROM schedules AS vmob
WHERE value > (
SELECT SUM(amount) FROM invoices AS fal
WHERE fal.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "invoices",
"outer_alias": "vmob",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_07314 | train |
v3 | Schema:
categories (alias: egiv)(salary, status, type, id)
items(name, id, value, status)
Task: Find value from categories where value exceeds the count of salary from items for the same type.
SQL: | SELECT value FROM categories AS egiv
WHERE value > (
SELECT COUNT(salary) FROM items AS ikob
WHERE ikob.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "items",
"outer_alias": "egiv",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_07315 | train |
v3 | Schema:
managers (alias: hac)(name, amount, status, value)
tasks(status, value, date, amount)
Task: Find id from managers where salary exceeds the minimum salary from tasks for the same status.
SQL: | SELECT id FROM managers AS hac
WHERE salary > (
SELECT MIN(salary) FROM tasks AS znob
WHERE znob.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07316 | train |
v2 | Schema:
categories (alias: egiv)(level, id, value, name)
branches(value, salary, date, type)
Task: Find value from categories where a matching record exists in branches with the same type.
SQL: | SELECT value FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_07317 | train |
v3 | Schema:
projects (alias: uliv)(salary, type, level, status)
sales(status, date, name, value)
Task: Retrieve value from projects with salary above the MAX(salary) of sales rows sharing the same code.
SQL: | SELECT value FROM projects AS uliv
WHERE salary > (
SELECT MAX(salary) FROM sales AS cif
WHERE cif.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_07318 | train |
v1 | Schema:
projects (alias: uliv)(status, value, id, level)
orders(code, amount, id, type)
Task: Retrieve id from projects whose code is found in orders rows where type matches the outer record.
SQL: | SELECT id FROM projects AS uliv
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "orders",
"outer_alias": "uliv",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_07319 | train |
v3 | Schema:
staff (alias: xnob)(code, date, type, level)
branches(code, amount, name, value)
Task: Retrieve code from staff with salary above the COUNT(amount) of branches rows sharing the same status.
SQL: | SELECT code FROM staff AS xnob
WHERE salary > (
SELECT COUNT(amount) FROM branches AS agov
WHERE agov.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "branches",
"outer_alias": "xnob",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_07320 | train |
v1 | Schema:
shipments (alias: vnob)(salary, type, amount, level)
accounts(name, amount, status, level)
Task: Retrieve name from shipments whose code is found in accounts rows where id matches the outer record.
SQL: | SELECT name FROM shipments AS vnob
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_07321 | train |
v3 | Schema:
branches (alias: agov)(value, name, id, salary)
transactions(name, date, code, level)
Task: Retrieve id from branches with amount above the SUM(salary) of transactions rows sharing the same id.
SQL: | SELECT id FROM branches AS agov
WHERE amount > (
SELECT SUM(salary) FROM transactions AS gev
WHERE gev.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_07322 | train |
v2 | Schema:
orders (alias: kab)(date, id, amount, status)
categories(value, date, id, name)
Task: Retrieve name from orders that have at least one corresponding entry in categories sharing the same code.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07323 | train |
v3 | Schema:
shipments (alias: vnob)(name, date, id, code)
customers(date, name, type, code)
Task: Retrieve code from shipments with amount above the MAX(value) of customers rows sharing the same status.
SQL: | SELECT code FROM shipments AS vnob
WHERE amount > (
SELECT MAX(value) FROM customers AS lex
WHERE lex.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_07324 | train |
v2 | Schema:
transactions (alias: gev)(type, date, name, value)
projects(name, date, type, code)
Task: Find amount from transactions where a matching record exists in projects with the same status.
SQL: | SELECT amount FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07325 | train |
v2 | Schema:
branches (alias: agov)(type, name, id, salary)
employees(status, type, level, code)
Task: Retrieve id from branches that have at least one corresponding entry in employees sharing the same type.
SQL: | SELECT id FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "employees",
"outer_alias": "agov",
"inner_alias": "bev",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_07326 | train |
v1 | Schema:
departments (alias: dov)(id, level, date, code)
employees(level, salary, type, name)
Task: Select name from departments where level exists in employees for the same id.
SQL: | SELECT name FROM departments AS dov
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "employees",
"outer_alias": "dov",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07327 | train |
v2 | Schema:
sales (alias: cif)(date, status, amount, name)
branches(salary, value, date, level)
Task: Find code from sales where a matching record exists in branches with the same status.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07328 | train |
v2 | Schema:
departments (alias: dov)(status, value, name, salary)
categories(salary, type, date, amount)
Task: Find id from departments where a matching record exists in categories with the same status.
SQL: | SELECT id FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07329 | train |
v3 | Schema:
schedules (alias: vmob)(status, date, salary, code)
sales(date, code, id, value)
Task: Retrieve amount from schedules with value above the AVG(amount) of sales rows sharing the same id.
SQL: | SELECT amount FROM schedules AS vmob
WHERE value > (
SELECT AVG(amount) FROM sales AS cif
WHERE cif.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_07330 | train |
v3 | Schema:
sales (alias: cif)(value, salary, name, level)
requests(salary, code, id, level)
Task: Retrieve amount from sales with amount above the SUM(amount) of requests rows sharing the same code.
SQL: | SELECT amount FROM sales AS cif
WHERE amount > (
SELECT SUM(amount) FROM requests AS ejof
WHERE ejof.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07331 | train |
v1 | Schema:
invoices (alias: fal)(type, value, level, salary)
categories(salary, amount, status, date)
Task: Select value from invoices where status exists in categories for the same type.
SQL: | SELECT value FROM invoices AS fal
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07332 | train |
v3 | Schema:
projects (alias: uliv)(code, type, amount, name)
departments(name, date, type, id)
Task: Retrieve id from projects with amount above the SUM(salary) of departments rows sharing the same level.
SQL: | SELECT id FROM projects AS uliv
WHERE amount > (
SELECT SUM(salary) FROM departments AS dov
WHERE dov.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_07333 | train |
v3 | Schema:
products (alias: nad)(salary, value, code, date)
schedules(value, code, level, amount)
Task: Retrieve salary from products with salary above the COUNT(salary) of schedules rows sharing the same status.
SQL: | SELECT salary FROM products AS nad
WHERE salary > (
SELECT COUNT(salary) FROM schedules AS vmob
WHERE vmob.status = nad.status
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "nad",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07334 | train |
v3 | Schema:
accounts (alias: jac)(name, amount, code, level)
products(type, id, salary, name)
Task: Find salary from accounts where salary exceeds the minimum amount from products for the same id.
SQL: | SELECT salary FROM accounts AS jac
WHERE salary > (
SELECT MIN(amount) FROM products AS nad
WHERE nad.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "products",
"outer_alias": "jac",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07335 | train |
v2 | Schema:
managers (alias: hac)(amount, code, level, salary)
invoices(salary, id, value, name)
Task: Retrieve name from managers that have at least one corresponding entry in invoices sharing the same status.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07336 | train |
v2 | Schema:
employees (alias: bev)(id, code, amount, date)
customers(salary, amount, status, value)
Task: Find id from employees where a matching record exists in customers with the same level.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07337 | train |
v3 | Schema:
departments (alias: dov)(amount, code, date, id)
categories(type, level, value, status)
Task: Retrieve id from departments with value above the COUNT(value) of categories rows sharing the same level.
SQL: | SELECT id FROM departments AS dov
WHERE value > (
SELECT COUNT(value) FROM categories AS egiv
WHERE egiv.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07338 | train |
v2 | Schema:
customers (alias: lex)(salary, type, date, amount)
requests(level, value, status, code)
Task: Find name from customers where a matching record exists in requests with the same type.
SQL: | SELECT name FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "lex",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07339 | train |
v2 | Schema:
staff (alias: xnob)(level, salary, id, code)
shipments(salary, name, status, value)
Task: Retrieve code from staff that have at least one corresponding entry in shipments sharing the same status.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "xnob",
"inner_alias": "vnob",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_07340 | train |
v3 | Schema:
requests (alias: ejof)(status, type, id, code)
products(amount, value, code, level)
Task: Retrieve value from requests with amount above the AVG(amount) of products rows sharing the same status.
SQL: | SELECT value FROM requests AS ejof
WHERE amount > (
SELECT AVG(amount) FROM products AS nad
WHERE nad.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ejof",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_07341 | train |
v1 | Schema:
sales (alias: cif)(amount, status, id, code)
customers(date, level, id, amount)
Task: Select value from sales where code exists in customers for the same type.
SQL: | SELECT value FROM sales AS cif
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "cif",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07342 | train |
v2 | Schema:
categories (alias: egiv)(date, status, type, level)
orders(code, level, value, salary)
Task: Find salary from categories where a matching record exists in orders with the same type.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_07343 | train |
v2 | Schema:
categories (alias: egiv)(date, value, type, amount)
managers(value, code, id, level)
Task: Find value from categories where a matching record exists in managers with the same level.
SQL: | SELECT value FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "managers",
"outer_alias": "egiv",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_07344 | train |
v3 | Schema:
transactions (alias: gev)(code, type, name, amount)
managers(amount, value, salary, date)
Task: Find id from transactions where amount exceeds the minimum amount from managers for the same id.
SQL: | SELECT id FROM transactions AS gev
WHERE amount > (
SELECT MIN(amount) FROM managers AS hac
WHERE hac.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "managers",
"outer_alias": "gev",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07345 | train |
v2 | Schema:
orders (alias: kab)(level, id, code, salary)
categories(code, level, value, id)
Task: Find amount from orders where a matching record exists in categories with the same id.
SQL: | SELECT amount FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07346 | train |
v3 | Schema:
branches (alias: agov)(code, value, id, type)
invoices(level, salary, value, type)
Task: Find name from branches where value exceeds the total value from invoices for the same id.
SQL: | SELECT name FROM branches AS agov
WHERE value > (
SELECT SUM(value) FROM invoices AS fal
WHERE fal.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "invoices",
"outer_alias": "agov",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_07347 | train |
v3 | Schema:
employees (alias: bev)(date, id, salary, type)
projects(name, id, date, status)
Task: Retrieve amount from employees with value above the MAX(value) of projects rows sharing the same level.
SQL: | SELECT amount FROM employees AS bev
WHERE value > (
SELECT MAX(value) FROM projects AS uliv
WHERE uliv.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07348 | train |
v3 | Schema:
requests (alias: ejof)(salary, value, code, date)
managers(name, value, id, status)
Task: Find amount from requests where salary exceeds the average salary from managers for the same id.
SQL: | SELECT amount FROM requests AS ejof
WHERE salary > (
SELECT AVG(salary) FROM managers AS hac
WHERE hac.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_07349 | train |
v1 | Schema:
invoices (alias: fal)(level, salary, date, code)
items(status, name, value, type)
Task: Find amount from invoices where code appears in items entries with matching status.
SQL: | SELECT amount FROM invoices AS fal
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "fal",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07350 | train |
v1 | Schema:
managers (alias: hac)(name, code, status, date)
regions(name, status, level, date)
Task: Select amount from managers where id exists in regions for the same status.
SQL: | SELECT amount FROM managers AS hac
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "hac",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07351 | train |
v3 | Schema:
regions (alias: okiv)(amount, level, date, id)
projects(value, amount, type, salary)
Task: Retrieve salary from regions with amount above the MIN(salary) of projects rows sharing the same id.
SQL: | SELECT salary FROM regions AS okiv
WHERE amount > (
SELECT MIN(salary) FROM projects AS uliv
WHERE uliv.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_07352 | train |
v3 | Schema:
projects (alias: uliv)(date, name, code, level)
transactions(id, date, level, name)
Task: Retrieve id from projects with salary above the SUM(salary) of transactions rows sharing the same type.
SQL: | SELECT id FROM projects AS uliv
WHERE salary > (
SELECT SUM(salary) FROM transactions AS gev
WHERE gev.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_07353 | train |
v2 | Schema:
managers (alias: hac)(type, value, status, id)
requests(level, date, salary, amount)
Task: Find amount from managers where a matching record exists in requests with the same type.
SQL: | SELECT amount FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "requests",
"outer_alias": "hac",
"inner_alias": "ejof",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07354 | train |
v2 | Schema:
items (alias: ikob)(name, amount, id, level)
staff(salary, code, name, value)
Task: Retrieve id from items that have at least one corresponding entry in staff sharing the same type.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "xnob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_07355 | train |
v2 | Schema:
tasks (alias: znob)(value, name, id, date)
accounts(amount, date, salary, status)
Task: Retrieve amount from tasks that have at least one corresponding entry in accounts sharing the same type.
SQL: | SELECT amount FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_07356 | train |
v2 | Schema:
transactions (alias: gev)(code, date, salary, status)
accounts(value, name, code, date)
Task: Retrieve value from transactions that have at least one corresponding entry in accounts sharing the same type.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "accounts",
"outer_alias": "gev",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07357 | train |
v3 | Schema:
orders (alias: kab)(code, salary, value, status)
invoices(status, type, id, amount)
Task: Find id from orders where salary exceeds the total salary from invoices for the same id.
SQL: | SELECT id FROM orders AS kab
WHERE salary > (
SELECT SUM(salary) FROM invoices AS fal
WHERE fal.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07358 | train |
v2 | Schema:
categories (alias: egiv)(status, date, salary, name)
orders(value, date, amount, id)
Task: Find salary from categories where a matching record exists in orders with the same status.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_07359 | train |
v3 | Schema:
customers (alias: lex)(name, value, id, salary)
sales(code, type, status, level)
Task: Find code from customers where salary exceeds the total value from sales for the same level.
SQL: | SELECT code FROM customers AS lex
WHERE salary > (
SELECT SUM(value) FROM sales AS cif
WHERE cif.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07360 | train |
v2 | Schema:
managers (alias: hac)(date, amount, salary, code)
categories(level, name, type, date)
Task: Retrieve value from managers that have at least one corresponding entry in categories sharing the same status.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07361 | train |
v2 | Schema:
employees (alias: bev)(type, level, salary, status)
sales(code, status, id, level)
Task: Retrieve id from employees that have at least one corresponding entry in sales sharing the same type.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "sales",
"outer_alias": "bev",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07362 | train |
v1 | Schema:
schedules (alias: vmob)(type, salary, id, status)
shipments(amount, id, value, date)
Task: Select code from schedules where code exists in shipments for the same level.
SQL: | SELECT code FROM schedules AS vmob
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_07363 | train |
v2 | Schema:
orders (alias: kab)(date, name, value, type)
managers(value, date, name, id)
Task: Find value from orders where a matching record exists in managers with the same type.
SQL: | SELECT value FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "kab",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07364 | train |
v1 | Schema:
items (alias: ikob)(salary, id, name, date)
schedules(value, status, id, code)
Task: Find id from items where level appears in schedules entries with matching type.
SQL: | SELECT id FROM items AS ikob
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_07365 | train |
v1 | Schema:
sales (alias: cif)(level, salary, value, amount)
employees(status, salary, value, level)
Task: Select amount from sales where status exists in employees for the same status.
SQL: | SELECT amount FROM sales AS cif
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "employees",
"outer_alias": "cif",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07366 | train |
v2 | Schema:
staff (alias: xnob)(code, amount, status, date)
departments(status, value, id, name)
Task: Find amount from staff where a matching record exists in departments with the same id.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_07367 | train |
v1 | Schema:
customers (alias: lex)(date, status, type, salary)
sales(name, type, value, code)
Task: Select amount from customers where level exists in sales for the same id.
SQL: | SELECT amount FROM customers AS lex
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07368 | train |
v1 | Schema:
tasks (alias: znob)(status, salary, amount, value)
staff(salary, name, level, value)
Task: Retrieve amount from tasks whose code is found in staff rows where type matches the outer record.
SQL: | SELECT amount FROM tasks AS znob
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_07369 | train |
v2 | Schema:
managers (alias: hac)(type, value, code, amount)
items(name, code, date, status)
Task: Retrieve code from managers that have at least one corresponding entry in items sharing the same status.
SQL: | SELECT code FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07370 | train |
v2 | Schema:
customers (alias: lex)(name, id, salary, code)
products(type, salary, status, name)
Task: Find name from customers where a matching record exists in products with the same level.
SQL: | SELECT name FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07371 | train |
v2 | Schema:
departments (alias: dov)(status, id, name, type)
managers(date, status, salary, type)
Task: Retrieve value from departments that have at least one corresponding entry in managers sharing the same id.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07372 | train |
v3 | Schema:
requests (alias: ejof)(value, amount, type, salary)
customers(id, name, date, code)
Task: Retrieve amount from requests with amount above the SUM(salary) of customers rows sharing the same code.
SQL: | SELECT amount FROM requests AS ejof
WHERE amount > (
SELECT SUM(salary) FROM customers AS lex
WHERE lex.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "customers",
"outer_alias": "ejof",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_07373 | train |
v3 | Schema:
products (alias: nad)(amount, id, level, name)
regions(id, code, amount, salary)
Task: Retrieve amount from products with amount above the MAX(value) of regions rows sharing the same code.
SQL: | SELECT amount FROM products AS nad
WHERE amount > (
SELECT MAX(value) FROM regions AS okiv
WHERE okiv.code = nad.code
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07374 | train |
v2 | Schema:
employees (alias: bev)(status, code, name, value)
categories(date, value, type, status)
Task: Find name from employees where a matching record exists in categories with the same status.
SQL: | SELECT name FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07375 | train |
v3 | Schema:
sales (alias: cif)(level, status, code, amount)
projects(status, name, type, level)
Task: Find value from sales where value exceeds the average value from projects for the same type.
SQL: | SELECT value FROM sales AS cif
WHERE value > (
SELECT AVG(value) FROM projects AS uliv
WHERE uliv.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07376 | train |
v1 | Schema:
requests (alias: ejof)(value, level, amount, date)
employees(level, amount, id, name)
Task: Retrieve value from requests whose status is found in employees rows where status matches the outer record.
SQL: | SELECT value FROM requests AS ejof
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_07377 | train |
v2 | Schema:
schedules (alias: vmob)(amount, date, code, value)
categories(name, level, amount, status)
Task: Find value from schedules where a matching record exists in categories with the same level.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_07378 | train |
v2 | Schema:
schedules (alias: vmob)(level, status, name, amount)
transactions(value, type, amount, id)
Task: Find id from schedules where a matching record exists in transactions with the same status.
SQL: | SELECT id FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "transactions",
"outer_alias": "vmob",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_07379 | train |
v3 | Schema:
customers (alias: lex)(code, amount, date, value)
items(date, salary, type, name)
Task: Retrieve code from customers with salary above the AVG(value) of items rows sharing the same level.
SQL: | SELECT code FROM customers AS lex
WHERE salary > (
SELECT AVG(value) FROM items AS ikob
WHERE ikob.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07380 | train |
v1 | Schema:
accounts (alias: jac)(date, type, salary, code)
staff(amount, status, code, value)
Task: Retrieve salary from accounts whose status is found in staff rows where id matches the outer record.
SQL: | SELECT salary FROM accounts AS jac
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07381 | train |
v3 | Schema:
shipments (alias: vnob)(id, amount, name, salary)
projects(code, level, value, id)
Task: Retrieve name from shipments with salary above the AVG(amount) of projects rows sharing the same level.
SQL: | SELECT name FROM shipments AS vnob
WHERE salary > (
SELECT AVG(amount) FROM projects AS uliv
WHERE uliv.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "projects",
"outer_alias": "vnob",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_07382 | train |
v3 | Schema:
categories (alias: egiv)(salary, status, type, amount)
invoices(status, name, code, id)
Task: Retrieve amount from categories with value above the COUNT(salary) of invoices rows sharing the same status.
SQL: | SELECT amount FROM categories AS egiv
WHERE value > (
SELECT COUNT(salary) FROM invoices AS fal
WHERE fal.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_07383 | train |
v1 | Schema:
requests (alias: ejof)(salary, value, code, type)
sales(value, id, code, salary)
Task: Find amount from requests where level appears in sales entries with matching type.
SQL: | SELECT amount FROM requests AS ejof
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_07384 | train |
v1 | Schema:
items (alias: ikob)(level, value, id, name)
schedules(name, code, date, id)
Task: Retrieve salary from items whose code is found in schedules rows where status matches the outer record.
SQL: | SELECT salary FROM items AS ikob
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_07385 | train |
v3 | Schema:
projects (alias: uliv)(value, id, date, status)
tasks(code, salary, amount, level)
Task: Retrieve id from projects with value above the AVG(salary) of tasks rows sharing the same status.
SQL: | SELECT id FROM projects AS uliv
WHERE value > (
SELECT AVG(salary) FROM tasks AS znob
WHERE znob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_07386 | train |
v1 | Schema:
items (alias: ikob)(id, amount, date, value)
schedules(amount, status, salary, name)
Task: Select name from items where type exists in schedules for the same status.
SQL: | SELECT name FROM items AS ikob
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_07387 | train |
v1 | Schema:
products (alias: nad)(status, value, amount, code)
departments(value, code, status, name)
Task: Retrieve value from products whose status is found in departments rows where code matches the outer record.
SQL: | SELECT value FROM products AS nad
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.code = nad.code
); | {
"outer_table": "products",
"inner_table": "departments",
"outer_alias": "nad",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07388 | train |
v1 | Schema:
requests (alias: ejof)(code, date, salary, name)
items(value, status, code, name)
Task: Find id from requests where code appears in items entries with matching id.
SQL: | SELECT id FROM requests AS ejof
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ejof",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_07389 | train |
v3 | Schema:
schedules (alias: vmob)(name, date, level, code)
orders(status, amount, type, value)
Task: Retrieve amount from schedules with value above the MIN(salary) of orders rows sharing the same id.
SQL: | SELECT amount FROM schedules AS vmob
WHERE value > (
SELECT MIN(salary) FROM orders AS kab
WHERE kab.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "orders",
"outer_alias": "vmob",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_07390 | train |
v3 | Schema:
invoices (alias: fal)(name, amount, level, status)
orders(name, amount, status, code)
Task: Retrieve id from invoices with amount above the AVG(value) of orders rows sharing the same type.
SQL: | SELECT id FROM invoices AS fal
WHERE amount > (
SELECT AVG(value) FROM orders AS kab
WHERE kab.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07391 | train |
v2 | Schema:
transactions (alias: gev)(type, level, amount, name)
schedules(salary, value, level, id)
Task: Retrieve salary from transactions that have at least one corresponding entry in schedules sharing the same id.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07392 | train |
v1 | Schema:
regions (alias: okiv)(salary, name, type, date)
customers(amount, status, name, value)
Task: Select name from regions where level exists in customers for the same code.
SQL: | SELECT name FROM regions AS okiv
WHERE level IN (
SELECT level FROM customers AS lex
WHERE lex.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_07393 | train |
v2 | Schema:
orders (alias: kab)(date, amount, type, level)
sales(type, status, id, level)
Task: Find id from orders where a matching record exists in sales with the same type.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "sales",
"outer_alias": "kab",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07394 | train |
v2 | Schema:
regions (alias: okiv)(value, salary, type, id)
projects(salary, id, date, value)
Task: Retrieve name from regions that have at least one corresponding entry in projects sharing the same id.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_07395 | train |
v3 | Schema:
orders (alias: kab)(type, code, amount, id)
invoices(level, salary, date, value)
Task: Retrieve code from orders with value above the COUNT(amount) of invoices rows sharing the same id.
SQL: | SELECT code FROM orders AS kab
WHERE value > (
SELECT COUNT(amount) FROM invoices AS fal
WHERE fal.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_07396 | train |
v2 | Schema:
projects (alias: uliv)(type, id, salary, status)
items(status, date, type, value)
Task: Find name from projects where a matching record exists in items with the same id.
SQL: | SELECT name FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_07397 | train |
v3 | Schema:
requests (alias: ejof)(type, status, name, salary)
categories(type, amount, status, date)
Task: Find code from requests where salary exceeds the total salary from categories for the same status.
SQL: | SELECT code FROM requests AS ejof
WHERE salary > (
SELECT SUM(salary) FROM categories AS egiv
WHERE egiv.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_07398 | train |
v3 | Schema:
requests (alias: ejof)(value, level, type, date)
tasks(name, amount, date, id)
Task: Retrieve name from requests with salary above the MIN(value) of tasks rows sharing the same id.
SQL: | SELECT name FROM requests AS ejof
WHERE salary > (
SELECT MIN(value) FROM tasks AS znob
WHERE znob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_07399 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.