variant
stringclasses
3 values
prompt
stringlengths
160
237
sql
stringlengths
102
141
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v1
Schema: employees (alias: emp)(name, code, id, level) shipments(name, status, code, level) Task: Select id from employees where level exists in shipments for the same type. SQL:
SELECT id FROM employees AS emp WHERE level IN ( SELECT level FROM shipments AS shp WHERE shp.type = emp.type );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "emp", "inner_alias": "shp", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "emp.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10200
train
v1
Schema: transactions (alias: txn)(id, value, type, name) branches(salary, type, code, status) Task: Select code from transactions where status exists in branches for the same level. SQL:
SELECT code FROM transactions AS txn WHERE status IN ( SELECT status FROM branches AS brc WHERE brc.level = txn.level );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "txn", "inner_alias": "brc", "proj_col": "code", "filter_col": "status", "join_col": "level", "correlated_ref": "txn.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10201
train
v2
Schema: departments (alias: dept)(amount, value, date, name) invoices(salary, name, date, id) Task: Find value from departments where a matching record exists in invoices with the same status. SQL:
SELECT value FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.status = dept.status );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dept", "inner_alias": "inv", "proj_col": "value", "join_col": "status", "correlated_ref": "dept.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10202
train
v1
Schema: managers (alias: mgr)(date, id, amount, type) categories(value, name, type, date) Task: Select amount from managers where id exists in categories for the same id. SQL:
SELECT amount FROM managers AS mgr WHERE id IN ( SELECT id FROM categories AS catg WHERE catg.id = mgr.id );
{ "outer_table": "managers", "inner_table": "categories", "outer_alias": "mgr", "inner_alias": "catg", "proj_col": "amount", "filter_col": "id", "join_col": "id", "correlated_ref": "mgr.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10203
train
v2
Schema: items (alias: lne)(code, level, id, value) shipments(value, date, id, code) Task: Retrieve id from items that have at least one corresponding entry in shipments sharing the same type. SQL:
SELECT id FROM items AS lne WHERE EXISTS ( SELECT 1 FROM shipments AS shp WHERE shp.type = lne.type );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "lne", "inner_alias": "shp", "proj_col": "id", "join_col": "type", "correlated_ref": "lne.type", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_10204
train
v3
Schema: projects (alias: prj)(value, level, code, name) transactions(level, date, amount, value) Task: Retrieve amount from projects with value above the MIN(value) of transactions rows sharing the same type. SQL:
SELECT amount FROM projects AS prj WHERE value > ( SELECT MIN(value) FROM transactions AS txn WHERE txn.type = prj.type );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "prj", "inner_alias": "txn", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "prj.type", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_10205
train
v2
Schema: regions (alias: rgn)(id, code, type, name) accounts(code, date, status, name) Task: Find id from regions where a matching record exists in accounts with the same level. SQL:
SELECT id FROM regions AS rgn WHERE EXISTS ( SELECT 1 FROM accounts AS acct WHERE acct.level = rgn.level );
{ "outer_table": "regions", "inner_table": "accounts", "outer_alias": "rgn", "inner_alias": "acct", "proj_col": "id", "join_col": "level", "correlated_ref": "rgn.level", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_10206
train
v3
Schema: requests (alias: ordr)(salary, name, amount, status) shipments(date, value, salary, level) Task: Retrieve amount from requests with salary above the MAX(value) of shipments rows sharing the same code. SQL:
SELECT amount FROM requests AS ordr WHERE salary > ( SELECT MAX(value) FROM shipments AS shp WHERE shp.code = ordr.code );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ordr", "inner_alias": "shp", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "ordr.code", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_10207
train
v1
Schema: staff (alias: empl)(status, value, salary, name) products(date, type, name, code) Task: Select value from staff where status exists in products for the same level. SQL:
SELECT value FROM staff AS empl WHERE status IN ( SELECT status FROM products AS prod WHERE prod.level = empl.level );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "empl", "inner_alias": "prod", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "empl.level", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_10208
train
v1
Schema: tasks (alias: tsk)(date, amount, salary, name) departments(code, type, salary, amount) Task: Retrieve code from tasks whose level is found in departments rows where type matches the outer record. SQL:
SELECT code FROM tasks AS tsk WHERE level IN ( SELECT level FROM departments AS dept WHERE dept.type = tsk.type );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "tsk", "inner_alias": "dept", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "tsk.type", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_10209
train
v2
Schema: staff (alias: empl)(value, code, id, name) items(id, name, level, salary) Task: Retrieve name from staff that have at least one corresponding entry in items sharing the same code. SQL:
SELECT name FROM staff AS empl WHERE EXISTS ( SELECT 1 FROM items AS lne WHERE lne.code = empl.code );
{ "outer_table": "staff", "inner_table": "items", "outer_alias": "empl", "inner_alias": "lne", "proj_col": "name", "join_col": "code", "correlated_ref": "empl.code", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_10210
train
v1
Schema: customers (alias: cust)(salary, level, amount, name) schedules(status, level, value, id) Task: Select amount from customers where status exists in schedules for the same type. SQL:
SELECT amount FROM customers AS cust WHERE status IN ( SELECT status FROM schedules AS schd WHERE schd.type = cust.type );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "cust", "inner_alias": "schd", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "cust.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10211
train
v1
Schema: invoices (alias: inv)(value, level, status, type) staff(level, value, type, id) Task: Find amount from invoices where id appears in staff entries with matching code. SQL:
SELECT amount FROM invoices AS inv WHERE id IN ( SELECT id FROM staff AS empl WHERE empl.code = inv.code );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "inv", "inner_alias": "empl", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "inv.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10212
train
v2
Schema: accounts (alias: acct)(salary, id, code, level) products(level, id, value, date) Task: Retrieve value from accounts that have at least one corresponding entry in products sharing the same status. SQL:
SELECT value FROM accounts AS acct WHERE EXISTS ( SELECT 1 FROM products AS prod WHERE prod.status = acct.status );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "acct", "inner_alias": "prod", "proj_col": "value", "join_col": "status", "correlated_ref": "acct.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10213
train
v2
Schema: orders (alias: ord)(code, date, status, name) managers(amount, date, status, type) Task: Retrieve id from orders that have at least one corresponding entry in managers sharing the same level. SQL:
SELECT id FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM managers AS mgr WHERE mgr.level = ord.level );
{ "outer_table": "orders", "inner_table": "managers", "outer_alias": "ord", "inner_alias": "mgr", "proj_col": "id", "join_col": "level", "correlated_ref": "ord.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10214
train
v2
Schema: items (alias: lne)(value, salary, date, name) shipments(code, name, amount, id) Task: Retrieve id from items that have at least one corresponding entry in shipments sharing the same status. SQL:
SELECT id FROM items AS lne WHERE EXISTS ( SELECT 1 FROM shipments AS shp WHERE shp.status = lne.status );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "lne", "inner_alias": "shp", "proj_col": "id", "join_col": "status", "correlated_ref": "lne.status", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_10215
train
v3
Schema: invoices (alias: inv)(date, type, name, status) sales(status, date, salary, amount) Task: Retrieve name from invoices with salary above the MIN(value) of sales rows sharing the same id. SQL:
SELECT name FROM invoices AS inv WHERE salary > ( SELECT MIN(value) FROM sales AS sale WHERE sale.id = inv.id );
{ "outer_table": "invoices", "inner_table": "sales", "outer_alias": "inv", "inner_alias": "sale", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "inv.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10216
train
v1
Schema: staff (alias: empl)(date, status, id, type) managers(name, amount, code, type) Task: Find name from staff where status appears in managers entries with matching id. SQL:
SELECT name FROM staff AS empl WHERE status IN ( SELECT status FROM managers AS mgr WHERE mgr.id = empl.id );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "empl", "inner_alias": "mgr", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "empl.id", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_10217
train
v3
Schema: schedules (alias: schd)(code, value, status, id) categories(type, name, amount, level) Task: Retrieve amount from schedules with amount above the COUNT(amount) of categories rows sharing the same level. SQL:
SELECT amount FROM schedules AS schd WHERE amount > ( SELECT COUNT(amount) FROM categories AS catg WHERE catg.level = schd.level );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "schd", "inner_alias": "catg", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "schd.level", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_10218
train
v3
Schema: items (alias: lne)(date, type, value, name) regions(name, salary, code, date) Task: Find value from items where value exceeds the total amount from regions for the same status. SQL:
SELECT value FROM items AS lne WHERE value > ( SELECT SUM(amount) FROM regions AS rgn WHERE rgn.status = lne.status );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "lne", "inner_alias": "rgn", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "lne.status", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_10219
train
v1
Schema: accounts (alias: acct)(id, level, status, value) requests(date, salary, name, type) Task: Select salary from accounts where code exists in requests for the same id. SQL:
SELECT salary FROM accounts AS acct WHERE code IN ( SELECT code FROM requests AS ordr WHERE ordr.id = acct.id );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "acct", "inner_alias": "ordr", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "acct.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10220
train
v3
Schema: projects (alias: prj)(status, id, salary, type) customers(salary, level, value, code) Task: Retrieve id from projects with salary above the SUM(amount) of customers rows sharing the same code. SQL:
SELECT id FROM projects AS prj WHERE salary > ( SELECT SUM(amount) FROM customers AS cust WHERE cust.code = prj.code );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "prj", "inner_alias": "cust", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "prj.code", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_10221
train
v2
Schema: invoices (alias: inv)(type, salary, amount, value) staff(value, code, amount, name) Task: Retrieve salary from invoices that have at least one corresponding entry in staff sharing the same status. SQL:
SELECT salary FROM invoices AS inv WHERE EXISTS ( SELECT 1 FROM staff AS empl WHERE empl.status = inv.status );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "inv", "inner_alias": "empl", "proj_col": "salary", "join_col": "status", "correlated_ref": "inv.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10222
train
v3
Schema: orders (alias: ord)(code, id, type, level) schedules(status, name, type, date) Task: Find salary from orders where salary exceeds the total amount from schedules for the same code. SQL:
SELECT salary FROM orders AS ord WHERE salary > ( SELECT SUM(amount) FROM schedules AS schd WHERE schd.code = ord.code );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "ord", "inner_alias": "schd", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "ord.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10223
train
v2
Schema: employees (alias: emp)(value, status, name, date) orders(salary, amount, name, level) Task: Retrieve code from employees that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT code FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM orders AS ord WHERE ord.type = emp.type );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "emp", "inner_alias": "ord", "proj_col": "code", "join_col": "type", "correlated_ref": "emp.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10224
train
v2
Schema: categories (alias: catg)(level, status, type, code) requests(name, code, level, status) Task: Find value from categories where a matching record exists in requests with the same level. SQL:
SELECT value FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.level = catg.level );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "catg", "inner_alias": "ordr", "proj_col": "value", "join_col": "level", "correlated_ref": "catg.level", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_10225
train
v2
Schema: products (alias: prod)(date, name, type, id) items(type, status, amount, value) Task: Find value from products where a matching record exists in items with the same id. SQL:
SELECT value FROM products AS prod WHERE EXISTS ( SELECT 1 FROM items AS lne WHERE lne.id = prod.id );
{ "outer_table": "products", "inner_table": "items", "outer_alias": "prod", "inner_alias": "lne", "proj_col": "value", "join_col": "id", "correlated_ref": "prod.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10226
train
v2
Schema: shipments (alias: shp)(code, name, level, value) schedules(date, level, name, salary) Task: Retrieve salary from shipments that have at least one corresponding entry in schedules sharing the same type. SQL:
SELECT salary FROM shipments AS shp WHERE EXISTS ( SELECT 1 FROM schedules AS schd WHERE schd.type = shp.type );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "shp", "inner_alias": "schd", "proj_col": "salary", "join_col": "type", "correlated_ref": "shp.type", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_10227
train
v3
Schema: shipments (alias: shp)(id, value, name, code) regions(name, level, status, value) Task: Find amount from shipments where salary exceeds the minimum value from regions for the same level. SQL:
SELECT amount FROM shipments AS shp WHERE salary > ( SELECT MIN(value) FROM regions AS rgn WHERE rgn.level = shp.level );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "shp", "inner_alias": "rgn", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "shp.level", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_10228
train
v2
Schema: managers (alias: mgr)(id, date, level, code) departments(type, status, name, amount) Task: Find name from managers where a matching record exists in departments with the same type. SQL:
SELECT name FROM managers AS mgr WHERE EXISTS ( SELECT 1 FROM departments AS dept WHERE dept.type = mgr.type );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "mgr", "inner_alias": "dept", "proj_col": "name", "join_col": "type", "correlated_ref": "mgr.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10229
train
v1
Schema: requests (alias: ordr)(type, level, status, date) branches(type, level, id, date) Task: Retrieve id from requests whose code is found in branches rows where type matches the outer record. SQL:
SELECT id FROM requests AS ordr WHERE code IN ( SELECT code FROM branches AS brc WHERE brc.type = ordr.type );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ordr", "inner_alias": "brc", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "ordr.type", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_10230
train
v1
Schema: orders (alias: ord)(amount, date, level, type) accounts(id, date, level, status) Task: Select amount from orders where id exists in accounts for the same code. SQL:
SELECT amount FROM orders AS ord WHERE id IN ( SELECT id FROM accounts AS acct WHERE acct.code = ord.code );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "ord", "inner_alias": "acct", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "ord.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10231
train
v3
Schema: tasks (alias: tsk)(id, amount, code, type) sales(id, salary, name, amount) Task: Find value from tasks where value exceeds the average salary from sales for the same type. SQL:
SELECT value FROM tasks AS tsk WHERE value > ( SELECT AVG(salary) FROM sales AS sale WHERE sale.type = tsk.type );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "tsk", "inner_alias": "sale", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "tsk.type", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_10232
train
v1
Schema: products (alias: prod)(status, code, name, type) transactions(type, id, amount, salary) Task: Select amount from products where status exists in transactions for the same level. SQL:
SELECT amount FROM products AS prod WHERE status IN ( SELECT status FROM transactions AS txn WHERE txn.level = prod.level );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "prod", "inner_alias": "txn", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "prod.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10233
train
v2
Schema: orders (alias: ord)(date, code, id, value) items(code, type, amount, name) Task: Retrieve id from orders that have at least one corresponding entry in items sharing the same level. SQL:
SELECT id FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM items AS lne WHERE lne.level = ord.level );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "ord", "inner_alias": "lne", "proj_col": "id", "join_col": "level", "correlated_ref": "ord.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10234
train
v3
Schema: requests (alias: ordr)(date, code, type, name) transactions(level, date, amount, id) Task: Retrieve code from requests with salary above the AVG(value) of transactions rows sharing the same status. SQL:
SELECT code FROM requests AS ordr WHERE salary > ( SELECT AVG(value) FROM transactions AS txn WHERE txn.status = ordr.status );
{ "outer_table": "requests", "inner_table": "transactions", "outer_alias": "ordr", "inner_alias": "txn", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "ordr.status", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_10235
train
v1
Schema: employees (alias: emp)(level, value, id, name) branches(level, name, id, amount) Task: Select name from employees where status exists in branches for the same id. SQL:
SELECT name FROM employees AS emp WHERE status IN ( SELECT status FROM branches AS brc WHERE brc.id = emp.id );
{ "outer_table": "employees", "inner_table": "branches", "outer_alias": "emp", "inner_alias": "brc", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "emp.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10236
train
v2
Schema: customers (alias: cust)(type, salary, value, date) requests(id, level, date, name) Task: Find value from customers where a matching record exists in requests with the same status. SQL:
SELECT value FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.status = cust.status );
{ "outer_table": "customers", "inner_table": "requests", "outer_alias": "cust", "inner_alias": "ordr", "proj_col": "value", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10237
train
v2
Schema: departments (alias: dept)(type, name, date, salary) regions(value, salary, name, code) Task: Find amount from departments where a matching record exists in regions with the same type. SQL:
SELECT amount FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM regions AS rgn WHERE rgn.type = dept.type );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dept", "inner_alias": "rgn", "proj_col": "amount", "join_col": "type", "correlated_ref": "dept.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10238
train
v1
Schema: orders (alias: ord)(value, id, date, code) sales(code, name, id, amount) Task: Retrieve value from orders whose id is found in sales rows where id matches the outer record. SQL:
SELECT value FROM orders AS ord WHERE id IN ( SELECT id FROM sales AS sale WHERE sale.id = ord.id );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "ord", "inner_alias": "sale", "proj_col": "value", "filter_col": "id", "join_col": "id", "correlated_ref": "ord.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10239
train
v3
Schema: schedules (alias: schd)(value, level, code, type) transactions(type, status, salary, level) Task: Retrieve amount from schedules with amount above the SUM(amount) of transactions rows sharing the same id. SQL:
SELECT amount FROM schedules AS schd WHERE amount > ( SELECT SUM(amount) FROM transactions AS txn WHERE txn.id = schd.id );
{ "outer_table": "schedules", "inner_table": "transactions", "outer_alias": "schd", "inner_alias": "txn", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "schd.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_10240
train
v3
Schema: categories (alias: catg)(id, salary, type, value) schedules(date, id, level, amount) Task: Retrieve name from categories with value above the MAX(value) of schedules rows sharing the same type. SQL:
SELECT name FROM categories AS catg WHERE value > ( SELECT MAX(value) FROM schedules AS schd WHERE schd.type = catg.type );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "catg", "inner_alias": "schd", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "catg.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_10241
train
v1
Schema: customers (alias: cust)(amount, status, name, date) schedules(level, code, name, value) Task: Find id from customers where type appears in schedules entries with matching level. SQL:
SELECT id FROM customers AS cust WHERE type IN ( SELECT type FROM schedules AS schd WHERE schd.level = cust.level );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "cust", "inner_alias": "schd", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "cust.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10242
train
v3
Schema: requests (alias: ordr)(status, salary, name, amount) staff(id, code, date, value) Task: Retrieve id from requests with amount above the AVG(salary) of staff rows sharing the same code. SQL:
SELECT id FROM requests AS ordr WHERE amount > ( SELECT AVG(salary) FROM staff AS empl WHERE empl.code = ordr.code );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ordr", "inner_alias": "empl", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "ordr.code", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_10243
train
v1
Schema: staff (alias: empl)(level, amount, type, status) invoices(salary, name, level, amount) Task: Select amount from staff where status exists in invoices for the same status. SQL:
SELECT amount FROM staff AS empl WHERE status IN ( SELECT status FROM invoices AS inv WHERE inv.status = empl.status );
{ "outer_table": "staff", "inner_table": "invoices", "outer_alias": "empl", "inner_alias": "inv", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "empl.status", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_10244
train
v2
Schema: sales (alias: sale)(salary, code, type, name) orders(amount, id, date, salary) Task: Retrieve id from sales that have at least one corresponding entry in orders sharing the same status. SQL:
SELECT id FROM sales AS sale WHERE EXISTS ( SELECT 1 FROM orders AS ord WHERE ord.status = sale.status );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "sale", "inner_alias": "ord", "proj_col": "id", "join_col": "status", "correlated_ref": "sale.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10245
train
v1
Schema: orders (alias: ord)(code, value, level, amount) customers(type, level, id, code) Task: Find salary from orders where type appears in customers entries with matching id. SQL:
SELECT salary FROM orders AS ord WHERE type IN ( SELECT type FROM customers AS cust WHERE cust.id = ord.id );
{ "outer_table": "orders", "inner_table": "customers", "outer_alias": "ord", "inner_alias": "cust", "proj_col": "salary", "filter_col": "type", "join_col": "id", "correlated_ref": "ord.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10246
train
v1
Schema: orders (alias: ord)(value, date, name, type) regions(salary, name, date, code) Task: Select code from orders where level exists in regions for the same status. SQL:
SELECT code FROM orders AS ord WHERE level IN ( SELECT level FROM regions AS rgn WHERE rgn.status = ord.status );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "ord", "inner_alias": "rgn", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "ord.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10247
train
v3
Schema: employees (alias: emp)(salary, code, status, date) projects(value, code, name, salary) Task: Find code from employees where salary exceeds the minimum amount from projects for the same code. SQL:
SELECT code FROM employees AS emp WHERE salary > ( SELECT MIN(amount) FROM projects AS prj WHERE prj.code = emp.code );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "emp", "inner_alias": "prj", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10248
train
v2
Schema: employees (alias: emp)(amount, status, level, value) sales(amount, value, type, date) Task: Retrieve name from employees that have at least one corresponding entry in sales sharing the same code. SQL:
SELECT name FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM sales AS sale WHERE sale.code = emp.code );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "emp", "inner_alias": "sale", "proj_col": "name", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10249
train
v2
Schema: tasks (alias: tsk)(date, type, amount, level) departments(value, amount, date, level) Task: Retrieve name from tasks that have at least one corresponding entry in departments sharing the same id. SQL:
SELECT name FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM departments AS dept WHERE dept.id = tsk.id );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "tsk", "inner_alias": "dept", "proj_col": "name", "join_col": "id", "correlated_ref": "tsk.id", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_10250
train
v2
Schema: categories (alias: catg)(amount, salary, status, code) projects(type, level, salary, code) Task: Find code from categories where a matching record exists in projects with the same id. SQL:
SELECT code FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM projects AS prj WHERE prj.id = catg.id );
{ "outer_table": "categories", "inner_table": "projects", "outer_alias": "catg", "inner_alias": "prj", "proj_col": "code", "join_col": "id", "correlated_ref": "catg.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_10251
train
v1
Schema: products (alias: prod)(status, amount, type, id) accounts(date, code, amount, type) Task: Select salary from products where code exists in accounts for the same status. SQL:
SELECT salary FROM products AS prod WHERE code IN ( SELECT code FROM accounts AS acct WHERE acct.status = prod.status );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "prod", "inner_alias": "acct", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "prod.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10252
train
v2
Schema: shipments (alias: shp)(date, type, code, level) requests(value, amount, status, id) Task: Find code from shipments where a matching record exists in requests with the same type. SQL:
SELECT code FROM shipments AS shp WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.type = shp.type );
{ "outer_table": "shipments", "inner_table": "requests", "outer_alias": "shp", "inner_alias": "ordr", "proj_col": "code", "join_col": "type", "correlated_ref": "shp.type", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_10253
train
v3
Schema: tasks (alias: tsk)(date, salary, level, type) customers(type, name, date, value) Task: Find id from tasks where salary exceeds the maximum value from customers for the same code. SQL:
SELECT id FROM tasks AS tsk WHERE salary > ( SELECT MAX(value) FROM customers AS cust WHERE cust.code = tsk.code );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "tsk", "inner_alias": "cust", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "tsk.code", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_10254
train
v1
Schema: shipments (alias: shp)(salary, date, status, amount) sales(id, amount, status, salary) Task: Retrieve id from shipments whose status is found in sales rows where level matches the outer record. SQL:
SELECT id FROM shipments AS shp WHERE status IN ( SELECT status FROM sales AS sale WHERE sale.level = shp.level );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "shp", "inner_alias": "sale", "proj_col": "id", "filter_col": "status", "join_col": "level", "correlated_ref": "shp.level", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_10255
train
v3
Schema: branches (alias: brc)(date, status, id, value) requests(name, value, type, level) Task: Retrieve code from branches with amount above the COUNT(salary) of requests rows sharing the same status. SQL:
SELECT code FROM branches AS brc WHERE amount > ( SELECT COUNT(salary) FROM requests AS ordr WHERE ordr.status = brc.status );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "brc", "inner_alias": "ordr", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "brc.status", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_10256
train
v1
Schema: schedules (alias: schd)(amount, status, date, type) requests(id, date, level, type) Task: Find id from schedules where status appears in requests entries with matching code. SQL:
SELECT id FROM schedules AS schd WHERE status IN ( SELECT status FROM requests AS ordr WHERE ordr.code = schd.code );
{ "outer_table": "schedules", "inner_table": "requests", "outer_alias": "schd", "inner_alias": "ordr", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "schd.code", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_10257
train
v1
Schema: orders (alias: ord)(value, amount, date, code) schedules(type, code, amount, date) Task: Find value from orders where id appears in schedules entries with matching id. SQL:
SELECT value FROM orders AS ord WHERE id IN ( SELECT id FROM schedules AS schd WHERE schd.id = ord.id );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "ord", "inner_alias": "schd", "proj_col": "value", "filter_col": "id", "join_col": "id", "correlated_ref": "ord.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10258
train
v1
Schema: regions (alias: rgn)(date, code, value, level) shipments(status, value, amount, date) Task: Retrieve amount from regions whose id is found in shipments rows where id matches the outer record. SQL:
SELECT amount FROM regions AS rgn WHERE id IN ( SELECT id FROM shipments AS shp WHERE shp.id = rgn.id );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "rgn", "inner_alias": "shp", "proj_col": "amount", "filter_col": "id", "join_col": "id", "correlated_ref": "rgn.id", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_10259
train
v3
Schema: staff (alias: empl)(name, amount, id, value) employees(name, type, date, value) Task: Retrieve code from staff with amount above the SUM(salary) of employees rows sharing the same status. SQL:
SELECT code FROM staff AS empl WHERE amount > ( SELECT SUM(salary) FROM employees AS emp WHERE emp.status = empl.status );
{ "outer_table": "staff", "inner_table": "employees", "outer_alias": "empl", "inner_alias": "emp", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "empl.status", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_10260
train
v3
Schema: projects (alias: prj)(status, value, date, name) transactions(value, date, amount, code) Task: Find name from projects where salary exceeds the count of salary from transactions for the same code. SQL:
SELECT name FROM projects AS prj WHERE salary > ( SELECT COUNT(salary) FROM transactions AS txn WHERE txn.code = prj.code );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "prj", "inner_alias": "txn", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "prj.code", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_10261
train
v3
Schema: tasks (alias: tsk)(date, code, level, amount) staff(salary, amount, status, type) Task: Find amount from tasks where value exceeds the average amount from staff for the same type. SQL:
SELECT amount FROM tasks AS tsk WHERE value > ( SELECT AVG(amount) FROM staff AS empl WHERE empl.type = tsk.type );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "tsk", "inner_alias": "empl", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "tsk.type", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_10262
train
v2
Schema: items (alias: lne)(type, name, value, id) customers(level, name, salary, id) Task: Retrieve id from items that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT id FROM items AS lne WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.type = lne.type );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "lne", "inner_alias": "cust", "proj_col": "id", "join_col": "type", "correlated_ref": "lne.type", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_10263
train
v2
Schema: customers (alias: cust)(salary, amount, date, value) requests(date, value, type, level) Task: Retrieve value from customers that have at least one corresponding entry in requests sharing the same id. SQL:
SELECT value FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.id = cust.id );
{ "outer_table": "customers", "inner_table": "requests", "outer_alias": "cust", "inner_alias": "ordr", "proj_col": "value", "join_col": "id", "correlated_ref": "cust.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10264
train
v2
Schema: categories (alias: catg)(type, status, name, salary) customers(name, status, date, level) Task: Retrieve name from categories that have at least one corresponding entry in customers sharing the same code. SQL:
SELECT name FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.code = catg.code );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "catg", "inner_alias": "cust", "proj_col": "name", "join_col": "code", "correlated_ref": "catg.code", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_10265
train
v2
Schema: accounts (alias: acct)(amount, name, code, date) categories(date, level, salary, code) Task: Find name from accounts where a matching record exists in categories with the same status. SQL:
SELECT name FROM accounts AS acct WHERE EXISTS ( SELECT 1 FROM categories AS catg WHERE catg.status = acct.status );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "acct", "inner_alias": "catg", "proj_col": "name", "join_col": "status", "correlated_ref": "acct.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10266
train
v1
Schema: items (alias: lne)(salary, id, name, status) categories(name, id, status, value) Task: Select id from items where status exists in categories for the same id. SQL:
SELECT id FROM items AS lne WHERE status IN ( SELECT status FROM categories AS catg WHERE catg.id = lne.id );
{ "outer_table": "items", "inner_table": "categories", "outer_alias": "lne", "inner_alias": "catg", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "lne.id", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_10267
train
v1
Schema: tasks (alias: tsk)(value, id, level, name) managers(id, status, salary, date) Task: Retrieve salary from tasks whose status is found in managers rows where level matches the outer record. SQL:
SELECT salary FROM tasks AS tsk WHERE status IN ( SELECT status FROM managers AS mgr WHERE mgr.level = tsk.level );
{ "outer_table": "tasks", "inner_table": "managers", "outer_alias": "tsk", "inner_alias": "mgr", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "tsk.level", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_10268
train
v3
Schema: items (alias: lne)(status, level, salary, type) sales(id, value, name, type) Task: Retrieve code from items with value above the MAX(salary) of sales rows sharing the same id. SQL:
SELECT code FROM items AS lne WHERE value > ( SELECT MAX(salary) FROM sales AS sale WHERE sale.id = lne.id );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "lne", "inner_alias": "sale", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "lne.id", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_10269
train
v3
Schema: customers (alias: cust)(code, amount, salary, date) employees(level, type, salary, name) Task: Retrieve id from customers with salary above the AVG(amount) of employees rows sharing the same type. SQL:
SELECT id FROM customers AS cust WHERE salary > ( SELECT AVG(amount) FROM employees AS emp WHERE emp.type = cust.type );
{ "outer_table": "customers", "inner_table": "employees", "outer_alias": "cust", "inner_alias": "emp", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "cust.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10270
train
v2
Schema: departments (alias: dept)(id, date, level, code) categories(salary, type, name, id) Task: Retrieve id from departments that have at least one corresponding entry in categories sharing the same code. SQL:
SELECT id FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM categories AS catg WHERE catg.code = dept.code );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dept", "inner_alias": "catg", "proj_col": "id", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10271
train
v3
Schema: categories (alias: catg)(id, amount, type, code) schedules(level, salary, date, id) Task: Find value from categories where amount exceeds the total amount from schedules for the same type. SQL:
SELECT value FROM categories AS catg WHERE amount > ( SELECT SUM(amount) FROM schedules AS schd WHERE schd.type = catg.type );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "catg", "inner_alias": "schd", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "catg.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_10272
train
v3
Schema: tasks (alias: tsk)(amount, type, date, level) staff(type, status, name, level) Task: Retrieve value from tasks with salary above the SUM(salary) of staff rows sharing the same id. SQL:
SELECT value FROM tasks AS tsk WHERE salary > ( SELECT SUM(salary) FROM staff AS empl WHERE empl.id = tsk.id );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "tsk", "inner_alias": "empl", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "tsk.id", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_10273
train
v3
Schema: transactions (alias: txn)(code, value, type, level) projects(status, name, salary, date) Task: Retrieve code from transactions with amount above the MIN(amount) of projects rows sharing the same level. SQL:
SELECT code FROM transactions AS txn WHERE amount > ( SELECT MIN(amount) FROM projects AS prj WHERE prj.level = txn.level );
{ "outer_table": "transactions", "inner_table": "projects", "outer_alias": "txn", "inner_alias": "prj", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "txn.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10274
train
v3
Schema: invoices (alias: inv)(salary, level, value, id) products(amount, type, salary, value) Task: Find id from invoices where amount exceeds the maximum amount from products for the same id. SQL:
SELECT id FROM invoices AS inv WHERE amount > ( SELECT MAX(amount) FROM products AS prod WHERE prod.id = inv.id );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "inv", "inner_alias": "prod", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "inv.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10275
train
v2
Schema: transactions (alias: txn)(id, date, salary, status) items(value, name, amount, salary) Task: Retrieve amount from transactions that have at least one corresponding entry in items sharing the same level. SQL:
SELECT amount FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM items AS lne WHERE lne.level = txn.level );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "txn", "inner_alias": "lne", "proj_col": "amount", "join_col": "level", "correlated_ref": "txn.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10276
train
v2
Schema: branches (alias: brc)(code, status, name, salary) invoices(amount, type, level, date) Task: Retrieve amount from branches that have at least one corresponding entry in invoices sharing the same type. SQL:
SELECT amount FROM branches AS brc WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.type = brc.type );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "brc", "inner_alias": "inv", "proj_col": "amount", "join_col": "type", "correlated_ref": "brc.type", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_10277
train
v1
Schema: departments (alias: dept)(date, salary, level, value) tasks(code, value, status, level) Task: Select amount from departments where id exists in tasks for the same type. SQL:
SELECT amount FROM departments AS dept WHERE id IN ( SELECT id FROM tasks AS tsk WHERE tsk.type = dept.type );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dept", "inner_alias": "tsk", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "dept.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10278
train
v1
Schema: orders (alias: ord)(amount, value, salary, type) requests(amount, date, type, value) Task: Select amount from orders where type exists in requests for the same id. SQL:
SELECT amount FROM orders AS ord WHERE type IN ( SELECT type FROM requests AS ordr WHERE ordr.id = ord.id );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "ord", "inner_alias": "ordr", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "ord.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10279
train
v2
Schema: customers (alias: cust)(id, code, date, type) managers(status, code, salary, id) Task: Retrieve id from customers that have at least one corresponding entry in managers sharing the same type. SQL:
SELECT id FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM managers AS mgr WHERE mgr.type = cust.type );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "cust", "inner_alias": "mgr", "proj_col": "id", "join_col": "type", "correlated_ref": "cust.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10280
train
v3
Schema: sales (alias: sale)(code, value, type, id) requests(id, type, name, code) Task: Retrieve salary from sales with amount above the MAX(salary) of requests rows sharing the same type. SQL:
SELECT salary FROM sales AS sale WHERE amount > ( SELECT MAX(salary) FROM requests AS ordr WHERE ordr.type = sale.type );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "sale", "inner_alias": "ordr", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "sale.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10281
train
v1
Schema: projects (alias: prj)(level, value, name, salary) categories(type, id, status, date) Task: Retrieve salary from projects whose code is found in categories rows where id matches the outer record. SQL:
SELECT salary FROM projects AS prj WHERE code IN ( SELECT code FROM categories AS catg WHERE catg.id = prj.id );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "prj", "inner_alias": "catg", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "prj.id", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_10282
train
v1
Schema: categories (alias: catg)(salary, name, code, type) staff(id, level, date, salary) Task: Retrieve amount from categories whose type is found in staff rows where type matches the outer record. SQL:
SELECT amount FROM categories AS catg WHERE type IN ( SELECT type FROM staff AS empl WHERE empl.type = catg.type );
{ "outer_table": "categories", "inner_table": "staff", "outer_alias": "catg", "inner_alias": "empl", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "catg.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_10283
train
v1
Schema: transactions (alias: txn)(value, name, amount, level) customers(code, date, amount, level) Task: Select name from transactions where level exists in customers for the same code. SQL:
SELECT name FROM transactions AS txn WHERE level IN ( SELECT level FROM customers AS cust WHERE cust.code = txn.code );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "txn", "inner_alias": "cust", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "txn.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10284
train
v2
Schema: projects (alias: prj)(level, date, status, amount) tasks(value, level, date, amount) Task: Find salary from projects where a matching record exists in tasks with the same id. SQL:
SELECT salary FROM projects AS prj WHERE EXISTS ( SELECT 1 FROM tasks AS tsk WHERE tsk.id = prj.id );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "prj", "inner_alias": "tsk", "proj_col": "salary", "join_col": "id", "correlated_ref": "prj.id", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_10285
train
v1
Schema: orders (alias: ord)(date, status, amount, name) branches(level, type, date, code) Task: Select name from orders where level exists in branches for the same status. SQL:
SELECT name FROM orders AS ord WHERE level IN ( SELECT level FROM branches AS brc WHERE brc.status = ord.status );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "ord", "inner_alias": "brc", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "ord.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10286
train
v3
Schema: schedules (alias: schd)(value, status, amount, name) items(salary, code, id, status) Task: Find value from schedules where value exceeds the total amount from items for the same type. SQL:
SELECT value FROM schedules AS schd WHERE value > ( SELECT SUM(amount) FROM items AS lne WHERE lne.type = schd.type );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "schd", "inner_alias": "lne", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "schd.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_10287
train
v3
Schema: requests (alias: ordr)(status, salary, name, value) staff(code, id, level, name) Task: Retrieve value from requests with salary above the SUM(amount) of staff rows sharing the same code. SQL:
SELECT value FROM requests AS ordr WHERE salary > ( SELECT SUM(amount) FROM staff AS empl WHERE empl.code = ordr.code );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ordr", "inner_alias": "empl", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "ordr.code", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_10288
train
v1
Schema: orders (alias: ord)(id, name, level, date) employees(value, amount, id, date) Task: Select amount from orders where level exists in employees for the same id. SQL:
SELECT amount 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": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "ord.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10289
train
v1
Schema: regions (alias: rgn)(amount, date, level, status) schedules(status, name, code, level) Task: Retrieve salary from regions whose type is found in schedules rows where code matches the outer record. SQL:
SELECT salary FROM regions AS rgn WHERE type IN ( SELECT type FROM schedules AS schd WHERE schd.code = rgn.code );
{ "outer_table": "regions", "inner_table": "schedules", "outer_alias": "rgn", "inner_alias": "schd", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "rgn.code", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_10290
train
v1
Schema: schedules (alias: schd)(value, date, salary, type) shipments(type, status, id, amount) Task: Find name from schedules where type appears in shipments entries with matching status. SQL:
SELECT name FROM schedules AS schd WHERE type IN ( SELECT type FROM shipments AS shp WHERE shp.status = schd.status );
{ "outer_table": "schedules", "inner_table": "shipments", "outer_alias": "schd", "inner_alias": "shp", "proj_col": "name", "filter_col": "type", "join_col": "status", "correlated_ref": "schd.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_10291
train
v3
Schema: accounts (alias: acct)(date, id, code, amount) items(code, name, date, level) Task: Find code from accounts where salary exceeds the average salary from items for the same code. SQL:
SELECT code FROM accounts AS acct WHERE salary > ( SELECT AVG(salary) FROM items AS lne WHERE lne.code = acct.code );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "acct", "inner_alias": "lne", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "acct.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10292
train
v1
Schema: transactions (alias: txn)(name, status, amount, value) items(date, id, code, amount) Task: Find code from transactions where type appears in items entries with matching status. SQL:
SELECT code FROM transactions AS txn WHERE type IN ( SELECT type FROM items AS lne WHERE lne.status = txn.status );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "txn", "inner_alias": "lne", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "txn.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10293
train
v2
Schema: accounts (alias: acct)(type, date, name, id) products(level, code, type, value) Task: Find id from accounts where a matching record exists in products with the same id. SQL:
SELECT id FROM accounts AS acct WHERE EXISTS ( SELECT 1 FROM products AS prod WHERE prod.id = acct.id );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "acct", "inner_alias": "prod", "proj_col": "id", "join_col": "id", "correlated_ref": "acct.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10294
train
v2
Schema: regions (alias: rgn)(code, amount, level, date) categories(date, level, value, status) Task: Find name from regions where a matching record exists in categories with the same status. SQL:
SELECT name FROM regions AS rgn WHERE EXISTS ( SELECT 1 FROM categories AS catg WHERE catg.status = rgn.status );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "rgn", "inner_alias": "catg", "proj_col": "name", "join_col": "status", "correlated_ref": "rgn.status", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_10295
train
v3
Schema: invoices (alias: inv)(salary, amount, type, name) accounts(id, salary, level, name) Task: Find code from invoices where amount exceeds the minimum amount from accounts for the same status. SQL:
SELECT code FROM invoices AS inv WHERE amount > ( SELECT MIN(amount) FROM accounts AS acct WHERE acct.status = inv.status );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "inv", "inner_alias": "acct", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "inv.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10296
train
v1
Schema: orders (alias: ord)(code, status, level, amount) transactions(id, status, name, amount) Task: Select salary from orders where level exists in transactions for the same id. SQL:
SELECT salary FROM orders AS ord WHERE level IN ( SELECT level FROM transactions AS txn WHERE txn.id = ord.id );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "ord", "inner_alias": "txn", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "ord.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10297
train
v2
Schema: transactions (alias: txn)(level, value, salary, id) employees(date, code, value, status) Task: Find amount from transactions where a matching record exists in employees with the same type. SQL:
SELECT amount FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.type = txn.type );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "txn", "inner_alias": "emp", "proj_col": "amount", "join_col": "type", "correlated_ref": "txn.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10298
train
v3
Schema: customers (alias: cust)(date, amount, level, name) projects(status, salary, amount, type) Task: Find name from customers where value exceeds the maximum value from projects for the same code. SQL:
SELECT name FROM customers AS cust WHERE value > ( SELECT MAX(value) FROM projects AS prj WHERE prj.code = cust.code );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "cust", "inner_alias": "prj", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "cust.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_10299
train