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 |
|---|---|---|---|---|---|---|
v2 | Schema:
employees (alias: emp)(level, value, name, code)
shipments(value, code, type, salary)
Task: Find name from employees where a matching record exists in shipments with the same type.
SQL: | SELECT name FROM employees AS emp
WHERE EXISTS (
SELECT 1 FROM shipments AS shp
WHERE shp.type = emp.type
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "emp",
"inner_alias": "shp",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "emp.type",
"token_group": "T1"
} | cs8_fixed_train_09700 | train | T1 |
v1 | Schema:
products (alias: prod)(name, status, level, amount)
transactions(date, name, code, amount)
Task: Retrieve name from products whose id is found in transactions rows where id matches the outer record.
SQL: | SELECT name FROM products AS prod
WHERE id IN (
SELECT id FROM transactions AS txn
WHERE txn.id = prod.id
); | {
"outer_table": "products",
"inner_table": "transactions",
"outer_alias": "prod",
"inner_alias": "txn",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "prod.id",
"token_group": "T1"
} | cs8_fixed_train_09701 | train | T1 |
v1 | Schema:
managers (alias: mgr)(name, date, value, level)
shipments(amount, type, salary, code)
Task: Find name from managers where status appears in shipments entries with matching status.
SQL: | SELECT name FROM managers AS mgr
WHERE status IN (
SELECT status FROM shipments AS shp
WHERE shp.status = mgr.status
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "mgr",
"inner_alias": "shp",
"proj_col": "name",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "mgr.status",
"token_group": "T1"
} | cs8_fixed_train_09702 | train | T1 |
v2 | Schema:
requests (alias: ordr)(amount, status, salary, code)
invoices(type, date, amount, level)
Task: Find id from requests where a matching record exists in invoices with the same status.
SQL: | SELECT id FROM requests AS ordr
WHERE EXISTS (
SELECT 1 FROM invoices AS inv
WHERE inv.status = ordr.status
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ordr",
"inner_alias": "inv",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "ordr.status",
"token_group": "T2"
} | cs8_fixed_train_09703 | train | T2 |
v3 | Schema:
employees (alias: emp)(level, salary, type, id)
customers(value, id, status, type)
Task: Retrieve salary from employees with value above the MAX(salary) of customers rows sharing the same status.
SQL: | SELECT salary FROM employees AS emp
WHERE value > (
SELECT MAX(salary) FROM customers AS cust
WHERE cust.status = emp.status
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "emp",
"inner_alias": "cust",
"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_09704 | train | T1 |
v2 | Schema:
customers (alias: cust)(value, level, salary, type)
employees(status, name, salary, type)
Task: Retrieve salary from customers that have at least one corresponding entry in employees sharing the same id.
SQL: | SELECT salary FROM customers AS cust
WHERE EXISTS (
SELECT 1 FROM employees AS emp
WHERE emp.id = cust.id
); | {
"outer_table": "customers",
"inner_table": "employees",
"outer_alias": "cust",
"inner_alias": "emp",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "cust.id",
"token_group": "T1"
} | cs8_fixed_train_09705 | train | T1 |
v1 | Schema:
orders (alias: ord)(salary, status, type, amount)
managers(name, salary, value, type)
Task: Retrieve code from orders whose status is found in managers rows where id matches the outer record.
SQL: | SELECT code FROM orders AS ord
WHERE status IN (
SELECT status FROM managers AS mgr
WHERE mgr.id = ord.id
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "ord",
"inner_alias": "mgr",
"proj_col": "code",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "ord.id",
"token_group": "T1"
} | cs8_fixed_train_09706 | train | T1 |
v1 | Schema:
budgets (alias: budg)(name, type, level, status)
regions(status, level, name, code)
Task: Find value from budgets where level appears in regions entries with matching code.
SQL: | SELECT value FROM budgets AS budg
WHERE level IN (
SELECT level FROM regions AS rgn
WHERE rgn.code = budg.code
); | {
"outer_table": "budgets",
"inner_table": "regions",
"outer_alias": "budg",
"inner_alias": "rgn",
"proj_col": "value",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "budg.code",
"token_group": "T2"
} | cs8_fixed_train_09707 | train | T2 |
v1 | Schema:
staff (alias: empl)(amount, value, date, salary)
categories(code, date, value, type)
Task: Select id from staff where status exists in categories for the same id.
SQL: | SELECT id FROM staff AS empl
WHERE status IN (
SELECT status FROM categories AS catg
WHERE catg.id = empl.id
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "empl",
"inner_alias": "catg",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "empl.id",
"token_group": "T2"
} | cs8_fixed_train_09708 | train | T2 |
v2 | Schema:
orders (alias: ord)(salary, code, value, name)
shipments(id, status, value, salary)
Task: Retrieve amount from orders that have at least one corresponding entry in shipments sharing the same level.
SQL: | SELECT amount FROM orders AS ord
WHERE EXISTS (
SELECT 1 FROM shipments AS shp
WHERE shp.level = ord.level
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "ord",
"inner_alias": "shp",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "ord.level",
"token_group": "T1"
} | cs8_fixed_train_09709 | train | T1 |
v1 | Schema:
items (alias: lne)(status, value, code, name)
services(level, code, amount, status)
Task: Select id from items where code exists in services for the same level.
SQL: | SELECT id FROM items AS lne
WHERE code IN (
SELECT code FROM services AS srvc
WHERE srvc.level = lne.level
); | {
"outer_table": "items",
"inner_table": "services",
"outer_alias": "lne",
"inner_alias": "srvc",
"proj_col": "id",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "lne.level",
"token_group": "T2"
} | cs8_fixed_train_09710 | train | T2 |
v3 | Schema:
services (alias: srvc)(salary, type, id, value)
accounts(name, salary, id, type)
Task: Retrieve amount from services with amount above the AVG(salary) of accounts rows sharing the same status.
SQL: | SELECT amount FROM services AS srvc
WHERE amount > (
SELECT AVG(salary) FROM accounts AS acct
WHERE acct.status = srvc.status
); | {
"outer_table": "services",
"inner_table": "accounts",
"outer_alias": "srvc",
"inner_alias": "acct",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "srvc.status",
"token_group": "T2"
} | cs8_fixed_train_09711 | train | T2 |
v2 | Schema:
schedules (alias: schd)(level, salary, date, type)
departments(salary, date, type, name)
Task: Retrieve salary from schedules that have at least one corresponding entry in departments sharing the same code.
SQL: | SELECT salary FROM schedules AS schd
WHERE EXISTS (
SELECT 1 FROM departments AS dept
WHERE dept.code = schd.code
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "schd",
"inner_alias": "dept",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "schd.code",
"token_group": "T2"
} | cs8_fixed_train_09712 | train | T2 |
v1 | Schema:
services (alias: srvc)(salary, level, type, name)
managers(id, status, name, code)
Task: Find name from services where id appears in managers entries with matching level.
SQL: | SELECT name FROM services AS srvc
WHERE id IN (
SELECT id FROM managers AS mgr
WHERE mgr.level = srvc.level
); | {
"outer_table": "services",
"inner_table": "managers",
"outer_alias": "srvc",
"inner_alias": "mgr",
"proj_col": "name",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "srvc.level",
"token_group": "T2"
} | cs8_fixed_train_09713 | train | T2 |
v3 | Schema:
requests (alias: ordr)(code, salary, type, name)
staff(code, id, type, amount)
Task: Retrieve id from requests with amount above the AVG(value) of staff rows sharing the same id.
SQL: | SELECT id FROM requests AS ordr
WHERE amount > (
SELECT AVG(value) FROM staff AS empl
WHERE empl.id = ordr.id
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ordr",
"inner_alias": "empl",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "ordr.id",
"token_group": "T2"
} | cs8_fixed_train_09714 | train | T2 |
v3 | Schema:
requests (alias: ordr)(salary, value, date, level)
managers(value, name, salary, code)
Task: Find code from requests where amount exceeds the average value from managers for the same id.
SQL: | SELECT code FROM requests AS ordr
WHERE amount > (
SELECT COUNT(value) FROM managers AS mgr
WHERE mgr.id = ordr.id
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ordr",
"inner_alias": "mgr",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "ordr.id",
"token_group": "T2"
} | cs8_fixed_train_09715 | train | T2 |
v1 | Schema:
departments (alias: dept)(level, salary, type, value)
items(type, salary, amount, id)
Task: Select id from departments where code exists in items for the same id.
SQL: | SELECT id FROM departments AS dept
WHERE code IN (
SELECT code FROM items AS lne
WHERE lne.id = dept.id
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dept",
"inner_alias": "lne",
"proj_col": "id",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "dept.id",
"token_group": "T1"
} | cs8_fixed_train_09716 | train | T1 |
v3 | Schema:
regions (alias: rgn)(code, type, id, name)
products(code, amount, salary, id)
Task: Retrieve value from regions with value above the AVG(amount) of products rows sharing the same id.
SQL: | SELECT value FROM regions AS rgn
WHERE value > (
SELECT AVG(amount) FROM products AS prod
WHERE prod.id = rgn.id
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "rgn",
"inner_alias": "prod",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "rgn.id",
"token_group": "T2"
} | cs8_fixed_train_09717 | train | T2 |
v3 | Schema:
categories (alias: catg)(id, salary, amount, name)
employees(salary, level, status, code)
Task: Find code from categories where salary exceeds the average salary from employees for the same id.
SQL: | SELECT code FROM categories AS catg
WHERE salary > (
SELECT SUM(salary) FROM employees AS emp
WHERE emp.id = catg.id
); | {
"outer_table": "categories",
"inner_table": "employees",
"outer_alias": "catg",
"inner_alias": "emp",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "catg.id",
"token_group": "T2"
} | cs8_fixed_train_09718 | train | T2 |
v2 | Schema:
accounts (alias: acct)(date, code, level, type)
orders(amount, status, salary, id)
Task: Retrieve amount from accounts that have at least one corresponding entry in orders sharing the same level.
SQL: | SELECT amount FROM accounts AS acct
WHERE EXISTS (
SELECT 1 FROM orders AS ord
WHERE ord.level = acct.level
); | {
"outer_table": "accounts",
"inner_table": "orders",
"outer_alias": "acct",
"inner_alias": "ord",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "acct.level",
"token_group": "T1"
} | cs8_fixed_train_09719 | train | T1 |
v3 | Schema:
requests (alias: ordr)(code, type, level, name)
products(type, status, salary, value)
Task: Find id from requests where value exceeds the average value from products for the same level.
SQL: | SELECT id FROM requests AS ordr
WHERE value > (
SELECT SUM(value) FROM products AS prod
WHERE prod.level = ordr.level
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ordr",
"inner_alias": "prod",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "ordr.level",
"token_group": "T2"
} | cs8_fixed_train_09720 | train | T2 |
v2 | Schema:
warehouses (alias: whs)(name, date, status, id)
employees(code, date, value, amount)
Task: Find value from warehouses where a matching record exists in employees with the same level.
SQL: | SELECT value FROM warehouses AS whs
WHERE EXISTS (
SELECT 1 FROM employees AS emp
WHERE emp.level = whs.level
); | {
"outer_table": "warehouses",
"inner_table": "employees",
"outer_alias": "whs",
"inner_alias": "emp",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "whs.level",
"token_group": "T2"
} | cs8_fixed_train_09721 | train | T2 |
v3 | Schema:
transactions (alias: txn)(salary, amount, level, code)
invoices(id, salary, code, amount)
Task: Retrieve amount from transactions with salary above the AVG(value) of invoices rows sharing the same status.
SQL: | SELECT amount FROM transactions AS txn
WHERE salary > (
SELECT AVG(value) FROM invoices AS inv
WHERE inv.status = txn.status
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "txn",
"inner_alias": "inv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "txn.status",
"token_group": "T1"
} | cs8_fixed_train_09722 | train | T1 |
v1 | Schema:
sales (alias: sale)(name, level, value, type)
customers(status, type, salary, level)
Task: Find name from sales where status appears in customers entries with matching level.
SQL: | SELECT name FROM sales AS sale
WHERE status IN (
SELECT status FROM customers AS cust
WHERE cust.level = sale.level
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "sale",
"inner_alias": "cust",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "sale.level",
"token_group": "T1"
} | cs8_fixed_train_09723 | train | T1 |
v1 | Schema:
shipments (alias: shp)(value, name, id, amount)
requests(value, id, date, amount)
Task: Select id from shipments where code exists in requests for the same status.
SQL: | SELECT id FROM shipments AS shp
WHERE code IN (
SELECT code FROM requests AS ordr
WHERE ordr.status = shp.status
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "shp",
"inner_alias": "ordr",
"proj_col": "id",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "shp.status",
"token_group": "T2"
} | cs8_fixed_train_09724 | train | T2 |
v2 | Schema:
employees (alias: emp)(status, date, type, code)
products(status, amount, date, id)
Task: Retrieve amount from employees that have at least one corresponding entry in products sharing the same code.
SQL: | SELECT amount FROM employees AS emp
WHERE EXISTS (
SELECT 1 FROM products AS prod
WHERE prod.code = emp.code
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "emp",
"inner_alias": "prod",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "emp.code",
"token_group": "T1"
} | cs8_fixed_train_09725 | train | T1 |
v3 | Schema:
regions (alias: rgn)(value, date, amount, salary)
managers(id, level, value, status)
Task: Find amount from regions where value exceeds the average value from managers for the same status.
SQL: | SELECT amount FROM regions AS rgn
WHERE value > (
SELECT MAX(value) FROM managers AS mgr
WHERE mgr.status = rgn.status
); | {
"outer_table": "regions",
"inner_table": "managers",
"outer_alias": "rgn",
"inner_alias": "mgr",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "rgn.status",
"token_group": "T2"
} | cs8_fixed_train_09726 | train | T2 |
v1 | Schema:
accounts (alias: acct)(date, status, name, value)
shipments(date, type, code, amount)
Task: Retrieve code from accounts whose type is found in shipments rows where type matches the outer record.
SQL: | SELECT code FROM accounts AS acct
WHERE type IN (
SELECT type FROM shipments AS shp
WHERE shp.type = acct.type
); | {
"outer_table": "accounts",
"inner_table": "shipments",
"outer_alias": "acct",
"inner_alias": "shp",
"proj_col": "code",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "acct.type",
"token_group": "T1"
} | cs8_fixed_train_09727 | train | T1 |
v2 | Schema:
requests (alias: ordr)(code, id, value, amount)
shipments(name, type, status, value)
Task: Find id from requests where a matching record exists in shipments with the same id.
SQL: | SELECT id FROM requests AS ordr
WHERE EXISTS (
SELECT 1 FROM shipments AS shp
WHERE shp.id = ordr.id
); | {
"outer_table": "requests",
"inner_table": "shipments",
"outer_alias": "ordr",
"inner_alias": "shp",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "ordr.id",
"token_group": "T2"
} | cs8_fixed_train_09728 | train | T2 |
v2 | Schema:
items (alias: lne)(name, status, value, code)
managers(date, name, code, status)
Task: Retrieve id from items that have at least one corresponding entry in managers sharing the same id.
SQL: | SELECT id FROM items AS lne
WHERE EXISTS (
SELECT 1 FROM managers AS mgr
WHERE mgr.id = lne.id
); | {
"outer_table": "items",
"inner_table": "managers",
"outer_alias": "lne",
"inner_alias": "mgr",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "lne.id",
"token_group": "T2"
} | cs8_fixed_train_09729 | train | T2 |
v2 | Schema:
staff (alias: empl)(amount, value, code, level)
categories(name, level, salary, value)
Task: Retrieve value from staff that have at least one corresponding entry in categories sharing the same id.
SQL: | SELECT value FROM staff AS empl
WHERE EXISTS (
SELECT 1 FROM categories AS catg
WHERE catg.id = empl.id
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "empl",
"inner_alias": "catg",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "empl.id",
"token_group": "T2"
} | cs8_fixed_train_09730 | train | T2 |
v3 | Schema:
items (alias: lne)(status, id, type, code)
sales(status, value, name, date)
Task: Retrieve amount from items with value above the AVG(amount) of sales rows sharing the same code.
SQL: | SELECT amount FROM items AS lne
WHERE value > (
SELECT AVG(amount) FROM sales AS sale
WHERE sale.code = lne.code
); | {
"outer_table": "items",
"inner_table": "sales",
"outer_alias": "lne",
"inner_alias": "sale",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "lne.code",
"token_group": "T2"
} | cs8_fixed_train_09731 | train | T2 |
v3 | Schema:
items (alias: lne)(value, status, name, id)
services(type, id, salary, code)
Task: Find code from items where amount exceeds the average salary from services for the same type.
SQL: | SELECT code FROM items AS lne
WHERE amount > (
SELECT MIN(salary) FROM services AS srvc
WHERE srvc.type = lne.type
); | {
"outer_table": "items",
"inner_table": "services",
"outer_alias": "lne",
"inner_alias": "srvc",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "lne.type",
"token_group": "T2"
} | cs8_fixed_train_09732 | train | T2 |
v2 | Schema:
schedules (alias: schd)(level, salary, type, date)
departments(id, value, type, level)
Task: Retrieve salary from schedules that have at least one corresponding entry in departments sharing the same status.
SQL: | SELECT salary FROM schedules AS schd
WHERE EXISTS (
SELECT 1 FROM departments AS dept
WHERE dept.status = schd.status
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "schd",
"inner_alias": "dept",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "schd.status",
"token_group": "T2"
} | cs8_fixed_train_09733 | train | T2 |
v1 | Schema:
categories (alias: catg)(type, level, status, code)
managers(level, type, amount, code)
Task: Select salary from categories where level exists in managers for the same status.
SQL: | SELECT salary FROM categories AS catg
WHERE level IN (
SELECT level FROM managers AS mgr
WHERE mgr.status = catg.status
); | {
"outer_table": "categories",
"inner_table": "managers",
"outer_alias": "catg",
"inner_alias": "mgr",
"proj_col": "salary",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "catg.status",
"token_group": "T2"
} | cs8_fixed_train_09734 | train | T2 |
v1 | Schema:
accounts (alias: acct)(level, value, code, name)
staff(level, status, amount, salary)
Task: Select code from accounts where id exists in staff for the same type.
SQL: | SELECT code FROM accounts AS acct
WHERE id IN (
SELECT id FROM staff AS empl
WHERE empl.type = acct.type
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "acct",
"inner_alias": "empl",
"proj_col": "code",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "acct.type",
"token_group": "T1"
} | cs8_fixed_train_09735 | train | T1 |
v3 | Schema:
shipments (alias: shp)(date, type, status, code)
accounts(value, salary, level, name)
Task: Retrieve id from shipments with salary above the SUM(value) of accounts rows sharing the same type.
SQL: | SELECT id FROM shipments AS shp
WHERE salary > (
SELECT SUM(value) FROM accounts AS acct
WHERE acct.type = shp.type
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "shp",
"inner_alias": "acct",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "shp.type",
"token_group": "T2"
} | cs8_fixed_train_09736 | train | T2 |
v1 | Schema:
services (alias: srvc)(type, salary, value, level)
regions(status, code, date, value)
Task: Retrieve code from services whose level is found in regions rows where level matches the outer record.
SQL: | SELECT code FROM services AS srvc
WHERE level IN (
SELECT level FROM regions AS rgn
WHERE rgn.level = srvc.level
); | {
"outer_table": "services",
"inner_table": "regions",
"outer_alias": "srvc",
"inner_alias": "rgn",
"proj_col": "code",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "srvc.level",
"token_group": "T2"
} | cs8_fixed_train_09737 | train | T2 |
v3 | Schema:
accounts (alias: acct)(amount, type, salary, level)
categories(level, salary, type, id)
Task: Retrieve amount from accounts with amount above the MAX(salary) of categories rows sharing the same status.
SQL: | SELECT amount FROM accounts AS acct
WHERE amount > (
SELECT MAX(salary) FROM categories AS catg
WHERE catg.status = acct.status
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "acct",
"inner_alias": "catg",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "acct.status",
"token_group": "T1"
} | cs8_fixed_train_09738 | train | T1 |
v3 | Schema:
accounts (alias: acct)(level, date, salary, type)
departments(salary, value, date, level)
Task: Find name from accounts where amount exceeds the average value from departments for the same id.
SQL: | SELECT name FROM accounts AS acct
WHERE amount > (
SELECT SUM(value) FROM departments AS dept
WHERE dept.id = acct.id
); | {
"outer_table": "accounts",
"inner_table": "departments",
"outer_alias": "acct",
"inner_alias": "dept",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "acct.id",
"token_group": "T1"
} | cs8_fixed_train_09739 | train | T1 |
v3 | Schema:
budgets (alias: budg)(id, type, amount, salary)
accounts(type, level, value, name)
Task: Retrieve amount from budgets with amount above the MIN(amount) of accounts rows sharing the same code.
SQL: | SELECT amount FROM budgets AS budg
WHERE amount > (
SELECT MIN(amount) FROM accounts AS acct
WHERE acct.code = budg.code
); | {
"outer_table": "budgets",
"inner_table": "accounts",
"outer_alias": "budg",
"inner_alias": "acct",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "budg.code",
"token_group": "T2"
} | cs8_fixed_train_09740 | train | T2 |
v1 | Schema:
staff (alias: empl)(date, salary, level, code)
departments(type, level, code, id)
Task: Select name from staff where id exists in departments for the same status.
SQL: | SELECT name FROM staff AS empl
WHERE id IN (
SELECT id FROM departments AS dept
WHERE dept.status = empl.status
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "empl",
"inner_alias": "dept",
"proj_col": "name",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "empl.status",
"token_group": "T2"
} | cs8_fixed_train_09741 | train | T2 |
v1 | Schema:
orders (alias: ord)(amount, type, code, id)
warehouses(id, salary, status, value)
Task: Retrieve name from orders whose status is found in warehouses rows where id matches the outer record.
SQL: | SELECT name FROM orders AS ord
WHERE status IN (
SELECT status FROM warehouses AS whs
WHERE whs.id = ord.id
); | {
"outer_table": "orders",
"inner_table": "warehouses",
"outer_alias": "ord",
"inner_alias": "whs",
"proj_col": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "ord.id",
"token_group": "T1"
} | cs8_fixed_train_09742 | train | T1 |
v2 | Schema:
regions (alias: rgn)(amount, id, status, level)
sales(date, value, type, name)
Task: Retrieve amount from regions that have at least one corresponding entry in sales sharing the same type.
SQL: | SELECT amount FROM regions AS rgn
WHERE EXISTS (
SELECT 1 FROM sales AS sale
WHERE sale.type = rgn.type
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "rgn",
"inner_alias": "sale",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "rgn.type",
"token_group": "T2"
} | cs8_fixed_train_09743 | train | T2 |
v1 | Schema:
staff (alias: empl)(level, code, name, value)
orders(status, amount, code, salary)
Task: Retrieve id from staff whose id is found in orders rows where type matches the outer record.
SQL: | SELECT id FROM staff AS empl
WHERE id IN (
SELECT id FROM orders AS ord
WHERE ord.type = empl.type
); | {
"outer_table": "staff",
"inner_table": "orders",
"outer_alias": "empl",
"inner_alias": "ord",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "empl.type",
"token_group": "T2"
} | cs8_fixed_train_09744 | train | T2 |
v3 | Schema:
regions (alias: rgn)(salary, amount, code, type)
managers(status, date, value, salary)
Task: Find amount from regions where value exceeds the average value from managers for the same status.
SQL: | SELECT amount FROM regions AS rgn
WHERE value > (
SELECT MIN(value) FROM managers AS mgr
WHERE mgr.status = rgn.status
); | {
"outer_table": "regions",
"inner_table": "managers",
"outer_alias": "rgn",
"inner_alias": "mgr",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "rgn.status",
"token_group": "T2"
} | cs8_fixed_train_09745 | train | T2 |
v1 | Schema:
budgets (alias: budg)(value, name, level, code)
transactions(amount, date, salary, name)
Task: Find name from budgets where id appears in transactions entries with matching code.
SQL: | SELECT name FROM budgets AS budg
WHERE id IN (
SELECT id FROM transactions AS txn
WHERE txn.code = budg.code
); | {
"outer_table": "budgets",
"inner_table": "transactions",
"outer_alias": "budg",
"inner_alias": "txn",
"proj_col": "name",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "budg.code",
"token_group": "T2"
} | cs8_fixed_train_09746 | train | T2 |
v3 | Schema:
managers (alias: mgr)(code, type, value, id)
regions(status, id, date, level)
Task: Retrieve amount from managers with salary above the MIN(amount) of regions rows sharing the same level.
SQL: | SELECT amount FROM managers AS mgr
WHERE salary > (
SELECT MIN(amount) FROM regions AS rgn
WHERE rgn.level = mgr.level
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "mgr",
"inner_alias": "rgn",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "mgr.level",
"token_group": "T1"
} | cs8_fixed_train_09747 | train | T1 |
v1 | Schema:
invoices (alias: inv)(salary, name, amount, id)
transactions(type, id, code, value)
Task: Select name from invoices where type exists in transactions for the same id.
SQL: | SELECT name FROM invoices AS inv
WHERE type IN (
SELECT type FROM transactions AS txn
WHERE txn.id = inv.id
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "inv",
"inner_alias": "txn",
"proj_col": "name",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "inv.id",
"token_group": "T1"
} | cs8_fixed_train_09748 | train | T1 |
v3 | Schema:
budgets (alias: budg)(type, code, status, name)
employees(level, type, name, salary)
Task: Retrieve salary from budgets with value above the COUNT(salary) of employees rows sharing the same type.
SQL: | SELECT salary FROM budgets AS budg
WHERE value > (
SELECT COUNT(salary) FROM employees AS emp
WHERE emp.type = budg.type
); | {
"outer_table": "budgets",
"inner_table": "employees",
"outer_alias": "budg",
"inner_alias": "emp",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "budg.type",
"token_group": "T2"
} | cs8_fixed_train_09749 | train | T2 |
v1 | Schema:
schedules (alias: schd)(salary, id, level, status)
customers(value, date, status, salary)
Task: Retrieve salary from schedules whose id is found in customers rows where id matches the outer record.
SQL: | SELECT salary FROM schedules AS schd
WHERE id IN (
SELECT id FROM customers AS cust
WHERE cust.id = schd.id
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "schd",
"inner_alias": "cust",
"proj_col": "salary",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "schd.id",
"token_group": "T2"
} | cs8_fixed_train_09750 | train | T2 |
v2 | Schema:
items (alias: lne)(amount, id, date, name)
categories(level, code, id, date)
Task: Retrieve salary from items that have at least one corresponding entry in categories sharing the same id.
SQL: | SELECT salary FROM items AS lne
WHERE EXISTS (
SELECT 1 FROM categories AS catg
WHERE catg.id = lne.id
); | {
"outer_table": "items",
"inner_table": "categories",
"outer_alias": "lne",
"inner_alias": "catg",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "lne.id",
"token_group": "T2"
} | cs8_fixed_train_09751 | train | T2 |
v3 | Schema:
shipments (alias: shp)(level, id, status, value)
staff(id, salary, status, code)
Task: Retrieve id from shipments with salary above the AVG(amount) of staff rows sharing the same type.
SQL: | SELECT id FROM shipments AS shp
WHERE salary > (
SELECT AVG(amount) FROM staff AS empl
WHERE empl.type = shp.type
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "shp",
"inner_alias": "empl",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "shp.type",
"token_group": "T2"
} | cs8_fixed_train_09752 | train | T2 |
v3 | Schema:
items (alias: lne)(date, code, amount, status)
managers(code, salary, type, name)
Task: Find salary from items where amount exceeds the average value from managers for the same status.
SQL: | SELECT salary FROM items AS lne
WHERE amount > (
SELECT COUNT(value) FROM managers AS mgr
WHERE mgr.status = lne.status
); | {
"outer_table": "items",
"inner_table": "managers",
"outer_alias": "lne",
"inner_alias": "mgr",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "lne.status",
"token_group": "T2"
} | cs8_fixed_train_09753 | train | T2 |
v2 | Schema:
products (alias: prod)(value, level, code, name)
warehouses(name, date, code, id)
Task: Find id from products where a matching record exists in warehouses with the same type.
SQL: | SELECT id FROM products AS prod
WHERE EXISTS (
SELECT 1 FROM warehouses AS whs
WHERE whs.type = prod.type
); | {
"outer_table": "products",
"inner_table": "warehouses",
"outer_alias": "prod",
"inner_alias": "whs",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "prod.type",
"token_group": "T1"
} | cs8_fixed_train_09754 | train | T1 |
v3 | Schema:
managers (alias: mgr)(level, status, name, type)
regions(level, name, amount, date)
Task: Retrieve name from managers with salary above the MAX(salary) of regions rows sharing the same id.
SQL: | SELECT name FROM managers AS mgr
WHERE salary > (
SELECT MAX(salary) FROM regions AS rgn
WHERE rgn.id = mgr.id
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "mgr",
"inner_alias": "rgn",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "mgr.id",
"token_group": "T1"
} | cs8_fixed_train_09755 | train | T1 |
v3 | Schema:
sales (alias: sale)(value, code, date, type)
customers(type, value, level, code)
Task: Find amount from sales where salary exceeds the average value from customers for the same id.
SQL: | SELECT amount FROM sales AS sale
WHERE salary > (
SELECT MAX(value) FROM customers AS cust
WHERE cust.id = sale.id
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "sale",
"inner_alias": "cust",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "sale.id",
"token_group": "T1"
} | cs8_fixed_train_09756 | train | T1 |
v1 | Schema:
requests (alias: ordr)(name, amount, code, type)
schedules(name, value, salary, date)
Task: Find value from requests where type appears in schedules entries with matching status.
SQL: | SELECT value FROM requests AS ordr
WHERE type IN (
SELECT type FROM schedules AS schd
WHERE schd.status = ordr.status
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ordr",
"inner_alias": "schd",
"proj_col": "value",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "ordr.status",
"token_group": "T2"
} | cs8_fixed_train_09757 | train | T2 |
v1 | Schema:
sales (alias: sale)(value, salary, amount, level)
shipments(id, name, type, level)
Task: Retrieve name from sales whose level is found in shipments rows where code matches the outer record.
SQL: | SELECT name 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": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "sale.code",
"token_group": "T1"
} | cs8_fixed_train_09758 | train | T1 |
v1 | Schema:
shipments (alias: shp)(level, value, date, salary)
services(type, status, code, date)
Task: Select value from shipments where type exists in services for the same type.
SQL: | SELECT value FROM shipments AS shp
WHERE type IN (
SELECT type FROM services AS srvc
WHERE srvc.type = shp.type
); | {
"outer_table": "shipments",
"inner_table": "services",
"outer_alias": "shp",
"inner_alias": "srvc",
"proj_col": "value",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "shp.type",
"token_group": "T2"
} | cs8_fixed_train_09759 | train | T2 |
v3 | Schema:
shipments (alias: shp)(level, date, salary, status)
items(salary, level, date, code)
Task: Retrieve name from shipments with salary above the MIN(salary) of items rows sharing the same status.
SQL: | SELECT name FROM shipments AS shp
WHERE salary > (
SELECT MIN(salary) FROM items AS lne
WHERE lne.status = shp.status
); | {
"outer_table": "shipments",
"inner_table": "items",
"outer_alias": "shp",
"inner_alias": "lne",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "shp.status",
"token_group": "T2"
} | cs8_fixed_train_09760 | train | T2 |
v3 | Schema:
services (alias: srvc)(status, code, date, name)
warehouses(id, status, level, type)
Task: Find name from services where value exceeds the average value from warehouses for the same code.
SQL: | SELECT name FROM services AS srvc
WHERE value > (
SELECT MIN(value) FROM warehouses AS whs
WHERE whs.code = srvc.code
); | {
"outer_table": "services",
"inner_table": "warehouses",
"outer_alias": "srvc",
"inner_alias": "whs",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "srvc.code",
"token_group": "T2"
} | cs8_fixed_train_09761 | train | T2 |
v2 | Schema:
managers (alias: mgr)(salary, id, type, level)
employees(id, code, date, value)
Task: Retrieve code from managers that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT code FROM managers AS mgr
WHERE EXISTS (
SELECT 1 FROM employees AS emp
WHERE emp.code = mgr.code
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "mgr",
"inner_alias": "emp",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "mgr.code",
"token_group": "T1"
} | cs8_fixed_train_09762 | train | T1 |
v1 | Schema:
managers (alias: mgr)(type, id, level, salary)
requests(type, status, level, code)
Task: Find amount from managers where code appears in requests entries with matching type.
SQL: | SELECT amount FROM managers AS mgr
WHERE code IN (
SELECT code FROM requests AS ordr
WHERE ordr.type = mgr.type
); | {
"outer_table": "managers",
"inner_table": "requests",
"outer_alias": "mgr",
"inner_alias": "ordr",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "mgr.type",
"token_group": "T1"
} | cs8_fixed_train_09763 | train | T1 |
v2 | Schema:
departments (alias: dept)(value, salary, date, name)
managers(level, name, id, salary)
Task: Retrieve value from departments that have at least one corresponding entry in managers sharing the same status.
SQL: | SELECT value FROM departments AS dept
WHERE EXISTS (
SELECT 1 FROM managers AS mgr
WHERE mgr.status = dept.status
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dept",
"inner_alias": "mgr",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "dept.status",
"token_group": "T1"
} | cs8_fixed_train_09764 | train | T1 |
v1 | Schema:
requests (alias: ordr)(value, type, date, level)
budgets(code, id, status, salary)
Task: Select salary from requests where code exists in budgets for the same code.
SQL: | SELECT salary FROM requests AS ordr
WHERE code IN (
SELECT code FROM budgets AS budg
WHERE budg.code = ordr.code
); | {
"outer_table": "requests",
"inner_table": "budgets",
"outer_alias": "ordr",
"inner_alias": "budg",
"proj_col": "salary",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "ordr.code",
"token_group": "T2"
} | cs8_fixed_train_09765 | train | T2 |
v1 | Schema:
regions (alias: rgn)(salary, code, level, status)
products(status, type, code, id)
Task: Retrieve name from regions whose level is found in products rows where code matches the outer record.
SQL: | SELECT name FROM regions AS rgn
WHERE level IN (
SELECT level FROM products AS prod
WHERE prod.code = rgn.code
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "rgn",
"inner_alias": "prod",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "rgn.code",
"token_group": "T2"
} | cs8_fixed_train_09766 | train | T2 |
v3 | Schema:
items (alias: lne)(code, type, level, name)
regions(salary, status, name, amount)
Task: Find amount from items where amount exceeds the average salary from regions for the same type.
SQL: | SELECT amount FROM items AS lne
WHERE amount > (
SELECT AVG(salary) FROM regions AS rgn
WHERE rgn.type = lne.type
); | {
"outer_table": "items",
"inner_table": "regions",
"outer_alias": "lne",
"inner_alias": "rgn",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "lne.type",
"token_group": "T2"
} | cs8_fixed_train_09767 | train | T2 |
v2 | Schema:
shipments (alias: shp)(name, amount, code, status)
schedules(status, type, code, id)
Task: Retrieve code from shipments that have at least one corresponding entry in schedules sharing the same id.
SQL: | SELECT code FROM shipments AS shp
WHERE EXISTS (
SELECT 1 FROM schedules AS schd
WHERE schd.id = shp.id
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "shp",
"inner_alias": "schd",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "shp.id",
"token_group": "T2"
} | cs8_fixed_train_09768 | train | T2 |
v2 | Schema:
budgets (alias: budg)(value, id, amount, date)
employees(level, name, date, salary)
Task: Retrieve code from budgets that have at least one corresponding entry in employees sharing the same level.
SQL: | SELECT code FROM budgets AS budg
WHERE EXISTS (
SELECT 1 FROM employees AS emp
WHERE emp.level = budg.level
); | {
"outer_table": "budgets",
"inner_table": "employees",
"outer_alias": "budg",
"inner_alias": "emp",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "budg.level",
"token_group": "T2"
} | cs8_fixed_train_09769 | train | T2 |
v2 | Schema:
services (alias: srvc)(id, value, amount, type)
products(amount, id, code, date)
Task: Retrieve salary from services that have at least one corresponding entry in products sharing the same type.
SQL: | SELECT salary FROM services AS srvc
WHERE EXISTS (
SELECT 1 FROM products AS prod
WHERE prod.type = srvc.type
); | {
"outer_table": "services",
"inner_table": "products",
"outer_alias": "srvc",
"inner_alias": "prod",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "srvc.type",
"token_group": "T2"
} | cs8_fixed_train_09770 | train | T2 |
v1 | Schema:
services (alias: srvc)(status, type, name, amount)
managers(level, type, status, date)
Task: Find id from services where type appears in managers entries with matching level.
SQL: | SELECT id FROM services AS srvc
WHERE type IN (
SELECT type FROM managers AS mgr
WHERE mgr.level = srvc.level
); | {
"outer_table": "services",
"inner_table": "managers",
"outer_alias": "srvc",
"inner_alias": "mgr",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "srvc.level",
"token_group": "T2"
} | cs8_fixed_train_09771 | train | T2 |
v3 | Schema:
sales (alias: sale)(date, value, amount, name)
departments(id, name, salary, amount)
Task: Find amount from sales where amount exceeds the average amount from departments for the same type.
SQL: | SELECT amount FROM sales AS sale
WHERE amount > (
SELECT COUNT(amount) FROM departments AS dept
WHERE dept.type = sale.type
); | {
"outer_table": "sales",
"inner_table": "departments",
"outer_alias": "sale",
"inner_alias": "dept",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "sale.type",
"token_group": "T1"
} | cs8_fixed_train_09772 | train | T1 |
v1 | Schema:
products (alias: prod)(salary, name, date, status)
items(id, amount, status, salary)
Task: Retrieve salary from products whose status is found in items rows where level matches the outer record.
SQL: | SELECT salary FROM products AS prod
WHERE status IN (
SELECT status FROM items AS lne
WHERE lne.level = prod.level
); | {
"outer_table": "products",
"inner_table": "items",
"outer_alias": "prod",
"inner_alias": "lne",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "prod.level",
"token_group": "T1"
} | cs8_fixed_train_09773 | train | T1 |
v2 | Schema:
requests (alias: ordr)(type, amount, name, code)
customers(name, date, id, status)
Task: Retrieve amount from requests that have at least one corresponding entry in customers sharing the same status.
SQL: | SELECT amount FROM requests AS ordr
WHERE EXISTS (
SELECT 1 FROM customers AS cust
WHERE cust.status = ordr.status
); | {
"outer_table": "requests",
"inner_table": "customers",
"outer_alias": "ordr",
"inner_alias": "cust",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "ordr.status",
"token_group": "T2"
} | cs8_fixed_train_09774 | train | T2 |
v2 | Schema:
requests (alias: ordr)(salary, status, date, code)
schedules(amount, code, id, status)
Task: Retrieve value from requests that have at least one corresponding entry in schedules sharing the same id.
SQL: | SELECT value FROM requests AS ordr
WHERE EXISTS (
SELECT 1 FROM schedules AS schd
WHERE schd.id = ordr.id
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ordr",
"inner_alias": "schd",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "ordr.id",
"token_group": "T2"
} | cs8_fixed_train_09775 | train | T2 |
v2 | Schema:
invoices (alias: inv)(salary, value, id, name)
transactions(level, id, status, salary)
Task: Find value from invoices where a matching record exists in transactions with the same type.
SQL: | SELECT value FROM invoices AS inv
WHERE EXISTS (
SELECT 1 FROM transactions AS txn
WHERE txn.type = inv.type
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "inv",
"inner_alias": "txn",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "inv.type",
"token_group": "T1"
} | cs8_fixed_train_09776 | train | T1 |
v3 | Schema:
shipments (alias: shp)(amount, name, salary, level)
warehouses(status, id, name, amount)
Task: Find id from shipments where amount exceeds the average amount from warehouses for the same id.
SQL: | SELECT id FROM shipments AS shp
WHERE amount > (
SELECT COUNT(amount) FROM warehouses AS whs
WHERE whs.id = shp.id
); | {
"outer_table": "shipments",
"inner_table": "warehouses",
"outer_alias": "shp",
"inner_alias": "whs",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "shp.id",
"token_group": "T2"
} | cs8_fixed_train_09777 | train | T2 |
v1 | Schema:
invoices (alias: inv)(level, name, date, type)
schedules(type, level, status, salary)
Task: Retrieve name from invoices whose id is found in schedules rows where status matches the outer record.
SQL: | SELECT name FROM invoices AS inv
WHERE id IN (
SELECT id FROM schedules AS schd
WHERE schd.status = inv.status
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "inv",
"inner_alias": "schd",
"proj_col": "name",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "inv.status",
"token_group": "T1"
} | cs8_fixed_train_09778 | train | T1 |
v3 | Schema:
sales (alias: sale)(value, level, amount, name)
regions(id, date, type, amount)
Task: Find name from sales where value exceeds the average salary from regions for the same type.
SQL: | SELECT name FROM sales AS sale
WHERE value > (
SELECT MIN(salary) FROM regions AS rgn
WHERE rgn.type = sale.type
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "sale",
"inner_alias": "rgn",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "sale.type",
"token_group": "T1"
} | cs8_fixed_train_09779 | train | T1 |
v1 | Schema:
warehouses (alias: whs)(name, id, salary, level)
orders(id, amount, salary, status)
Task: Find id from warehouses where status appears in orders entries with matching code.
SQL: | SELECT id FROM warehouses AS whs
WHERE status IN (
SELECT status FROM orders AS ord
WHERE ord.code = whs.code
); | {
"outer_table": "warehouses",
"inner_table": "orders",
"outer_alias": "whs",
"inner_alias": "ord",
"proj_col": "id",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "whs.code",
"token_group": "T2"
} | cs8_fixed_train_09780 | train | T2 |
v3 | Schema:
budgets (alias: budg)(name, date, code, status)
orders(type, code, id, salary)
Task: Find id from budgets where value exceeds the average amount from orders for the same type.
SQL: | SELECT id FROM budgets AS budg
WHERE value > (
SELECT SUM(amount) FROM orders AS ord
WHERE ord.type = budg.type
); | {
"outer_table": "budgets",
"inner_table": "orders",
"outer_alias": "budg",
"inner_alias": "ord",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "budg.type",
"token_group": "T2"
} | cs8_fixed_train_09781 | train | T2 |
v3 | Schema:
services (alias: srvc)(code, status, type, salary)
employees(amount, value, type, status)
Task: Find salary from services where salary exceeds the average salary from employees for the same type.
SQL: | SELECT salary FROM services AS srvc
WHERE salary > (
SELECT MIN(salary) FROM employees AS emp
WHERE emp.type = srvc.type
); | {
"outer_table": "services",
"inner_table": "employees",
"outer_alias": "srvc",
"inner_alias": "emp",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "srvc.type",
"token_group": "T2"
} | cs8_fixed_train_09782 | train | T2 |
v2 | Schema:
managers (alias: mgr)(type, salary, code, name)
transactions(id, type, level, date)
Task: Find value from managers where a matching record exists in transactions with the same status.
SQL: | SELECT value FROM managers AS mgr
WHERE EXISTS (
SELECT 1 FROM transactions AS txn
WHERE txn.status = mgr.status
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "mgr",
"inner_alias": "txn",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "mgr.status",
"token_group": "T1"
} | cs8_fixed_train_09783 | train | T1 |
v3 | Schema:
warehouses (alias: whs)(amount, id, date, code)
customers(level, status, code, date)
Task: Find name from warehouses where value exceeds the average amount from customers for the same id.
SQL: | SELECT name FROM warehouses AS whs
WHERE value > (
SELECT SUM(amount) FROM customers AS cust
WHERE cust.id = whs.id
); | {
"outer_table": "warehouses",
"inner_table": "customers",
"outer_alias": "whs",
"inner_alias": "cust",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "whs.id",
"token_group": "T2"
} | cs8_fixed_train_09784 | train | T2 |
v3 | Schema:
transactions (alias: txn)(status, amount, type, salary)
managers(salary, code, type, value)
Task: Find amount from transactions where salary exceeds the average salary from managers for the same type.
SQL: | SELECT amount FROM transactions AS txn
WHERE salary > (
SELECT COUNT(salary) FROM managers AS mgr
WHERE mgr.type = txn.type
); | {
"outer_table": "transactions",
"inner_table": "managers",
"outer_alias": "txn",
"inner_alias": "mgr",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "txn.type",
"token_group": "T1"
} | cs8_fixed_train_09785 | train | T1 |
v1 | Schema:
employees (alias: emp)(type, id, level, date)
accounts(amount, code, salary, name)
Task: Find id from employees where level appears in accounts entries with matching level.
SQL: | SELECT id FROM employees AS emp
WHERE level IN (
SELECT level FROM accounts AS acct
WHERE acct.level = emp.level
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "emp",
"inner_alias": "acct",
"proj_col": "id",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "emp.level",
"token_group": "T1"
} | cs8_fixed_train_09786 | train | T1 |
v2 | Schema:
staff (alias: empl)(salary, type, amount, status)
shipments(date, code, salary, level)
Task: Find amount from staff where a matching record exists in shipments with the same code.
SQL: | SELECT amount FROM staff AS empl
WHERE EXISTS (
SELECT 1 FROM shipments AS shp
WHERE shp.code = empl.code
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "empl",
"inner_alias": "shp",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "empl.code",
"token_group": "T2"
} | cs8_fixed_train_09787 | train | T2 |
v3 | Schema:
schedules (alias: schd)(type, name, id, value)
employees(status, type, code, id)
Task: Retrieve value from schedules with value above the SUM(amount) of employees rows sharing the same id.
SQL: | SELECT value FROM schedules AS schd
WHERE value > (
SELECT SUM(amount) FROM employees AS emp
WHERE emp.id = schd.id
); | {
"outer_table": "schedules",
"inner_table": "employees",
"outer_alias": "schd",
"inner_alias": "emp",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "schd.id",
"token_group": "T2"
} | cs8_fixed_train_09788 | train | T2 |
v3 | Schema:
regions (alias: rgn)(name, type, level, value)
services(value, salary, level, code)
Task: Find name from regions where salary exceeds the average salary from services for the same status.
SQL: | SELECT name FROM regions AS rgn
WHERE salary > (
SELECT COUNT(salary) FROM services AS srvc
WHERE srvc.status = rgn.status
); | {
"outer_table": "regions",
"inner_table": "services",
"outer_alias": "rgn",
"inner_alias": "srvc",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "rgn.status",
"token_group": "T2"
} | cs8_fixed_train_09789 | train | T2 |
v1 | Schema:
categories (alias: catg)(type, status, name, salary)
managers(type, status, value, level)
Task: Retrieve salary from categories whose code is found in managers rows where type matches the outer record.
SQL: | SELECT salary FROM categories AS catg
WHERE code IN (
SELECT code FROM managers AS mgr
WHERE mgr.type = catg.type
); | {
"outer_table": "categories",
"inner_table": "managers",
"outer_alias": "catg",
"inner_alias": "mgr",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "catg.type",
"token_group": "T2"
} | cs8_fixed_train_09790 | train | T2 |
v2 | Schema:
items (alias: lne)(salary, level, code, amount)
requests(status, salary, type, date)
Task: Find name from items where a matching record exists in requests with the same code.
SQL: | SELECT name FROM items AS lne
WHERE EXISTS (
SELECT 1 FROM requests AS ordr
WHERE ordr.code = lne.code
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "lne",
"inner_alias": "ordr",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "lne.code",
"token_group": "T2"
} | cs8_fixed_train_09791 | train | T2 |
v3 | Schema:
departments (alias: dept)(type, name, status, level)
orders(level, salary, date, id)
Task: Retrieve code from departments with value above the COUNT(salary) of orders rows sharing the same status.
SQL: | SELECT code FROM departments AS dept
WHERE value > (
SELECT COUNT(salary) FROM orders AS ord
WHERE ord.status = dept.status
); | {
"outer_table": "departments",
"inner_table": "orders",
"outer_alias": "dept",
"inner_alias": "ord",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "dept.status",
"token_group": "T1"
} | cs8_fixed_train_09792 | train | T1 |
v3 | Schema:
services (alias: srvc)(type, id, amount, status)
budgets(amount, value, date, level)
Task: Retrieve code from services with amount above the SUM(amount) of budgets rows sharing the same level.
SQL: | SELECT code FROM services AS srvc
WHERE amount > (
SELECT SUM(amount) FROM budgets AS budg
WHERE budg.level = srvc.level
); | {
"outer_table": "services",
"inner_table": "budgets",
"outer_alias": "srvc",
"inner_alias": "budg",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "srvc.level",
"token_group": "T2"
} | cs8_fixed_train_09793 | train | T2 |
v1 | Schema:
invoices (alias: inv)(salary, date, code, type)
customers(value, name, code, date)
Task: Retrieve name from invoices whose code is found in customers rows where type matches the outer record.
SQL: | SELECT name FROM invoices AS inv
WHERE code IN (
SELECT code FROM customers AS cust
WHERE cust.type = inv.type
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "inv",
"inner_alias": "cust",
"proj_col": "name",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "inv.type",
"token_group": "T1"
} | cs8_fixed_train_09794 | train | T1 |
v2 | Schema:
sales (alias: sale)(value, code, date, name)
items(id, level, salary, date)
Task: Retrieve amount from sales that have at least one corresponding entry in items sharing the same status.
SQL: | SELECT amount FROM sales AS sale
WHERE EXISTS (
SELECT 1 FROM items AS lne
WHERE lne.status = sale.status
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "sale",
"inner_alias": "lne",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "sale.status",
"token_group": "T1"
} | cs8_fixed_train_09795 | train | T1 |
v3 | Schema:
requests (alias: ordr)(level, amount, type, date)
budgets(status, date, type, id)
Task: Find salary from requests where salary exceeds the average salary from budgets for the same id.
SQL: | SELECT salary FROM requests AS ordr
WHERE salary > (
SELECT COUNT(salary) FROM budgets AS budg
WHERE budg.id = ordr.id
); | {
"outer_table": "requests",
"inner_table": "budgets",
"outer_alias": "ordr",
"inner_alias": "budg",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "ordr.id",
"token_group": "T2"
} | cs8_fixed_train_09796 | train | T2 |
v3 | Schema:
budgets (alias: budg)(salary, name, code, type)
customers(salary, id, date, name)
Task: Find salary from budgets where amount exceeds the average salary from customers for the same level.
SQL: | SELECT salary FROM budgets AS budg
WHERE amount > (
SELECT SUM(salary) FROM customers AS cust
WHERE cust.level = budg.level
); | {
"outer_table": "budgets",
"inner_table": "customers",
"outer_alias": "budg",
"inner_alias": "cust",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "budg.level",
"token_group": "T2"
} | cs8_fixed_train_09797 | train | T2 |
v2 | Schema:
customers (alias: cust)(status, code, date, amount)
schedules(level, type, status, value)
Task: Find value from customers where a matching record exists in schedules with the same type.
SQL: | SELECT value FROM customers AS cust
WHERE EXISTS (
SELECT 1 FROM schedules AS schd
WHERE schd.type = cust.type
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "cust",
"inner_alias": "schd",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "cust.type",
"token_group": "T1"
} | cs8_fixed_train_09798 | train | T1 |
v2 | Schema:
services (alias: srvc)(status, level, amount, code)
orders(code, salary, value, name)
Task: Retrieve value from services that have at least one corresponding entry in orders sharing the same level.
SQL: | SELECT value FROM services AS srvc
WHERE EXISTS (
SELECT 1 FROM orders AS ord
WHERE ord.level = srvc.level
); | {
"outer_table": "services",
"inner_table": "orders",
"outer_alias": "srvc",
"inner_alias": "ord",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "srvc.level",
"token_group": "T2"
} | cs8_fixed_train_09799 | train | T2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.