variant stringclasses 3
values | prompt stringlengths 163 237 | sql stringlengths 103 143 | metadata unknown | id stringlengths 21 21 | split stringclasses 1
value | token_group stringclasses 2
values |
|---|---|---|---|---|---|---|
v3 | Schema:
shipments (alias: shp)(type, date, status, name)
budgets(code, date, amount, type)
Task: Retrieve value from shipments with salary above the AVG(value) of budgets rows sharing the same status.
SQL: | SELECT value FROM shipments AS shp
WHERE salary > (
SELECT AVG(value) FROM budgets AS budg
WHERE budg.status = shp.status
); | {
"outer_table": "shipments",
"inner_table": "budgets",
"outer_alias": "shp",
"inner_alias": "budg",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "shp.status",
"token_group": "T2"
} | cs8_fixed_train_04200 | train | T2 |
v3 | Schema:
managers (alias: mgr)(code, date, id, value)
regions(level, amount, status, value)
Task: Find code from managers where value exceeds the average salary from regions for the same level.
SQL: | SELECT code FROM managers AS mgr
WHERE value > (
SELECT COUNT(salary) FROM regions AS rgn
WHERE rgn.level = mgr.level
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "mgr",
"inner_alias": "rgn",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "mgr.level",
"token_group": "T1"
} | cs8_fixed_train_04201 | train | T1 |
v1 | Schema:
employees (alias: emp)(status, salary, id, date)
transactions(type, name, status, code)
Task: Find value from employees where status appears in transactions entries with matching status.
SQL: | SELECT value FROM employees AS emp
WHERE status IN (
SELECT status FROM transactions AS txn
WHERE txn.status = emp.status
); | {
"outer_table": "employees",
"inner_table": "transactions",
"outer_alias": "emp",
"inner_alias": "txn",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "emp.status",
"token_group": "T1"
} | cs8_fixed_train_04202 | train | T1 |
v1 | Schema:
customers (alias: cust)(name, date, value, code)
accounts(date, salary, amount, id)
Task: Retrieve name from customers whose code is found in accounts rows where status matches the outer record.
SQL: | SELECT name FROM customers AS cust
WHERE code IN (
SELECT code FROM accounts AS acct
WHERE acct.status = cust.status
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "cust",
"inner_alias": "acct",
"proj_col": "name",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "cust.status",
"token_group": "T1"
} | cs8_fixed_train_04203 | train | T1 |
v1 | Schema:
services (alias: srvc)(status, amount, code, level)
employees(level, id, value, amount)
Task: Select amount from services where code exists in employees for the same type.
SQL: | SELECT amount FROM services AS srvc
WHERE code IN (
SELECT code FROM employees AS emp
WHERE emp.type = srvc.type
); | {
"outer_table": "services",
"inner_table": "employees",
"outer_alias": "srvc",
"inner_alias": "emp",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "srvc.type",
"token_group": "T2"
} | cs8_fixed_train_04204 | train | T2 |
v3 | Schema:
sales (alias: sale)(salary, id, type, status)
budgets(type, level, code, id)
Task: Retrieve code from sales with amount above the COUNT(amount) of budgets rows sharing the same id.
SQL: | SELECT code FROM sales AS sale
WHERE amount > (
SELECT COUNT(amount) FROM budgets AS budg
WHERE budg.id = sale.id
); | {
"outer_table": "sales",
"inner_table": "budgets",
"outer_alias": "sale",
"inner_alias": "budg",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "sale.id",
"token_group": "T1"
} | cs8_fixed_train_04205 | train | T1 |
v2 | Schema:
warehouses (alias: whs)(date, code, name, id)
shipments(date, type, status, value)
Task: Retrieve name from warehouses that have at least one corresponding entry in shipments sharing the same type.
SQL: | SELECT name FROM warehouses AS whs
WHERE EXISTS (
SELECT 1 FROM shipments AS shp
WHERE shp.type = whs.type
); | {
"outer_table": "warehouses",
"inner_table": "shipments",
"outer_alias": "whs",
"inner_alias": "shp",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "whs.type",
"token_group": "T2"
} | cs8_fixed_train_04206 | train | T2 |
v3 | Schema:
invoices (alias: inv)(name, date, code, amount)
schedules(amount, value, status, salary)
Task: Find code from invoices where amount exceeds the average amount from schedules for the same level.
SQL: | SELECT code FROM invoices AS inv
WHERE amount > (
SELECT MIN(amount) FROM schedules AS schd
WHERE schd.level = inv.level
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "inv",
"inner_alias": "schd",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "inv.level",
"token_group": "T1"
} | cs8_fixed_train_04207 | train | T1 |
v2 | Schema:
sales (alias: sale)(date, type, amount, code)
warehouses(status, salary, amount, date)
Task: Retrieve value from sales that have at least one corresponding entry in warehouses sharing the same level.
SQL: | SELECT value FROM sales AS sale
WHERE EXISTS (
SELECT 1 FROM warehouses AS whs
WHERE whs.level = sale.level
); | {
"outer_table": "sales",
"inner_table": "warehouses",
"outer_alias": "sale",
"inner_alias": "whs",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "sale.level",
"token_group": "T1"
} | cs8_fixed_train_04208 | train | T1 |
v1 | Schema:
orders (alias: ord)(name, value, amount, status)
invoices(type, id, status, date)
Task: Find value from orders where status appears in invoices entries with matching id.
SQL: | SELECT value FROM orders AS ord
WHERE status IN (
SELECT status FROM invoices AS inv
WHERE inv.id = ord.id
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "ord",
"inner_alias": "inv",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "ord.id",
"token_group": "T1"
} | cs8_fixed_train_04209 | train | T1 |
v2 | Schema:
staff (alias: empl)(type, level, id, amount)
budgets(status, value, salary, name)
Task: Retrieve value from staff that have at least one corresponding entry in budgets sharing the same code.
SQL: | SELECT value FROM staff AS empl
WHERE EXISTS (
SELECT 1 FROM budgets AS budg
WHERE budg.code = empl.code
); | {
"outer_table": "staff",
"inner_table": "budgets",
"outer_alias": "empl",
"inner_alias": "budg",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "empl.code",
"token_group": "T2"
} | cs8_fixed_train_04210 | train | T2 |
v3 | Schema:
transactions (alias: txn)(name, status, type, amount)
requests(id, date, value, status)
Task: Find value from transactions where salary exceeds the average value from requests for the same status.
SQL: | SELECT value FROM transactions AS txn
WHERE salary > (
SELECT COUNT(value) FROM requests AS ordr
WHERE ordr.status = txn.status
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "txn",
"inner_alias": "ordr",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "txn.status",
"token_group": "T1"
} | cs8_fixed_train_04211 | train | T1 |
v1 | Schema:
services (alias: srvc)(status, code, id, name)
accounts(code, level, date, status)
Task: Find amount from services where level appears in accounts entries with matching id.
SQL: | SELECT amount FROM services AS srvc
WHERE level IN (
SELECT level FROM accounts AS acct
WHERE acct.id = srvc.id
); | {
"outer_table": "services",
"inner_table": "accounts",
"outer_alias": "srvc",
"inner_alias": "acct",
"proj_col": "amount",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "srvc.id",
"token_group": "T2"
} | cs8_fixed_train_04212 | train | T2 |
v2 | Schema:
services (alias: srvc)(status, value, date, level)
accounts(value, amount, code, id)
Task: Retrieve value from services that have at least one corresponding entry in accounts sharing the same id.
SQL: | SELECT value FROM services AS srvc
WHERE EXISTS (
SELECT 1 FROM accounts AS acct
WHERE acct.id = srvc.id
); | {
"outer_table": "services",
"inner_table": "accounts",
"outer_alias": "srvc",
"inner_alias": "acct",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "srvc.id",
"token_group": "T2"
} | cs8_fixed_train_04213 | train | T2 |
v1 | Schema:
sales (alias: sale)(type, code, salary, date)
shipments(status, name, value, date)
Task: Retrieve code from sales whose level is found in shipments rows where code matches the outer record.
SQL: | SELECT code FROM sales AS sale
WHERE level IN (
SELECT level FROM shipments AS shp
WHERE shp.code = sale.code
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "sale",
"inner_alias": "shp",
"proj_col": "code",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "sale.code",
"token_group": "T1"
} | cs8_fixed_train_04214 | train | T1 |
v2 | Schema:
invoices (alias: inv)(date, value, salary, name)
categories(date, amount, type, status)
Task: Find salary from invoices where a matching record exists in categories with the same code.
SQL: | SELECT salary FROM invoices AS inv
WHERE EXISTS (
SELECT 1 FROM categories AS catg
WHERE catg.code = inv.code
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "inv",
"inner_alias": "catg",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "inv.code",
"token_group": "T1"
} | cs8_fixed_train_04215 | train | T1 |
v1 | Schema:
budgets (alias: budg)(name, type, amount, id)
managers(salary, status, level, id)
Task: Select salary from budgets where code exists in managers for the same id.
SQL: | SELECT salary FROM budgets AS budg
WHERE code IN (
SELECT code FROM managers AS mgr
WHERE mgr.id = budg.id
); | {
"outer_table": "budgets",
"inner_table": "managers",
"outer_alias": "budg",
"inner_alias": "mgr",
"proj_col": "salary",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "budg.id",
"token_group": "T2"
} | cs8_fixed_train_04216 | train | T2 |
v1 | Schema:
transactions (alias: txn)(id, value, salary, name)
schedules(value, date, amount, salary)
Task: Retrieve name from transactions whose code is found in schedules rows where status matches the outer record.
SQL: | SELECT name FROM transactions AS txn
WHERE code IN (
SELECT code FROM schedules AS schd
WHERE schd.status = txn.status
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "txn",
"inner_alias": "schd",
"proj_col": "name",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "txn.status",
"token_group": "T1"
} | cs8_fixed_train_04217 | train | T1 |
v1 | Schema:
budgets (alias: budg)(id, date, salary, type)
categories(name, date, id, level)
Task: Select amount from budgets where status exists in categories for the same type.
SQL: | SELECT amount FROM budgets AS budg
WHERE status IN (
SELECT status FROM categories AS catg
WHERE catg.type = budg.type
); | {
"outer_table": "budgets",
"inner_table": "categories",
"outer_alias": "budg",
"inner_alias": "catg",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "budg.type",
"token_group": "T2"
} | cs8_fixed_train_04218 | train | T2 |
v1 | Schema:
invoices (alias: inv)(level, name, type, status)
customers(salary, date, value, status)
Task: Find salary from invoices where code appears in customers entries with matching status.
SQL: | SELECT salary FROM invoices AS inv
WHERE code IN (
SELECT code FROM customers AS cust
WHERE cust.status = inv.status
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "inv",
"inner_alias": "cust",
"proj_col": "salary",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "inv.status",
"token_group": "T1"
} | cs8_fixed_train_04219 | train | T1 |
v2 | Schema:
requests (alias: ordr)(status, date, type, code)
items(id, amount, level, type)
Task: Find value from requests where a matching record exists in items with the same code.
SQL: | SELECT value FROM requests AS ordr
WHERE EXISTS (
SELECT 1 FROM items AS lne
WHERE lne.code = ordr.code
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ordr",
"inner_alias": "lne",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "ordr.code",
"token_group": "T2"
} | cs8_fixed_train_04220 | train | T2 |
v3 | Schema:
staff (alias: empl)(salary, status, amount, code)
employees(code, date, value, salary)
Task: Find salary from staff where amount exceeds the average value from employees for the same code.
SQL: | SELECT salary FROM staff AS empl
WHERE amount > (
SELECT AVG(value) FROM employees AS emp
WHERE emp.code = empl.code
); | {
"outer_table": "staff",
"inner_table": "employees",
"outer_alias": "empl",
"inner_alias": "emp",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "empl.code",
"token_group": "T2"
} | cs8_fixed_train_04221 | train | T2 |
v2 | Schema:
products (alias: prod)(salary, level, name, value)
invoices(date, id, status, value)
Task: Find id from products where a matching record exists in invoices with the same type.
SQL: | SELECT id FROM products AS prod
WHERE EXISTS (
SELECT 1 FROM invoices AS inv
WHERE inv.type = prod.type
); | {
"outer_table": "products",
"inner_table": "invoices",
"outer_alias": "prod",
"inner_alias": "inv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "prod.type",
"token_group": "T1"
} | cs8_fixed_train_04222 | train | T1 |
v1 | Schema:
invoices (alias: inv)(salary, status, code, level)
items(salary, date, amount, type)
Task: Select name from invoices where status exists in items for the same id.
SQL: | SELECT name FROM invoices AS inv
WHERE status IN (
SELECT status FROM items AS lne
WHERE lne.id = inv.id
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "inv",
"inner_alias": "lne",
"proj_col": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "inv.id",
"token_group": "T1"
} | cs8_fixed_train_04223 | train | T1 |
v1 | Schema:
budgets (alias: budg)(status, level, id, name)
services(salary, date, amount, code)
Task: Retrieve id from budgets whose status is found in services rows where type matches the outer record.
SQL: | SELECT id FROM budgets AS budg
WHERE status IN (
SELECT status FROM services AS srvc
WHERE srvc.type = budg.type
); | {
"outer_table": "budgets",
"inner_table": "services",
"outer_alias": "budg",
"inner_alias": "srvc",
"proj_col": "id",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "budg.type",
"token_group": "T2"
} | cs8_fixed_train_04224 | train | T2 |
v1 | Schema:
schedules (alias: schd)(type, level, value, salary)
employees(level, amount, name, salary)
Task: Retrieve id from schedules whose type is found in employees rows where status matches the outer record.
SQL: | SELECT id FROM schedules AS schd
WHERE type IN (
SELECT type FROM employees AS emp
WHERE emp.status = schd.status
); | {
"outer_table": "schedules",
"inner_table": "employees",
"outer_alias": "schd",
"inner_alias": "emp",
"proj_col": "id",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "schd.status",
"token_group": "T2"
} | cs8_fixed_train_04225 | train | T2 |
v2 | Schema:
transactions (alias: txn)(code, date, salary, amount)
services(level, code, id, date)
Task: Retrieve id from transactions that have at least one corresponding entry in services sharing the same status.
SQL: | SELECT id FROM transactions AS txn
WHERE EXISTS (
SELECT 1 FROM services AS srvc
WHERE srvc.status = txn.status
); | {
"outer_table": "transactions",
"inner_table": "services",
"outer_alias": "txn",
"inner_alias": "srvc",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "txn.status",
"token_group": "T1"
} | cs8_fixed_train_04226 | train | T1 |
v2 | Schema:
items (alias: lne)(value, status, salary, date)
warehouses(salary, type, name, date)
Task: Find salary from items where a matching record exists in warehouses with the same type.
SQL: | SELECT salary FROM items AS lne
WHERE EXISTS (
SELECT 1 FROM warehouses AS whs
WHERE whs.type = lne.type
); | {
"outer_table": "items",
"inner_table": "warehouses",
"outer_alias": "lne",
"inner_alias": "whs",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "lne.type",
"token_group": "T2"
} | cs8_fixed_train_04227 | train | T2 |
v2 | Schema:
requests (alias: ordr)(name, status, id, code)
products(level, amount, value, status)
Task: Find name from requests where a matching record exists in products with the same level.
SQL: | SELECT name FROM requests AS ordr
WHERE EXISTS (
SELECT 1 FROM products AS prod
WHERE prod.level = ordr.level
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ordr",
"inner_alias": "prod",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "ordr.level",
"token_group": "T2"
} | cs8_fixed_train_04228 | train | T2 |
v2 | Schema:
accounts (alias: acct)(type, name, id, level)
categories(code, level, name, id)
Task: Retrieve name from accounts that have at least one corresponding entry in categories sharing the same level.
SQL: | SELECT name FROM accounts AS acct
WHERE EXISTS (
SELECT 1 FROM categories AS catg
WHERE catg.level = acct.level
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "acct",
"inner_alias": "catg",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "acct.level",
"token_group": "T1"
} | cs8_fixed_train_04229 | train | T1 |
v3 | Schema:
managers (alias: mgr)(date, code, name, value)
departments(status, salary, code, date)
Task: Retrieve amount from managers with amount above the AVG(value) of departments rows sharing the same level.
SQL: | SELECT amount FROM managers AS mgr
WHERE amount > (
SELECT AVG(value) FROM departments AS dept
WHERE dept.level = mgr.level
); | {
"outer_table": "managers",
"inner_table": "departments",
"outer_alias": "mgr",
"inner_alias": "dept",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "mgr.level",
"token_group": "T1"
} | cs8_fixed_train_04230 | train | T1 |
v3 | Schema:
sales (alias: sale)(value, id, status, level)
items(value, type, amount, id)
Task: Retrieve name from sales with value above the SUM(salary) of items rows sharing the same status.
SQL: | SELECT name FROM sales AS sale
WHERE value > (
SELECT SUM(salary) FROM items AS lne
WHERE lne.status = sale.status
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "sale",
"inner_alias": "lne",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "sale.status",
"token_group": "T1"
} | cs8_fixed_train_04231 | train | T1 |
v3 | Schema:
invoices (alias: inv)(amount, salary, status, value)
shipments(amount, type, status, value)
Task: Retrieve name from invoices with salary above the MIN(value) of shipments rows sharing the same id.
SQL: | SELECT name FROM invoices AS inv
WHERE salary > (
SELECT MIN(value) FROM shipments AS shp
WHERE shp.id = inv.id
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "inv",
"inner_alias": "shp",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "inv.id",
"token_group": "T1"
} | cs8_fixed_train_04232 | train | T1 |
v3 | Schema:
customers (alias: cust)(code, date, value, salary)
schedules(code, amount, id, name)
Task: Retrieve amount from customers with amount above the SUM(salary) of schedules rows sharing the same status.
SQL: | SELECT amount FROM customers AS cust
WHERE amount > (
SELECT SUM(salary) FROM schedules AS schd
WHERE schd.status = cust.status
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "cust",
"inner_alias": "schd",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "cust.status",
"token_group": "T1"
} | cs8_fixed_train_04233 | train | T1 |
v2 | Schema:
customers (alias: cust)(id, date, code, salary)
invoices(code, level, name, salary)
Task: Retrieve value from customers that have at least one corresponding entry in invoices sharing the same code.
SQL: | SELECT value FROM customers AS cust
WHERE EXISTS (
SELECT 1 FROM invoices AS inv
WHERE inv.code = cust.code
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "cust",
"inner_alias": "inv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "cust.code",
"token_group": "T1"
} | cs8_fixed_train_04234 | train | T1 |
v3 | Schema:
departments (alias: dept)(id, code, status, salary)
shipments(salary, id, level, code)
Task: Find amount from departments where amount exceeds the average salary from shipments for the same status.
SQL: | SELECT amount FROM departments AS dept
WHERE amount > (
SELECT SUM(salary) FROM shipments AS shp
WHERE shp.status = dept.status
); | {
"outer_table": "departments",
"inner_table": "shipments",
"outer_alias": "dept",
"inner_alias": "shp",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "dept.status",
"token_group": "T1"
} | cs8_fixed_train_04235 | train | T1 |
v1 | Schema:
regions (alias: rgn)(date, amount, type, salary)
staff(name, amount, status, date)
Task: Select name from regions where type exists in staff for the same level.
SQL: | SELECT name FROM regions AS rgn
WHERE type IN (
SELECT type FROM staff AS empl
WHERE empl.level = rgn.level
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "rgn",
"inner_alias": "empl",
"proj_col": "name",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "rgn.level",
"token_group": "T2"
} | cs8_fixed_train_04236 | train | T2 |
v1 | Schema:
products (alias: prod)(id, amount, status, date)
staff(value, amount, date, type)
Task: Select salary from products where id exists in staff for the same status.
SQL: | SELECT salary FROM products AS prod
WHERE id IN (
SELECT id FROM staff AS empl
WHERE empl.status = prod.status
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "prod",
"inner_alias": "empl",
"proj_col": "salary",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "prod.status",
"token_group": "T1"
} | cs8_fixed_train_04237 | train | T1 |
v2 | Schema:
requests (alias: ordr)(amount, id, name, level)
schedules(amount, salary, type, value)
Task: Find code from requests where a matching record exists in schedules with the same level.
SQL: | SELECT code FROM requests AS ordr
WHERE EXISTS (
SELECT 1 FROM schedules AS schd
WHERE schd.level = ordr.level
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ordr",
"inner_alias": "schd",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "ordr.level",
"token_group": "T2"
} | cs8_fixed_train_04238 | train | T2 |
v1 | Schema:
items (alias: lne)(id, level, status, salary)
employees(amount, status, level, type)
Task: Select id from items where type exists in employees for the same level.
SQL: | SELECT id FROM items AS lne
WHERE type IN (
SELECT type FROM employees AS emp
WHERE emp.level = lne.level
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "lne",
"inner_alias": "emp",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "lne.level",
"token_group": "T2"
} | cs8_fixed_train_04239 | train | T2 |
v3 | Schema:
managers (alias: mgr)(type, name, value, date)
warehouses(value, type, salary, date)
Task: Retrieve code from managers with amount above the SUM(salary) of warehouses rows sharing the same type.
SQL: | SELECT code FROM managers AS mgr
WHERE amount > (
SELECT SUM(salary) FROM warehouses AS whs
WHERE whs.type = mgr.type
); | {
"outer_table": "managers",
"inner_table": "warehouses",
"outer_alias": "mgr",
"inner_alias": "whs",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "mgr.type",
"token_group": "T1"
} | cs8_fixed_train_04240 | train | T1 |
v3 | Schema:
products (alias: prod)(level, code, value, status)
sales(value, name, code, amount)
Task: Retrieve value from products with value above the MAX(value) of sales rows sharing the same id.
SQL: | SELECT value FROM products AS prod
WHERE value > (
SELECT MAX(value) FROM sales AS sale
WHERE sale.id = prod.id
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "prod",
"inner_alias": "sale",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "prod.id",
"token_group": "T1"
} | cs8_fixed_train_04241 | train | T1 |
v3 | Schema:
customers (alias: cust)(code, name, date, amount)
shipments(salary, level, id, name)
Task: Retrieve code from customers with value above the COUNT(salary) of shipments rows sharing the same status.
SQL: | SELECT code FROM customers AS cust
WHERE value > (
SELECT COUNT(salary) FROM shipments AS shp
WHERE shp.status = cust.status
); | {
"outer_table": "customers",
"inner_table": "shipments",
"outer_alias": "cust",
"inner_alias": "shp",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "cust.status",
"token_group": "T1"
} | cs8_fixed_train_04242 | train | T1 |
v2 | Schema:
managers (alias: mgr)(id, type, name, value)
categories(salary, code, date, value)
Task: Retrieve amount from managers that have at least one corresponding entry in categories sharing the same code.
SQL: | SELECT amount FROM managers AS mgr
WHERE EXISTS (
SELECT 1 FROM categories AS catg
WHERE catg.code = mgr.code
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "mgr",
"inner_alias": "catg",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "mgr.code",
"token_group": "T1"
} | cs8_fixed_train_04243 | train | T1 |
v3 | Schema:
orders (alias: ord)(code, name, value, status)
warehouses(salary, date, code, id)
Task: Find salary from orders where amount exceeds the average amount from warehouses for the same code.
SQL: | SELECT salary FROM orders AS ord
WHERE amount > (
SELECT MAX(amount) FROM warehouses AS whs
WHERE whs.code = ord.code
); | {
"outer_table": "orders",
"inner_table": "warehouses",
"outer_alias": "ord",
"inner_alias": "whs",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "ord.code",
"token_group": "T1"
} | cs8_fixed_train_04244 | train | T1 |
v2 | Schema:
orders (alias: ord)(value, amount, salary, id)
warehouses(salary, amount, code, type)
Task: Retrieve id from orders that have at least one corresponding entry in warehouses sharing the same status.
SQL: | SELECT id FROM orders AS ord
WHERE EXISTS (
SELECT 1 FROM warehouses AS whs
WHERE whs.status = ord.status
); | {
"outer_table": "orders",
"inner_table": "warehouses",
"outer_alias": "ord",
"inner_alias": "whs",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "ord.status",
"token_group": "T1"
} | cs8_fixed_train_04245 | train | T1 |
v1 | Schema:
managers (alias: mgr)(value, level, code, date)
items(status, code, salary, level)
Task: Find amount from managers where status appears in items entries with matching type.
SQL: | SELECT amount FROM managers AS mgr
WHERE status IN (
SELECT status FROM items AS lne
WHERE lne.type = mgr.type
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "mgr",
"inner_alias": "lne",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "mgr.type",
"token_group": "T1"
} | cs8_fixed_train_04246 | train | T1 |
v3 | Schema:
transactions (alias: txn)(amount, code, type, name)
invoices(value, amount, status, salary)
Task: Retrieve name from transactions with amount above the COUNT(salary) of invoices rows sharing the same level.
SQL: | SELECT name FROM transactions AS txn
WHERE amount > (
SELECT COUNT(salary) FROM invoices AS inv
WHERE inv.level = txn.level
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "txn",
"inner_alias": "inv",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "txn.level",
"token_group": "T1"
} | cs8_fixed_train_04247 | train | T1 |
v3 | Schema:
schedules (alias: schd)(code, amount, salary, level)
warehouses(name, type, code, status)
Task: Retrieve id from schedules with salary above the SUM(salary) of warehouses rows sharing the same level.
SQL: | SELECT id FROM schedules AS schd
WHERE salary > (
SELECT SUM(salary) FROM warehouses AS whs
WHERE whs.level = schd.level
); | {
"outer_table": "schedules",
"inner_table": "warehouses",
"outer_alias": "schd",
"inner_alias": "whs",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "schd.level",
"token_group": "T2"
} | cs8_fixed_train_04248 | train | T2 |
v2 | Schema:
invoices (alias: inv)(level, code, date, type)
items(status, date, name, salary)
Task: Find value from invoices where a matching record exists in items with the same code.
SQL: | SELECT value FROM invoices AS inv
WHERE EXISTS (
SELECT 1 FROM items AS lne
WHERE lne.code = inv.code
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "inv",
"inner_alias": "lne",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "inv.code",
"token_group": "T1"
} | cs8_fixed_train_04249 | train | T1 |
v2 | Schema:
requests (alias: ordr)(salary, value, status, date)
sales(amount, value, date, level)
Task: Find amount from requests where a matching record exists in sales with the same status.
SQL: | SELECT amount FROM requests AS ordr
WHERE EXISTS (
SELECT 1 FROM sales AS sale
WHERE sale.status = ordr.status
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ordr",
"inner_alias": "sale",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "ordr.status",
"token_group": "T2"
} | cs8_fixed_train_04250 | train | T2 |
v2 | Schema:
orders (alias: ord)(code, salary, amount, value)
services(name, salary, value, code)
Task: Find value from orders where a matching record exists in services with the same type.
SQL: | SELECT value FROM orders AS ord
WHERE EXISTS (
SELECT 1 FROM services AS srvc
WHERE srvc.type = ord.type
); | {
"outer_table": "orders",
"inner_table": "services",
"outer_alias": "ord",
"inner_alias": "srvc",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "ord.type",
"token_group": "T1"
} | cs8_fixed_train_04251 | train | T1 |
v2 | Schema:
sales (alias: sale)(id, amount, type, level)
transactions(name, value, date, level)
Task: Find value from sales where a matching record exists in transactions with the same type.
SQL: | SELECT value FROM sales AS sale
WHERE EXISTS (
SELECT 1 FROM transactions AS txn
WHERE txn.type = sale.type
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "sale",
"inner_alias": "txn",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "sale.type",
"token_group": "T1"
} | cs8_fixed_train_04252 | train | T1 |
v3 | Schema:
staff (alias: empl)(salary, value, status, amount)
employees(code, level, type, id)
Task: Find code from staff where amount exceeds the average salary from employees for the same type.
SQL: | SELECT code FROM staff AS empl
WHERE amount > (
SELECT MIN(salary) FROM employees AS emp
WHERE emp.type = empl.type
); | {
"outer_table": "staff",
"inner_table": "employees",
"outer_alias": "empl",
"inner_alias": "emp",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "empl.type",
"token_group": "T2"
} | cs8_fixed_train_04253 | train | T2 |
v3 | Schema:
employees (alias: emp)(status, date, name, salary)
requests(type, status, name, date)
Task: Retrieve amount from employees with salary above the AVG(salary) of requests rows sharing the same id.
SQL: | SELECT amount FROM employees AS emp
WHERE salary > (
SELECT AVG(salary) FROM requests AS ordr
WHERE ordr.id = emp.id
); | {
"outer_table": "employees",
"inner_table": "requests",
"outer_alias": "emp",
"inner_alias": "ordr",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "emp.id",
"token_group": "T1"
} | cs8_fixed_train_04254 | train | T1 |
v3 | Schema:
shipments (alias: shp)(name, salary, code, status)
customers(value, level, type, id)
Task: Find salary from shipments where value exceeds the average value from customers for the same id.
SQL: | SELECT salary FROM shipments AS shp
WHERE value > (
SELECT COUNT(value) FROM customers AS cust
WHERE cust.id = shp.id
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "shp",
"inner_alias": "cust",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "shp.id",
"token_group": "T2"
} | cs8_fixed_train_04255 | train | T2 |
v2 | Schema:
sales (alias: sale)(value, type, id, date)
regions(value, date, name, salary)
Task: Retrieve amount from sales that have at least one corresponding entry in regions sharing the same type.
SQL: | SELECT amount FROM sales AS sale
WHERE EXISTS (
SELECT 1 FROM regions AS rgn
WHERE rgn.type = sale.type
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "sale",
"inner_alias": "rgn",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "sale.type",
"token_group": "T1"
} | cs8_fixed_train_04256 | train | T1 |
v1 | Schema:
departments (alias: dept)(amount, code, salary, name)
employees(amount, date, code, id)
Task: Select amount from departments where level exists in employees for the same code.
SQL: | SELECT amount FROM departments AS dept
WHERE level IN (
SELECT level FROM employees AS emp
WHERE emp.code = dept.code
); | {
"outer_table": "departments",
"inner_table": "employees",
"outer_alias": "dept",
"inner_alias": "emp",
"proj_col": "amount",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "dept.code",
"token_group": "T1"
} | cs8_fixed_train_04257 | train | T1 |
v2 | Schema:
employees (alias: emp)(code, status, amount, type)
items(name, id, amount, code)
Task: Retrieve code from employees that have at least one corresponding entry in items sharing the same code.
SQL: | SELECT code FROM employees AS emp
WHERE EXISTS (
SELECT 1 FROM items AS lne
WHERE lne.code = emp.code
); | {
"outer_table": "employees",
"inner_table": "items",
"outer_alias": "emp",
"inner_alias": "lne",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "emp.code",
"token_group": "T1"
} | cs8_fixed_train_04258 | train | T1 |
v1 | Schema:
regions (alias: rgn)(salary, type, code, date)
items(salary, id, value, amount)
Task: Retrieve amount from regions whose level is found in items rows where level matches the outer record.
SQL: | SELECT amount FROM regions AS rgn
WHERE level IN (
SELECT level FROM items AS lne
WHERE lne.level = rgn.level
); | {
"outer_table": "regions",
"inner_table": "items",
"outer_alias": "rgn",
"inner_alias": "lne",
"proj_col": "amount",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "rgn.level",
"token_group": "T2"
} | cs8_fixed_train_04259 | train | T2 |
v3 | Schema:
orders (alias: ord)(status, id, type, name)
shipments(level, salary, id, name)
Task: Find salary from orders where value exceeds the average amount from shipments for the same code.
SQL: | SELECT salary FROM orders AS ord
WHERE value > (
SELECT MAX(amount) FROM shipments AS shp
WHERE shp.code = ord.code
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "ord",
"inner_alias": "shp",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "ord.code",
"token_group": "T1"
} | cs8_fixed_train_04260 | train | T1 |
v2 | Schema:
items (alias: lne)(amount, id, name, level)
budgets(name, value, salary, code)
Task: Find id from items where a matching record exists in budgets with the same id.
SQL: | SELECT id FROM items AS lne
WHERE EXISTS (
SELECT 1 FROM budgets AS budg
WHERE budg.id = lne.id
); | {
"outer_table": "items",
"inner_table": "budgets",
"outer_alias": "lne",
"inner_alias": "budg",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "lne.id",
"token_group": "T2"
} | cs8_fixed_train_04261 | train | T2 |
v2 | Schema:
invoices (alias: inv)(date, id, status, salary)
regions(name, salary, status, level)
Task: Find value from invoices where a matching record exists in regions with the same type.
SQL: | SELECT value FROM invoices AS inv
WHERE EXISTS (
SELECT 1 FROM regions AS rgn
WHERE rgn.type = inv.type
); | {
"outer_table": "invoices",
"inner_table": "regions",
"outer_alias": "inv",
"inner_alias": "rgn",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "inv.type",
"token_group": "T1"
} | cs8_fixed_train_04262 | train | T1 |
v1 | Schema:
schedules (alias: schd)(date, value, name, type)
warehouses(status, value, code, date)
Task: Find id from schedules where status appears in warehouses entries with matching type.
SQL: | SELECT id FROM schedules AS schd
WHERE status IN (
SELECT status FROM warehouses AS whs
WHERE whs.type = schd.type
); | {
"outer_table": "schedules",
"inner_table": "warehouses",
"outer_alias": "schd",
"inner_alias": "whs",
"proj_col": "id",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "schd.type",
"token_group": "T2"
} | cs8_fixed_train_04263 | train | T2 |
v2 | Schema:
categories (alias: catg)(date, status, name, id)
transactions(date, id, status, value)
Task: Find salary from categories where a matching record exists in transactions with the same status.
SQL: | SELECT salary FROM categories AS catg
WHERE EXISTS (
SELECT 1 FROM transactions AS txn
WHERE txn.status = catg.status
); | {
"outer_table": "categories",
"inner_table": "transactions",
"outer_alias": "catg",
"inner_alias": "txn",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "catg.status",
"token_group": "T2"
} | cs8_fixed_train_04264 | train | T2 |
v3 | Schema:
services (alias: srvc)(amount, salary, level, status)
items(salary, value, id, type)
Task: Find id from services where value exceeds the average value from items for the same code.
SQL: | SELECT id FROM services AS srvc
WHERE value > (
SELECT AVG(value) FROM items AS lne
WHERE lne.code = srvc.code
); | {
"outer_table": "services",
"inner_table": "items",
"outer_alias": "srvc",
"inner_alias": "lne",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "srvc.code",
"token_group": "T2"
} | cs8_fixed_train_04265 | train | T2 |
v3 | Schema:
employees (alias: emp)(code, value, level, salary)
sales(type, code, amount, name)
Task: Find salary from employees where value exceeds the average salary from sales for the same status.
SQL: | SELECT salary FROM employees AS emp
WHERE value > (
SELECT MAX(salary) FROM sales AS sale
WHERE sale.status = emp.status
); | {
"outer_table": "employees",
"inner_table": "sales",
"outer_alias": "emp",
"inner_alias": "sale",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "emp.status",
"token_group": "T1"
} | cs8_fixed_train_04266 | train | T1 |
v1 | Schema:
categories (alias: catg)(id, amount, type, date)
shipments(status, id, code, amount)
Task: Retrieve id from categories whose code is found in shipments rows where type matches the outer record.
SQL: | SELECT id FROM categories AS catg
WHERE code IN (
SELECT code FROM shipments AS shp
WHERE shp.type = catg.type
); | {
"outer_table": "categories",
"inner_table": "shipments",
"outer_alias": "catg",
"inner_alias": "shp",
"proj_col": "id",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "catg.type",
"token_group": "T2"
} | cs8_fixed_train_04267 | train | T2 |
v1 | Schema:
invoices (alias: inv)(id, level, date, name)
employees(status, type, name, id)
Task: Retrieve salary from invoices whose status is found in employees rows where id matches the outer record.
SQL: | SELECT salary FROM invoices AS inv
WHERE status IN (
SELECT status FROM employees AS emp
WHERE emp.id = inv.id
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "inv",
"inner_alias": "emp",
"proj_col": "salary",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "inv.id",
"token_group": "T1"
} | cs8_fixed_train_04268 | train | T1 |
v3 | Schema:
transactions (alias: txn)(type, code, date, amount)
items(name, salary, date, status)
Task: Find code from transactions where salary exceeds the average salary from items for the same level.
SQL: | SELECT code FROM transactions AS txn
WHERE salary > (
SELECT MIN(salary) FROM items AS lne
WHERE lne.level = txn.level
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "txn",
"inner_alias": "lne",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "txn.level",
"token_group": "T1"
} | cs8_fixed_train_04269 | train | T1 |
v1 | Schema:
shipments (alias: shp)(amount, type, date, salary)
orders(status, type, amount, value)
Task: Retrieve salary from shipments whose code is found in orders rows where status matches the outer record.
SQL: | SELECT salary FROM shipments AS shp
WHERE code IN (
SELECT code FROM orders AS ord
WHERE ord.status = shp.status
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "shp",
"inner_alias": "ord",
"proj_col": "salary",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "shp.status",
"token_group": "T2"
} | cs8_fixed_train_04270 | train | T2 |
v3 | Schema:
products (alias: prod)(status, code, level, id)
categories(level, status, value, id)
Task: Find value from products where value exceeds the average amount from categories for the same code.
SQL: | SELECT value FROM products AS prod
WHERE value > (
SELECT SUM(amount) FROM categories AS catg
WHERE catg.code = prod.code
); | {
"outer_table": "products",
"inner_table": "categories",
"outer_alias": "prod",
"inner_alias": "catg",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "prod.code",
"token_group": "T1"
} | cs8_fixed_train_04271 | train | T1 |
v1 | Schema:
orders (alias: ord)(status, type, level, value)
invoices(name, amount, status, code)
Task: Retrieve code from orders whose level is found in invoices rows where id matches the outer record.
SQL: | SELECT code FROM orders AS ord
WHERE level IN (
SELECT level FROM invoices AS inv
WHERE inv.id = ord.id
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "ord",
"inner_alias": "inv",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "ord.id",
"token_group": "T1"
} | cs8_fixed_train_04272 | train | T1 |
v2 | Schema:
employees (alias: emp)(amount, id, type, code)
shipments(value, amount, type, status)
Task: Retrieve code from employees that have at least one corresponding entry in shipments sharing the same status.
SQL: | SELECT code FROM employees AS emp
WHERE EXISTS (
SELECT 1 FROM shipments AS shp
WHERE shp.status = emp.status
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "emp",
"inner_alias": "shp",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "emp.status",
"token_group": "T1"
} | cs8_fixed_train_04273 | train | T1 |
v2 | Schema:
orders (alias: ord)(date, type, id, salary)
employees(amount, id, type, value)
Task: Retrieve amount from orders that have at least one corresponding entry in employees sharing the same status.
SQL: | SELECT amount FROM orders AS ord
WHERE EXISTS (
SELECT 1 FROM employees AS emp
WHERE emp.status = ord.status
); | {
"outer_table": "orders",
"inner_table": "employees",
"outer_alias": "ord",
"inner_alias": "emp",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "ord.status",
"token_group": "T1"
} | cs8_fixed_train_04274 | train | T1 |
v3 | Schema:
schedules (alias: schd)(value, id, amount, status)
customers(date, value, id, status)
Task: Retrieve salary from schedules with salary above the SUM(value) of customers rows sharing the same code.
SQL: | SELECT salary FROM schedules AS schd
WHERE salary > (
SELECT SUM(value) FROM customers AS cust
WHERE cust.code = schd.code
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "schd",
"inner_alias": "cust",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "schd.code",
"token_group": "T2"
} | cs8_fixed_train_04275 | train | T2 |
v2 | Schema:
staff (alias: empl)(id, status, value, amount)
accounts(salary, level, type, date)
Task: Retrieve code from staff that have at least one corresponding entry in accounts sharing the same status.
SQL: | SELECT code FROM staff AS empl
WHERE EXISTS (
SELECT 1 FROM accounts AS acct
WHERE acct.status = empl.status
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "empl",
"inner_alias": "acct",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "empl.status",
"token_group": "T2"
} | cs8_fixed_train_04276 | train | T2 |
v3 | Schema:
items (alias: lne)(salary, id, date, code)
transactions(code, salary, id, amount)
Task: Retrieve name from items with value above the COUNT(amount) of transactions rows sharing the same id.
SQL: | SELECT name FROM items AS lne
WHERE value > (
SELECT COUNT(amount) FROM transactions AS txn
WHERE txn.id = lne.id
); | {
"outer_table": "items",
"inner_table": "transactions",
"outer_alias": "lne",
"inner_alias": "txn",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "lne.id",
"token_group": "T2"
} | cs8_fixed_train_04277 | train | T2 |
v1 | Schema:
services (alias: srvc)(type, code, amount, level)
requests(type, salary, code, id)
Task: Select value from services where level exists in requests for the same level.
SQL: | SELECT value FROM services AS srvc
WHERE level IN (
SELECT level FROM requests AS ordr
WHERE ordr.level = srvc.level
); | {
"outer_table": "services",
"inner_table": "requests",
"outer_alias": "srvc",
"inner_alias": "ordr",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "srvc.level",
"token_group": "T2"
} | cs8_fixed_train_04278 | train | T2 |
v3 | Schema:
shipments (alias: shp)(id, salary, value, code)
transactions(status, name, level, code)
Task: Find salary from shipments where value exceeds the average salary from transactions for the same code.
SQL: | SELECT salary FROM shipments AS shp
WHERE value > (
SELECT COUNT(salary) FROM transactions AS txn
WHERE txn.code = shp.code
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "shp",
"inner_alias": "txn",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "shp.code",
"token_group": "T2"
} | cs8_fixed_train_04279 | train | T2 |
v2 | Schema:
transactions (alias: txn)(id, value, type, name)
warehouses(salary, type, code, status)
Task: Retrieve code from transactions that have at least one corresponding entry in warehouses sharing the same status.
SQL: | SELECT code FROM transactions AS txn
WHERE EXISTS (
SELECT 1 FROM warehouses AS whs
WHERE whs.status = txn.status
); | {
"outer_table": "transactions",
"inner_table": "warehouses",
"outer_alias": "txn",
"inner_alias": "whs",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "txn.status",
"token_group": "T1"
} | cs8_fixed_train_04280 | train | T1 |
v2 | Schema:
products (alias: prod)(date, status, code, salary)
shipments(name, type, code, value)
Task: Find name from products where a matching record exists in shipments with the same status.
SQL: | SELECT name FROM products AS prod
WHERE EXISTS (
SELECT 1 FROM shipments AS shp
WHERE shp.status = prod.status
); | {
"outer_table": "products",
"inner_table": "shipments",
"outer_alias": "prod",
"inner_alias": "shp",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "prod.status",
"token_group": "T1"
} | cs8_fixed_train_04281 | train | T1 |
v1 | Schema:
requests (alias: ordr)(code, salary, date, amount)
sales(value, code, name, amount)
Task: Select name from requests where code exists in sales for the same status.
SQL: | SELECT name FROM requests AS ordr
WHERE code IN (
SELECT code FROM sales AS sale
WHERE sale.status = ordr.status
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ordr",
"inner_alias": "sale",
"proj_col": "name",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "ordr.status",
"token_group": "T2"
} | cs8_fixed_train_04282 | train | T2 |
v1 | Schema:
shipments (alias: shp)(salary, amount, status, level)
regions(amount, name, code, id)
Task: Retrieve name from shipments whose type is found in regions rows where type matches the outer record.
SQL: | SELECT name FROM shipments AS shp
WHERE type IN (
SELECT type FROM regions AS rgn
WHERE rgn.type = shp.type
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "shp",
"inner_alias": "rgn",
"proj_col": "name",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "shp.type",
"token_group": "T2"
} | cs8_fixed_train_04283 | train | T2 |
v1 | Schema:
customers (alias: cust)(value, amount, code, id)
requests(code, salary, type, status)
Task: Find code from customers where id appears in requests entries with matching type.
SQL: | SELECT code FROM customers AS cust
WHERE id IN (
SELECT id FROM requests AS ordr
WHERE ordr.type = cust.type
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "cust",
"inner_alias": "ordr",
"proj_col": "code",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "cust.type",
"token_group": "T1"
} | cs8_fixed_train_04284 | train | T1 |
v1 | Schema:
employees (alias: emp)(type, status, id, code)
requests(code, value, status, level)
Task: Select name from employees where code exists in requests for the same code.
SQL: | SELECT name FROM employees AS emp
WHERE code IN (
SELECT code FROM requests AS ordr
WHERE ordr.code = emp.code
); | {
"outer_table": "employees",
"inner_table": "requests",
"outer_alias": "emp",
"inner_alias": "ordr",
"proj_col": "name",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "emp.code",
"token_group": "T1"
} | cs8_fixed_train_04285 | train | T1 |
v3 | Schema:
requests (alias: ordr)(date, level, id, code)
shipments(code, type, amount, value)
Task: Find amount from requests where value exceeds the average amount from shipments for the same level.
SQL: | SELECT amount FROM requests AS ordr
WHERE value > (
SELECT COUNT(amount) FROM shipments AS shp
WHERE shp.level = ordr.level
); | {
"outer_table": "requests",
"inner_table": "shipments",
"outer_alias": "ordr",
"inner_alias": "shp",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "ordr.level",
"token_group": "T2"
} | cs8_fixed_train_04286 | train | T2 |
v3 | Schema:
categories (alias: catg)(value, status, type, level)
requests(amount, status, code, value)
Task: Find value from categories where value exceeds the average salary from requests for the same code.
SQL: | SELECT value FROM categories AS catg
WHERE value > (
SELECT COUNT(salary) FROM requests AS ordr
WHERE ordr.code = catg.code
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "catg",
"inner_alias": "ordr",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "catg.code",
"token_group": "T2"
} | cs8_fixed_train_04287 | train | T2 |
v3 | Schema:
sales (alias: sale)(date, value, code, status)
staff(id, amount, status, type)
Task: Retrieve code from sales with amount above the COUNT(salary) of staff rows sharing the same status.
SQL: | SELECT code FROM sales AS sale
WHERE amount > (
SELECT COUNT(salary) FROM staff AS empl
WHERE empl.status = sale.status
); | {
"outer_table": "sales",
"inner_table": "staff",
"outer_alias": "sale",
"inner_alias": "empl",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "sale.status",
"token_group": "T1"
} | cs8_fixed_train_04288 | train | T1 |
v2 | Schema:
customers (alias: cust)(status, value, type, salary)
budgets(amount, name, level, type)
Task: Retrieve amount from customers that have at least one corresponding entry in budgets sharing the same level.
SQL: | SELECT amount FROM customers AS cust
WHERE EXISTS (
SELECT 1 FROM budgets AS budg
WHERE budg.level = cust.level
); | {
"outer_table": "customers",
"inner_table": "budgets",
"outer_alias": "cust",
"inner_alias": "budg",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "cust.level",
"token_group": "T1"
} | cs8_fixed_train_04289 | train | T1 |
v1 | Schema:
staff (alias: empl)(level, id, value, salary)
categories(date, type, level, amount)
Task: Select value from staff where level exists in categories for the same status.
SQL: | SELECT value FROM staff AS empl
WHERE level IN (
SELECT level FROM categories AS catg
WHERE catg.status = empl.status
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "empl",
"inner_alias": "catg",
"proj_col": "value",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "empl.status",
"token_group": "T2"
} | cs8_fixed_train_04290 | train | T2 |
v1 | Schema:
invoices (alias: inv)(value, level, id, salary)
managers(date, status, amount, salary)
Task: Retrieve name from invoices whose level is found in managers rows where level matches the outer record.
SQL: | SELECT name FROM invoices AS inv
WHERE level IN (
SELECT level FROM managers AS mgr
WHERE mgr.level = inv.level
); | {
"outer_table": "invoices",
"inner_table": "managers",
"outer_alias": "inv",
"inner_alias": "mgr",
"proj_col": "name",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "inv.level",
"token_group": "T1"
} | cs8_fixed_train_04291 | train | T1 |
v2 | Schema:
schedules (alias: schd)(type, salary, id, status)
categories(value, level, status, id)
Task: Find value from schedules where a matching record exists in categories with the same id.
SQL: | SELECT value FROM schedules AS schd
WHERE EXISTS (
SELECT 1 FROM categories AS catg
WHERE catg.id = schd.id
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "schd",
"inner_alias": "catg",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "schd.id",
"token_group": "T2"
} | cs8_fixed_train_04292 | train | T2 |
v1 | Schema:
orders (alias: ord)(value, type, date, amount)
employees(name, type, amount, level)
Task: Find value from orders where level appears in employees entries with matching id.
SQL: | SELECT value FROM orders AS ord
WHERE level IN (
SELECT level FROM employees AS emp
WHERE emp.id = ord.id
); | {
"outer_table": "orders",
"inner_table": "employees",
"outer_alias": "ord",
"inner_alias": "emp",
"proj_col": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "ord.id",
"token_group": "T1"
} | cs8_fixed_train_04293 | train | T1 |
v1 | Schema:
requests (alias: ordr)(date, amount, type, status)
categories(id, type, code, date)
Task: Retrieve id from requests whose level is found in categories rows where code matches the outer record.
SQL: | SELECT id FROM requests AS ordr
WHERE level IN (
SELECT level FROM categories AS catg
WHERE catg.code = ordr.code
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ordr",
"inner_alias": "catg",
"proj_col": "id",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "ordr.code",
"token_group": "T2"
} | cs8_fixed_train_04294 | train | T2 |
v2 | Schema:
shipments (alias: shp)(salary, date, level, status)
invoices(salary, date, amount, id)
Task: Find id from shipments where a matching record exists in invoices with the same type.
SQL: | SELECT id FROM shipments AS shp
WHERE EXISTS (
SELECT 1 FROM invoices AS inv
WHERE inv.type = shp.type
); | {
"outer_table": "shipments",
"inner_table": "invoices",
"outer_alias": "shp",
"inner_alias": "inv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "shp.type",
"token_group": "T2"
} | cs8_fixed_train_04295 | train | T2 |
v1 | Schema:
staff (alias: empl)(code, status, type, date)
requests(status, name, salary, id)
Task: Retrieve amount from staff whose status is found in requests rows where status matches the outer record.
SQL: | SELECT amount FROM staff AS empl
WHERE status IN (
SELECT status FROM requests AS ordr
WHERE ordr.status = empl.status
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "empl",
"inner_alias": "ordr",
"proj_col": "amount",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "empl.status",
"token_group": "T2"
} | cs8_fixed_train_04296 | train | T2 |
v2 | Schema:
requests (alias: ordr)(amount, level, code, type)
products(id, value, level, type)
Task: Retrieve name from requests that have at least one corresponding entry in products sharing the same level.
SQL: | SELECT name FROM requests AS ordr
WHERE EXISTS (
SELECT 1 FROM products AS prod
WHERE prod.level = ordr.level
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ordr",
"inner_alias": "prod",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "ordr.level",
"token_group": "T2"
} | cs8_fixed_train_04297 | train | T2 |
v3 | Schema:
regions (alias: rgn)(type, salary, amount, id)
shipments(name, value, id, salary)
Task: Find name from regions where value exceeds the average salary from shipments for the same id.
SQL: | SELECT name FROM regions AS rgn
WHERE value > (
SELECT COUNT(salary) FROM shipments AS shp
WHERE shp.id = rgn.id
); | {
"outer_table": "regions",
"inner_table": "shipments",
"outer_alias": "rgn",
"inner_alias": "shp",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "rgn.id",
"token_group": "T2"
} | cs8_fixed_train_04298 | train | T2 |
v1 | Schema:
invoices (alias: inv)(amount, salary, code, type)
items(type, level, name, amount)
Task: Find value from invoices where level appears in items entries with matching status.
SQL: | SELECT value FROM invoices AS inv
WHERE level IN (
SELECT level FROM items AS lne
WHERE lne.status = inv.status
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "inv",
"inner_alias": "lne",
"proj_col": "value",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "inv.status",
"token_group": "T1"
} | cs8_fixed_train_04299 | train | T1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.