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: projects (alias: prj)(type, date, status, value) staff(code, type, id, amount) Task: Retrieve value from projects whose type is found in staff rows where type matches the outer record. SQL:
SELECT value FROM projects AS prj WHERE type IN ( SELECT type FROM staff AS empl WHERE empl.type = prj.type );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "prj", "inner_alias": "empl", "proj_col": "value", "filter_col": "type", "join_col": "type", "correlated_ref": "prj.type", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_08900
train
v3
Schema: projects (alias: prj)(date, status, level, type) schedules(amount, id, name, status) Task: Retrieve value from projects with value above the MAX(amount) of schedules rows sharing the same level. SQL:
SELECT value FROM projects AS prj WHERE value > ( SELECT MAX(amount) FROM schedules AS schd WHERE schd.level = prj.level );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "prj", "inner_alias": "schd", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "prj.level", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_08901
train
v1
Schema: accounts (alias: acct)(salary, amount, status, name) regions(code, level, value, salary) Task: Retrieve value from accounts whose level is found in regions rows where status matches the outer record. SQL:
SELECT value FROM accounts AS acct WHERE level IN ( SELECT level FROM regions AS rgn WHERE rgn.status = acct.status );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "acct", "inner_alias": "rgn", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "acct.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08902
train
v3
Schema: items (alias: lne)(level, name, code, id) requests(level, salary, date, type) Task: Retrieve code from items with value above the COUNT(value) of requests rows sharing the same code. SQL:
SELECT code FROM items AS lne WHERE value > ( SELECT COUNT(value) FROM requests AS ordr WHERE ordr.code = lne.code );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "lne", "inner_alias": "ordr", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "lne.code", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_08903
train
v1
Schema: shipments (alias: shp)(code, type, value, status) tasks(date, status, amount, level) Task: Retrieve name from shipments whose id is found in tasks rows where status matches the outer record. SQL:
SELECT name FROM shipments AS shp WHERE id IN ( SELECT id FROM tasks AS tsk WHERE tsk.status = shp.status );
{ "outer_table": "shipments", "inner_table": "tasks", "outer_alias": "shp", "inner_alias": "tsk", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "shp.status", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_08904
train
v1
Schema: branches (alias: brc)(status, code, value, date) staff(code, value, status, type) Task: Find name from branches where status appears in staff entries with matching type. SQL:
SELECT name FROM branches AS brc WHERE status IN ( SELECT status FROM staff AS empl WHERE empl.type = brc.type );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "brc", "inner_alias": "empl", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "brc.type", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_08905
train
v2
Schema: shipments (alias: shp)(type, value, code, name) managers(salary, type, level, status) Task: Retrieve name from shipments that have at least one corresponding entry in managers sharing the same code. SQL:
SELECT name FROM shipments AS shp WHERE EXISTS ( SELECT 1 FROM managers AS mgr WHERE mgr.code = shp.code );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "shp", "inner_alias": "mgr", "proj_col": "name", "join_col": "code", "correlated_ref": "shp.code", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_08906
train
v2
Schema: tasks (alias: tsk)(name, amount, type, value) employees(status, salary, level, name) Task: Retrieve id from tasks that have at least one corresponding entry in employees sharing the same code. SQL:
SELECT id FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.code = tsk.code );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "tsk", "inner_alias": "emp", "proj_col": "id", "join_col": "code", "correlated_ref": "tsk.code", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_08907
train
v2
Schema: tasks (alias: tsk)(salary, id, code, level) employees(status, amount, code, id) Task: Retrieve name from tasks that have at least one corresponding entry in employees sharing the same code. SQL:
SELECT name FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.code = tsk.code );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "tsk", "inner_alias": "emp", "proj_col": "name", "join_col": "code", "correlated_ref": "tsk.code", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_08908
train
v1
Schema: schedules (alias: schd)(name, value, salary, status) regions(salary, status, code, date) Task: Retrieve code from schedules whose id is found in regions rows where id matches the outer record. SQL:
SELECT code FROM schedules AS schd WHERE id IN ( SELECT id FROM regions AS rgn WHERE rgn.id = schd.id );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "schd", "inner_alias": "rgn", "proj_col": "code", "filter_col": "id", "join_col": "id", "correlated_ref": "schd.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_08909
train
v1
Schema: regions (alias: rgn)(salary, id, code, level) employees(salary, type, date, amount) Task: Select code from regions where id exists in employees for the same code. SQL:
SELECT code FROM regions AS rgn WHERE id IN ( SELECT id FROM employees AS emp WHERE emp.code = rgn.code );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "rgn", "inner_alias": "emp", "proj_col": "code", "filter_col": "id", "join_col": "code", "correlated_ref": "rgn.code", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_08910
train
v3
Schema: customers (alias: cust)(amount, type, id, value) staff(amount, id, name, code) Task: Retrieve salary from customers with value above the COUNT(amount) of staff rows sharing the same id. SQL:
SELECT salary FROM customers AS cust WHERE value > ( SELECT COUNT(amount) FROM staff AS empl WHERE empl.id = cust.id );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "cust", "inner_alias": "empl", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "cust.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08911
train
v3
Schema: customers (alias: cust)(status, amount, code, type) managers(value, date, salary, code) Task: Retrieve salary from customers with amount above the AVG(value) of managers rows sharing the same level. SQL:
SELECT salary FROM customers AS cust WHERE amount > ( SELECT AVG(value) FROM managers AS mgr WHERE mgr.level = cust.level );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "cust", "inner_alias": "mgr", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "cust.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08912
train
v3
Schema: products (alias: prod)(name, status, date, id) schedules(code, amount, type, date) Task: Retrieve code from products with value above the MAX(salary) of schedules rows sharing the same id. SQL:
SELECT code FROM products AS prod WHERE value > ( SELECT MAX(salary) FROM schedules AS schd WHERE schd.id = prod.id );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "prod", "inner_alias": "schd", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "prod.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08913
train
v3
Schema: items (alias: lne)(status, salary, type, value) regions(date, type, status, name) Task: Find code from items where value exceeds the maximum salary from regions for the same status. SQL:
SELECT code FROM items AS lne WHERE value > ( SELECT MAX(salary) FROM regions AS rgn WHERE rgn.status = lne.status );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "lne", "inner_alias": "rgn", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "lne.status", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_08914
train
v1
Schema: products (alias: prod)(name, type, level, value) shipments(name, type, id, level) Task: Find value from products where type appears in shipments entries with matching id. SQL:
SELECT value FROM products AS prod WHERE type IN ( SELECT type FROM shipments AS shp WHERE shp.id = prod.id );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "prod", "inner_alias": "shp", "proj_col": "value", "filter_col": "type", "join_col": "id", "correlated_ref": "prod.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08915
train
v1
Schema: employees (alias: emp)(date, level, type, value) staff(amount, id, code, date) Task: Find salary from employees where code appears in staff entries with matching code. SQL:
SELECT salary FROM employees AS emp WHERE code IN ( SELECT code FROM staff AS empl WHERE empl.code = emp.code );
{ "outer_table": "employees", "inner_table": "staff", "outer_alias": "emp", "inner_alias": "empl", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08916
train
v3
Schema: staff (alias: empl)(code, amount, id, name) branches(name, date, level, id) Task: Retrieve value from staff with salary above the MIN(value) of branches rows sharing the same id. SQL:
SELECT value FROM staff AS empl WHERE salary > ( SELECT MIN(value) FROM branches AS brc WHERE brc.id = empl.id );
{ "outer_table": "staff", "inner_table": "branches", "outer_alias": "empl", "inner_alias": "brc", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "empl.id", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_08917
train
v1
Schema: sales (alias: sale)(id, name, date, status) invoices(name, date, code, salary) Task: Find salary from sales where status appears in invoices entries with matching type. SQL:
SELECT salary FROM sales AS sale WHERE status IN ( SELECT status FROM invoices AS inv WHERE inv.type = sale.type );
{ "outer_table": "sales", "inner_table": "invoices", "outer_alias": "sale", "inner_alias": "inv", "proj_col": "salary", "filter_col": "status", "join_col": "type", "correlated_ref": "sale.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08918
train
v2
Schema: transactions (alias: txn)(salary, level, id, amount) shipments(code, amount, id, status) Task: Retrieve salary from transactions that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT salary FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM shipments AS shp WHERE shp.code = txn.code );
{ "outer_table": "transactions", "inner_table": "shipments", "outer_alias": "txn", "inner_alias": "shp", "proj_col": "salary", "join_col": "code", "correlated_ref": "txn.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08919
train
v1
Schema: managers (alias: mgr)(level, amount, status, date) invoices(status, salary, level, type) Task: Find id from managers where id appears in invoices entries with matching id. SQL:
SELECT id FROM managers AS mgr WHERE id IN ( SELECT id FROM invoices AS inv WHERE inv.id = mgr.id );
{ "outer_table": "managers", "inner_table": "invoices", "outer_alias": "mgr", "inner_alias": "inv", "proj_col": "id", "filter_col": "id", "join_col": "id", "correlated_ref": "mgr.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08920
train
v3
Schema: regions (alias: rgn)(level, amount, value, type) staff(salary, value, name, code) Task: Find value from regions where salary exceeds the minimum amount from staff for the same status. SQL:
SELECT value FROM regions AS rgn WHERE salary > ( SELECT MIN(amount) FROM staff AS empl WHERE empl.status = rgn.status );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "rgn", "inner_alias": "empl", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "rgn.status", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_08921
train
v1
Schema: products (alias: prod)(salary, date, id, amount) schedules(type, status, salary, code) Task: Retrieve salary from products whose id is found in schedules rows where level matches the outer record. SQL:
SELECT salary FROM products AS prod WHERE id IN ( SELECT id FROM schedules AS schd WHERE schd.level = prod.level );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "prod", "inner_alias": "schd", "proj_col": "salary", "filter_col": "id", "join_col": "level", "correlated_ref": "prod.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08922
train
v1
Schema: orders (alias: ord)(value, date, status, amount) departments(level, date, type, status) Task: Retrieve salary from orders whose status is found in departments rows where status matches the outer record. SQL:
SELECT salary FROM orders AS ord WHERE status IN ( SELECT status FROM departments AS dept WHERE dept.status = ord.status );
{ "outer_table": "orders", "inner_table": "departments", "outer_alias": "ord", "inner_alias": "dept", "proj_col": "salary", "filter_col": "status", "join_col": "status", "correlated_ref": "ord.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08923
train
v2
Schema: sales (alias: sale)(type, code, value, status) invoices(salary, id, status, amount) Task: Retrieve code from sales that have at least one corresponding entry in invoices sharing the same status. SQL:
SELECT code FROM sales AS sale WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.status = sale.status );
{ "outer_table": "sales", "inner_table": "invoices", "outer_alias": "sale", "inner_alias": "inv", "proj_col": "code", "join_col": "status", "correlated_ref": "sale.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08924
train
v2
Schema: managers (alias: mgr)(salary, level, name, code) schedules(type, status, amount, date) Task: Retrieve id from managers that have at least one corresponding entry in schedules sharing the same level. SQL:
SELECT id FROM managers AS mgr WHERE EXISTS ( SELECT 1 FROM schedules AS schd WHERE schd.level = mgr.level );
{ "outer_table": "managers", "inner_table": "schedules", "outer_alias": "mgr", "inner_alias": "schd", "proj_col": "id", "join_col": "level", "correlated_ref": "mgr.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08925
train
v3
Schema: regions (alias: rgn)(id, name, amount, type) sales(code, date, value, level) Task: Retrieve name from regions with amount above the MIN(value) of sales rows sharing the same type. SQL:
SELECT name FROM regions AS rgn WHERE amount > ( SELECT MIN(value) FROM sales AS sale WHERE sale.type = rgn.type );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "rgn", "inner_alias": "sale", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "rgn.type", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_08926
train
v2
Schema: projects (alias: prj)(salary, amount, value, date) requests(salary, status, date, value) Task: Retrieve name from projects that have at least one corresponding entry in requests sharing the same code. SQL:
SELECT name FROM projects AS prj WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.code = prj.code );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "prj", "inner_alias": "ordr", "proj_col": "name", "join_col": "code", "correlated_ref": "prj.code", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_08927
train
v2
Schema: employees (alias: emp)(date, status, type, level) schedules(type, status, date, salary) Task: Find name from employees where a matching record exists in schedules with the same id. SQL:
SELECT name FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM schedules AS schd WHERE schd.id = emp.id );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "emp", "inner_alias": "schd", "proj_col": "name", "join_col": "id", "correlated_ref": "emp.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08928
train
v1
Schema: tasks (alias: tsk)(date, value, name, salary) sales(salary, type, code, status) Task: Retrieve id from tasks whose code is found in sales rows where code matches the outer record. SQL:
SELECT id FROM tasks AS tsk WHERE code IN ( SELECT code FROM sales AS sale WHERE sale.code = tsk.code );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "tsk", "inner_alias": "sale", "proj_col": "id", "filter_col": "code", "join_col": "code", "correlated_ref": "tsk.code", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_08929
train
v3
Schema: items (alias: lne)(salary, status, code, name) requests(type, salary, date, level) Task: Find amount from items where value exceeds the average amount from requests for the same id. SQL:
SELECT amount FROM items AS lne WHERE value > ( SELECT AVG(amount) FROM requests AS ordr WHERE ordr.id = lne.id );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "lne", "inner_alias": "ordr", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "lne.id", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_08930
train
v1
Schema: categories (alias: catg)(code, name, salary, value) orders(id, amount, level, code) Task: Retrieve id from categories whose type is found in orders rows where id matches the outer record. SQL:
SELECT id FROM categories AS catg WHERE type IN ( SELECT type FROM orders AS ord WHERE ord.id = catg.id );
{ "outer_table": "categories", "inner_table": "orders", "outer_alias": "catg", "inner_alias": "ord", "proj_col": "id", "filter_col": "type", "join_col": "id", "correlated_ref": "catg.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_08931
train
v3
Schema: invoices (alias: inv)(type, value, id, status) employees(name, level, id, date) Task: Find code from invoices where value exceeds the total amount from employees for the same code. SQL:
SELECT code FROM invoices AS inv WHERE value > ( SELECT SUM(amount) FROM employees AS emp WHERE emp.code = inv.code );
{ "outer_table": "invoices", "inner_table": "employees", "outer_alias": "inv", "inner_alias": "emp", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "inv.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08932
train
v3
Schema: branches (alias: brc)(salary, status, name, date) schedules(date, id, salary, type) Task: Find salary from branches where salary exceeds the average amount from schedules for the same status. SQL:
SELECT salary FROM branches AS brc WHERE salary > ( SELECT AVG(amount) FROM schedules AS schd WHERE schd.status = brc.status );
{ "outer_table": "branches", "inner_table": "schedules", "outer_alias": "brc", "inner_alias": "schd", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "brc.status", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_08933
train
v3
Schema: branches (alias: brc)(status, level, value, id) tasks(level, id, date, value) Task: Retrieve value from branches with amount above the SUM(salary) of tasks rows sharing the same code. SQL:
SELECT value FROM branches AS brc WHERE amount > ( SELECT SUM(salary) FROM tasks AS tsk WHERE tsk.code = brc.code );
{ "outer_table": "branches", "inner_table": "tasks", "outer_alias": "brc", "inner_alias": "tsk", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "brc.code", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_08934
train
v2
Schema: invoices (alias: inv)(status, amount, value, level) sales(date, level, status, id) Task: Find salary from invoices where a matching record exists in sales with the same code. SQL:
SELECT salary FROM invoices AS inv WHERE EXISTS ( SELECT 1 FROM sales AS sale WHERE sale.code = inv.code );
{ "outer_table": "invoices", "inner_table": "sales", "outer_alias": "inv", "inner_alias": "sale", "proj_col": "salary", "join_col": "code", "correlated_ref": "inv.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08935
train
v3
Schema: accounts (alias: acct)(code, status, type, value) requests(status, level, salary, code) Task: Retrieve code from accounts with value above the COUNT(value) of requests rows sharing the same level. SQL:
SELECT code FROM accounts AS acct WHERE value > ( SELECT COUNT(value) FROM requests AS ordr WHERE ordr.level = acct.level );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "acct", "inner_alias": "ordr", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "acct.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08936
train
v1
Schema: categories (alias: catg)(amount, name, id, date) invoices(name, salary, type, status) Task: Select code from categories where status exists in invoices for the same status. SQL:
SELECT code FROM categories AS catg WHERE status IN ( SELECT status FROM invoices AS inv WHERE inv.status = catg.status );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "catg", "inner_alias": "inv", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "catg.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_08937
train
v1
Schema: requests (alias: ordr)(date, id, amount, status) employees(date, code, amount, status) Task: Select id from requests where code exists in employees for the same id. SQL:
SELECT id FROM requests AS ordr WHERE code IN ( SELECT code FROM employees AS emp WHERE emp.id = ordr.id );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ordr", "inner_alias": "emp", "proj_col": "id", "filter_col": "code", "join_col": "id", "correlated_ref": "ordr.id", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_08938
train
v1
Schema: categories (alias: catg)(value, type, amount, id) schedules(date, amount, level, status) Task: Select salary from categories where id exists in schedules for the same code. SQL:
SELECT salary FROM categories AS catg WHERE id IN ( SELECT id FROM schedules AS schd WHERE schd.code = catg.code );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "catg", "inner_alias": "schd", "proj_col": "salary", "filter_col": "id", "join_col": "code", "correlated_ref": "catg.code", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_08939
train
v2
Schema: requests (alias: ordr)(amount, id, date, code) accounts(salary, value, status, id) Task: Retrieve name from requests that have at least one corresponding entry in accounts sharing the same id. SQL:
SELECT name FROM requests AS ordr WHERE EXISTS ( SELECT 1 FROM accounts AS acct WHERE acct.id = ordr.id );
{ "outer_table": "requests", "inner_table": "accounts", "outer_alias": "ordr", "inner_alias": "acct", "proj_col": "name", "join_col": "id", "correlated_ref": "ordr.id", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_08940
train
v1
Schema: invoices (alias: inv)(salary, level, type, id) orders(amount, id, code, name) Task: Retrieve salary from invoices whose id is found in orders rows where level matches the outer record. SQL:
SELECT salary FROM invoices AS inv WHERE id IN ( SELECT id FROM orders AS ord WHERE ord.level = inv.level );
{ "outer_table": "invoices", "inner_table": "orders", "outer_alias": "inv", "inner_alias": "ord", "proj_col": "salary", "filter_col": "id", "join_col": "level", "correlated_ref": "inv.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08941
train
v2
Schema: orders (alias: ord)(type, name, level, code) accounts(level, code, date, status) Task: Find id from orders where a matching record exists in accounts with the same code. SQL:
SELECT id FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM accounts AS acct WHERE acct.code = ord.code );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "ord", "inner_alias": "acct", "proj_col": "id", "join_col": "code", "correlated_ref": "ord.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08942
train
v3
Schema: managers (alias: mgr)(level, type, id, salary) accounts(salary, type, id, date) Task: Retrieve id from managers with amount above the SUM(amount) of accounts rows sharing the same type. SQL:
SELECT id FROM managers AS mgr WHERE amount > ( SELECT SUM(amount) FROM accounts AS acct WHERE acct.type = mgr.type );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "mgr", "inner_alias": "acct", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "mgr.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08943
train
v3
Schema: categories (alias: catg)(name, date, level, type) accounts(code, status, amount, name) Task: Retrieve name from categories with value above the MIN(amount) of accounts rows sharing the same type. SQL:
SELECT name FROM categories AS catg WHERE value > ( SELECT MIN(amount) FROM accounts AS acct WHERE acct.type = catg.type );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "catg", "inner_alias": "acct", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "catg.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_08944
train
v1
Schema: managers (alias: mgr)(value, name, type, level) employees(level, date, id, amount) Task: Retrieve salary from managers whose id is found in employees rows where level matches the outer record. SQL:
SELECT salary FROM managers AS mgr WHERE id IN ( SELECT id FROM employees AS emp WHERE emp.level = mgr.level );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "mgr", "inner_alias": "emp", "proj_col": "salary", "filter_col": "id", "join_col": "level", "correlated_ref": "mgr.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08945
train
v3
Schema: projects (alias: prj)(amount, level, type, status) accounts(salary, date, amount, status) Task: Retrieve code from projects with value above the AVG(value) of accounts rows sharing the same type. SQL:
SELECT code FROM projects AS prj WHERE value > ( SELECT AVG(value) FROM accounts AS acct WHERE acct.type = prj.type );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "prj", "inner_alias": "acct", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "prj.type", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_08946
train
v2
Schema: customers (alias: cust)(level, date, value, id) staff(amount, salary, id, level) Task: Find code from customers where a matching record exists in staff with the same id. SQL:
SELECT code FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM staff AS empl WHERE empl.id = cust.id );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "cust", "inner_alias": "empl", "proj_col": "code", "join_col": "id", "correlated_ref": "cust.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08947
train
v3
Schema: sales (alias: sale)(id, salary, amount, date) managers(code, status, date, amount) Task: Retrieve salary from sales with amount above the COUNT(salary) of managers rows sharing the same level. SQL:
SELECT salary FROM sales AS sale WHERE amount > ( SELECT COUNT(salary) FROM managers AS mgr WHERE mgr.level = sale.level );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "sale", "inner_alias": "mgr", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "sale.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08948
train
v2
Schema: products (alias: prod)(status, code, salary, type) managers(name, id, type, status) Task: Retrieve id from products that have at least one corresponding entry in managers sharing the same status. SQL:
SELECT id FROM products AS prod WHERE EXISTS ( SELECT 1 FROM managers AS mgr WHERE mgr.status = prod.status );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "prod", "inner_alias": "mgr", "proj_col": "id", "join_col": "status", "correlated_ref": "prod.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08949
train
v3
Schema: branches (alias: brc)(salary, level, type, value) invoices(type, level, name, id) Task: Retrieve code from branches with value above the SUM(value) of invoices rows sharing the same level. SQL:
SELECT code FROM branches AS brc WHERE value > ( SELECT SUM(value) FROM invoices AS inv WHERE inv.level = brc.level );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "brc", "inner_alias": "inv", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "brc.level", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_08950
train
v1
Schema: customers (alias: cust)(date, level, name, value) products(date, salary, level, type) Task: Select value from customers where status exists in products for the same status. SQL:
SELECT value FROM customers AS cust WHERE status IN ( SELECT status FROM products AS prod WHERE prod.status = cust.status );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "cust", "inner_alias": "prod", "proj_col": "value", "filter_col": "status", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08951
train
v3
Schema: customers (alias: cust)(value, salary, name, level) requests(id, status, value, name) Task: Find amount from customers where salary exceeds the total value from requests for the same type. SQL:
SELECT amount FROM customers AS cust WHERE salary > ( SELECT SUM(value) FROM requests AS ordr WHERE ordr.type = cust.type );
{ "outer_table": "customers", "inner_table": "requests", "outer_alias": "cust", "inner_alias": "ordr", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "cust.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08952
train
v2
Schema: requests (alias: ordr)(status, type, date, salary) employees(amount, code, value, salary) Task: Retrieve value from requests that have at least one corresponding entry in employees sharing the same code. SQL:
SELECT value FROM requests AS ordr WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.code = ordr.code );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ordr", "inner_alias": "emp", "proj_col": "value", "join_col": "code", "correlated_ref": "ordr.code", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_08953
train
v3
Schema: departments (alias: dept)(status, id, type, amount) requests(id, status, name, amount) Task: Retrieve amount from departments with amount above the MIN(salary) of requests rows sharing the same type. SQL:
SELECT amount FROM departments AS dept WHERE amount > ( SELECT MIN(salary) FROM requests AS ordr WHERE ordr.type = dept.type );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dept", "inner_alias": "ordr", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "dept.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08954
train
v2
Schema: shipments (alias: shp)(date, status, salary, value) schedules(date, id, type, value) Task: Find id from shipments where a matching record exists in schedules with the same type. SQL:
SELECT id 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": "id", "join_col": "type", "correlated_ref": "shp.type", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_08955
train
v2
Schema: categories (alias: catg)(amount, name, salary, level) schedules(id, code, value, date) Task: Retrieve salary from categories that have at least one corresponding entry in schedules sharing the same level. SQL:
SELECT salary FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM schedules AS schd WHERE schd.level = catg.level );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "catg", "inner_alias": "schd", "proj_col": "salary", "join_col": "level", "correlated_ref": "catg.level", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_08956
train
v1
Schema: categories (alias: catg)(name, code, value, status) sales(value, date, name, salary) Task: Retrieve code from categories whose code is found in sales rows where id matches the outer record. SQL:
SELECT code FROM categories AS catg WHERE code IN ( SELECT code FROM sales AS sale WHERE sale.id = catg.id );
{ "outer_table": "categories", "inner_table": "sales", "outer_alias": "catg", "inner_alias": "sale", "proj_col": "code", "filter_col": "code", "join_col": "id", "correlated_ref": "catg.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_08957
train
v3
Schema: accounts (alias: acct)(amount, code, id, status) orders(value, date, name, type) Task: Retrieve code from accounts with salary above the SUM(amount) of orders rows sharing the same type. SQL:
SELECT code FROM accounts AS acct WHERE salary > ( SELECT SUM(amount) FROM orders AS ord WHERE ord.type = acct.type );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "acct", "inner_alias": "ord", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "acct.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08958
train
v3
Schema: departments (alias: dept)(status, amount, name, type) branches(status, name, id, amount) Task: Find amount from departments where salary exceeds the minimum amount from branches for the same code. SQL:
SELECT amount FROM departments AS dept WHERE salary > ( SELECT MIN(amount) FROM branches AS brc WHERE brc.code = dept.code );
{ "outer_table": "departments", "inner_table": "branches", "outer_alias": "dept", "inner_alias": "brc", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08959
train
v2
Schema: branches (alias: brc)(date, id, status, amount) customers(level, value, amount, status) Task: Retrieve salary from branches that have at least one corresponding entry in customers sharing the same level. SQL:
SELECT salary FROM branches AS brc WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.level = brc.level );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "brc", "inner_alias": "cust", "proj_col": "salary", "join_col": "level", "correlated_ref": "brc.level", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_08960
train
v2
Schema: categories (alias: catg)(code, value, salary, amount) requests(id, date, name, type) Task: Retrieve name from categories that have at least one corresponding entry in requests sharing the same id. SQL:
SELECT name FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.id = catg.id );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "catg", "inner_alias": "ordr", "proj_col": "name", "join_col": "id", "correlated_ref": "catg.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_08961
train
v3
Schema: categories (alias: catg)(name, level, status, salary) shipments(code, level, date, id) Task: Find code from categories where value exceeds the average salary from shipments for the same status. SQL:
SELECT code FROM categories AS catg WHERE value > ( SELECT AVG(salary) FROM shipments AS shp WHERE shp.status = catg.status );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "catg", "inner_alias": "shp", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "catg.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_08962
train
v3
Schema: accounts (alias: acct)(id, amount, salary, date) staff(value, status, id, level) Task: Find value from accounts where amount exceeds the maximum salary from staff for the same id. SQL:
SELECT value FROM accounts AS acct WHERE amount > ( SELECT MAX(salary) FROM staff AS empl WHERE empl.id = acct.id );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "acct", "inner_alias": "empl", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "acct.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08963
train
v2
Schema: departments (alias: dept)(name, code, level, date) customers(level, name, salary, id) Task: Retrieve code from departments that have at least one corresponding entry in customers sharing the same level. SQL:
SELECT code FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.level = dept.level );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dept", "inner_alias": "cust", "proj_col": "code", "join_col": "level", "correlated_ref": "dept.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08964
train
v1
Schema: products (alias: prod)(date, name, code, level) shipments(salary, status, level, value) Task: Find code from products where code appears in shipments entries with matching type. SQL:
SELECT code FROM products AS prod WHERE code IN ( SELECT code FROM shipments AS shp WHERE shp.type = prod.type );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "prod", "inner_alias": "shp", "proj_col": "code", "filter_col": "code", "join_col": "type", "correlated_ref": "prod.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08965
train
v2
Schema: requests (alias: ordr)(amount, value, type, date) employees(value, salary, name, type) Task: Find name from requests where a matching record exists in employees with the same status. SQL:
SELECT name FROM requests AS ordr WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.status = ordr.status );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ordr", "inner_alias": "emp", "proj_col": "name", "join_col": "status", "correlated_ref": "ordr.status", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_08966
train
v2
Schema: categories (alias: catg)(date, amount, salary, value) employees(status, id, name, type) Task: Find salary from categories where a matching record exists in employees with the same code. SQL:
SELECT salary FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.code = catg.code );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "catg", "inner_alias": "emp", "proj_col": "salary", "join_col": "code", "correlated_ref": "catg.code", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_08967
train
v2
Schema: invoices (alias: inv)(status, id, date, type) requests(value, level, id, salary) Task: Retrieve code from invoices that have at least one corresponding entry in requests sharing the same id. SQL:
SELECT code FROM invoices AS inv WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.id = inv.id );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "inv", "inner_alias": "ordr", "proj_col": "code", "join_col": "id", "correlated_ref": "inv.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08968
train
v2
Schema: projects (alias: prj)(code, value, salary, date) tasks(value, date, amount, salary) Task: Find name from projects where a matching record exists in tasks with the same status. SQL:
SELECT name FROM projects AS prj WHERE EXISTS ( SELECT 1 FROM tasks AS tsk WHERE tsk.status = prj.status );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "prj", "inner_alias": "tsk", "proj_col": "name", "join_col": "status", "correlated_ref": "prj.status", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_08969
train
v2
Schema: customers (alias: cust)(name, id, amount, value) tasks(name, date, type, code) Task: Retrieve amount from customers that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT amount FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM tasks AS tsk WHERE tsk.status = cust.status );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "cust", "inner_alias": "tsk", "proj_col": "amount", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08970
train
v3
Schema: transactions (alias: txn)(date, name, value, code) accounts(status, code, value, amount) Task: Retrieve salary from transactions with salary above the MIN(amount) of accounts rows sharing the same status. SQL:
SELECT salary FROM transactions AS txn WHERE salary > ( SELECT MIN(amount) FROM accounts AS acct WHERE acct.status = txn.status );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "txn", "inner_alias": "acct", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "txn.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08971
train
v1
Schema: projects (alias: prj)(date, name, value, id) categories(salary, code, type, amount) Task: Select name from projects where code exists in categories for the same id. SQL:
SELECT name 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": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "prj.id", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_08972
train
v1
Schema: departments (alias: dept)(status, name, id, salary) accounts(code, name, status, amount) Task: Retrieve amount from departments whose type is found in accounts rows where code matches the outer record. SQL:
SELECT amount FROM departments AS dept WHERE type IN ( SELECT type FROM accounts AS acct WHERE acct.code = dept.code );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dept", "inner_alias": "acct", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08973
train
v1
Schema: shipments (alias: shp)(salary, status, amount, code) items(name, value, id, salary) Task: Find value from shipments where id appears in items entries with matching type. SQL:
SELECT value FROM shipments AS shp WHERE id IN ( SELECT id FROM items AS lne WHERE lne.type = shp.type );
{ "outer_table": "shipments", "inner_table": "items", "outer_alias": "shp", "inner_alias": "lne", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "shp.type", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_08974
train
v3
Schema: managers (alias: mgr)(date, level, value, salary) sales(type, status, id, value) Task: Find code from managers where salary exceeds the minimum salary from sales for the same type. SQL:
SELECT code FROM managers AS mgr WHERE salary > ( SELECT MIN(salary) FROM sales AS sale WHERE sale.type = mgr.type );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "mgr", "inner_alias": "sale", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "mgr.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08975
train
v3
Schema: customers (alias: cust)(status, value, code, id) projects(salary, status, name, value) Task: Find value from customers where value exceeds the count of salary from projects for the same code. SQL:
SELECT value FROM customers AS cust WHERE value > ( SELECT COUNT(salary) FROM projects AS prj WHERE prj.code = cust.code );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "cust", "inner_alias": "prj", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "cust.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08976
train
v1
Schema: orders (alias: ord)(level, amount, id, salary) schedules(date, amount, name, id) Task: Retrieve code from orders whose type is found in schedules rows where id matches the outer record. SQL:
SELECT code FROM orders AS ord WHERE type IN ( SELECT type FROM schedules AS schd WHERE schd.id = ord.id );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "ord", "inner_alias": "schd", "proj_col": "code", "filter_col": "type", "join_col": "id", "correlated_ref": "ord.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08977
train
v3
Schema: staff (alias: empl)(date, salary, name, status) schedules(id, value, amount, status) Task: Find amount from staff where value exceeds the total value from schedules for the same level. SQL:
SELECT amount FROM staff AS empl WHERE value > ( SELECT SUM(value) FROM schedules AS schd WHERE schd.level = empl.level );
{ "outer_table": "staff", "inner_table": "schedules", "outer_alias": "empl", "inner_alias": "schd", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "empl.level", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_08978
train
v2
Schema: managers (alias: mgr)(name, type, level, date) customers(amount, id, type, level) Task: Retrieve id from managers that have at least one corresponding entry in customers sharing the same status. SQL:
SELECT id FROM managers AS mgr WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.status = mgr.status );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "mgr", "inner_alias": "cust", "proj_col": "id", "join_col": "status", "correlated_ref": "mgr.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08979
train
v3
Schema: managers (alias: mgr)(status, salary, name, amount) products(value, name, salary, date) Task: Find salary from managers where amount exceeds the maximum value from products for the same level. SQL:
SELECT salary FROM managers AS mgr WHERE amount > ( SELECT MAX(value) FROM products AS prod WHERE prod.level = mgr.level );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "mgr", "inner_alias": "prod", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "mgr.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08980
train
v1
Schema: tasks (alias: tsk)(status, name, value, id) schedules(level, salary, value, type) Task: Find amount from tasks where code appears in schedules entries with matching type. SQL:
SELECT amount FROM tasks AS tsk WHERE code IN ( SELECT code FROM schedules AS schd WHERE schd.type = tsk.type );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "tsk", "inner_alias": "schd", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "tsk.type", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_08981
train
v2
Schema: employees (alias: emp)(type, code, id, salary) customers(status, date, value, type) Task: Find id from employees where a matching record exists in customers with the same level. SQL:
SELECT id FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.level = emp.level );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "emp", "inner_alias": "cust", "proj_col": "id", "join_col": "level", "correlated_ref": "emp.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08982
train
v3
Schema: customers (alias: cust)(level, salary, type, id) categories(value, amount, id, name) Task: Retrieve code from customers with value above the MIN(amount) of categories rows sharing the same level. SQL:
SELECT code FROM customers AS cust WHERE value > ( SELECT MIN(amount) FROM categories AS catg WHERE catg.level = cust.level );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "cust", "inner_alias": "catg", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "cust.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08983
train
v2
Schema: orders (alias: ord)(code, status, type, value) categories(level, id, date, value) Task: Find code from orders where a matching record exists in categories with the same level. SQL:
SELECT code FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM categories AS catg WHERE catg.level = ord.level );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "ord", "inner_alias": "catg", "proj_col": "code", "join_col": "level", "correlated_ref": "ord.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08984
train
v3
Schema: categories (alias: catg)(id, level, date, value) customers(id, name, value, status) Task: Retrieve salary from categories with amount above the MAX(value) of customers rows sharing the same status. SQL:
SELECT salary FROM categories AS catg WHERE amount > ( SELECT MAX(value) FROM customers AS cust WHERE cust.status = catg.status );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "catg", "inner_alias": "cust", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "catg.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_08985
train
v3
Schema: categories (alias: catg)(salary, status, id, amount) tasks(amount, level, type, name) Task: Retrieve value from categories with value above the AVG(value) of tasks rows sharing the same id. SQL:
SELECT value FROM categories AS catg WHERE value > ( SELECT AVG(value) FROM tasks AS tsk WHERE tsk.id = catg.id );
{ "outer_table": "categories", "inner_table": "tasks", "outer_alias": "catg", "inner_alias": "tsk", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "catg.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_08986
train
v1
Schema: accounts (alias: acct)(status, salary, id, date) items(level, type, value, id) Task: Retrieve amount from accounts whose level is found in items rows where status matches the outer record. SQL:
SELECT amount FROM accounts AS acct WHERE level IN ( SELECT level FROM items AS lne WHERE lne.status = acct.status );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "acct", "inner_alias": "lne", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "acct.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08987
train
v3
Schema: shipments (alias: shp)(status, code, type, name) orders(date, id, type, salary) Task: Retrieve salary from shipments with amount above the MIN(amount) of orders rows sharing the same type. SQL:
SELECT salary FROM shipments AS shp WHERE amount > ( SELECT MIN(amount) FROM orders AS ord WHERE ord.type = shp.type );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "shp", "inner_alias": "ord", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "shp.type", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_08988
train
v3
Schema: staff (alias: empl)(amount, id, type, status) categories(name, level, salary, date) Task: Find code from staff where salary exceeds the maximum amount from categories for the same code. SQL:
SELECT code FROM staff AS empl WHERE salary > ( SELECT MAX(amount) FROM categories AS catg WHERE catg.code = empl.code );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "empl", "inner_alias": "catg", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "empl.code", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_08989
train
v3
Schema: requests (alias: ordr)(amount, type, status, code) departments(salary, code, date, level) Task: Retrieve value from requests with amount above the MIN(amount) of departments rows sharing the same type. SQL:
SELECT value FROM requests AS ordr WHERE amount > ( SELECT MIN(amount) FROM departments AS dept WHERE dept.type = ordr.type );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ordr", "inner_alias": "dept", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "ordr.type", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_08990
train
v2
Schema: regions (alias: rgn)(salary, status, type, date) employees(name, date, amount, status) Task: Find salary from regions where a matching record exists in employees with the same level. SQL:
SELECT salary FROM regions AS rgn WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.level = rgn.level );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "rgn", "inner_alias": "emp", "proj_col": "salary", "join_col": "level", "correlated_ref": "rgn.level", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_08991
train
v3
Schema: shipments (alias: shp)(amount, value, name, salary) staff(date, id, type, code) Task: Retrieve name from shipments with value above the MIN(value) of staff rows sharing the same id. SQL:
SELECT name FROM shipments AS shp WHERE value > ( SELECT MIN(value) FROM staff AS empl WHERE empl.id = shp.id );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "shp", "inner_alias": "empl", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "shp.id", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_08992
train
v3
Schema: accounts (alias: acct)(type, status, code, salary) staff(type, id, status, level) Task: Retrieve name from accounts with amount above the MAX(value) of staff rows sharing the same status. SQL:
SELECT name FROM accounts AS acct WHERE amount > ( SELECT MAX(value) FROM staff AS empl WHERE empl.status = acct.status );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "acct", "inner_alias": "empl", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "acct.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08993
train
v2
Schema: accounts (alias: acct)(amount, id, code, value) customers(id, date, type, salary) Task: Find code from accounts where a matching record exists in customers with the same id. SQL:
SELECT code FROM accounts AS acct WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.id = acct.id );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "acct", "inner_alias": "cust", "proj_col": "code", "join_col": "id", "correlated_ref": "acct.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08994
train
v1
Schema: staff (alias: empl)(name, level, amount, value) accounts(id, type, date, name) Task: Retrieve salary from staff whose level is found in accounts rows where level matches the outer record. SQL:
SELECT salary FROM staff AS empl WHERE level IN ( SELECT level FROM accounts AS acct WHERE acct.level = empl.level );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "empl", "inner_alias": "acct", "proj_col": "salary", "filter_col": "level", "join_col": "level", "correlated_ref": "empl.level", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_08995
train
v3
Schema: accounts (alias: acct)(salary, status, value, date) sales(amount, type, name, date) Task: Find value from accounts where salary exceeds the minimum amount from sales for the same level. SQL:
SELECT value FROM accounts AS acct WHERE salary > ( SELECT MIN(amount) FROM sales AS sale WHERE sale.level = acct.level );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "acct", "inner_alias": "sale", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "acct.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08996
train
v1
Schema: categories (alias: catg)(level, type, name, code) schedules(value, status, amount, name) Task: Find amount from categories where status appears in schedules entries with matching id. SQL:
SELECT amount FROM categories AS catg WHERE status IN ( SELECT status FROM schedules AS schd WHERE schd.id = catg.id );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "catg", "inner_alias": "schd", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "catg.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_08997
train
v3
Schema: sales (alias: sale)(code, type, id, amount) employees(amount, code, value, date) Task: Retrieve name from sales with amount above the SUM(amount) of employees rows sharing the same status. SQL:
SELECT name FROM sales AS sale WHERE amount > ( SELECT SUM(amount) FROM employees AS emp WHERE emp.status = sale.status );
{ "outer_table": "sales", "inner_table": "employees", "outer_alias": "sale", "inner_alias": "emp", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "sale.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08998
train
v3
Schema: transactions (alias: txn)(id, type, value, level) requests(salary, type, id, level) Task: Find value from transactions where salary exceeds the maximum amount from requests for the same type. SQL:
SELECT value FROM transactions AS txn WHERE salary > ( SELECT MAX(amount) FROM requests AS ordr WHERE ordr.type = txn.type );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "txn", "inner_alias": "ordr", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "txn.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_08999
train