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: shipments (alias: shp)(salary, type, status, id) invoices(salary, id, status, type) Task: Select salary from shipments where level exists in invoices for the same status. SQL:
SELECT salary FROM shipments AS shp WHERE level IN ( SELECT level FROM invoices AS inv WHERE inv.status = shp.status );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "shp", "inner_alias": "inv", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "shp.status", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_02900
train
v2
Schema: orders (alias: ord)(type, name, status, id) regions(level, value, id, status) Task: Find code from orders where a matching record exists in regions with the same code. SQL:
SELECT code FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM regions AS rgn WHERE rgn.code = ord.code );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "ord", "inner_alias": "rgn", "proj_col": "code", "join_col": "code", "correlated_ref": "ord.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02901
train
v1
Schema: categories (alias: catg)(name, id, status, type) invoices(level, type, code, value) Task: Select value from categories where level exists in invoices for the same level. SQL:
SELECT value FROM categories AS catg WHERE level IN ( SELECT level FROM invoices AS inv WHERE inv.level = catg.level );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "catg", "inner_alias": "inv", "proj_col": "value", "filter_col": "level", "join_col": "level", "correlated_ref": "catg.level", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_02902
train
v1
Schema: transactions (alias: txn)(name, id, salary, code) employees(name, value, level, code) Task: Select name from transactions where id exists in employees for the same id. SQL:
SELECT name FROM transactions AS txn WHERE id IN ( SELECT id FROM employees AS emp WHERE emp.id = txn.id );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "txn", "inner_alias": "emp", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "txn.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02903
train
v1
Schema: customers (alias: cust)(id, name, level, value) sales(code, level, amount, name) Task: Select salary from customers where level exists in sales for the same code. SQL:
SELECT salary FROM customers AS cust WHERE level IN ( SELECT level FROM sales AS sale WHERE sale.code = cust.code );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "cust", "inner_alias": "sale", "proj_col": "salary", "filter_col": "level", "join_col": "code", "correlated_ref": "cust.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02904
train
v2
Schema: managers (alias: mgr)(value, level, date, salary) branches(code, status, amount, name) Task: Find name from managers where a matching record exists in branches with the same type. SQL:
SELECT name FROM managers AS mgr WHERE EXISTS ( SELECT 1 FROM branches AS brc WHERE brc.type = mgr.type );
{ "outer_table": "managers", "inner_table": "branches", "outer_alias": "mgr", "inner_alias": "brc", "proj_col": "name", "join_col": "type", "correlated_ref": "mgr.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02905
train
v2
Schema: customers (alias: cust)(value, date, id, amount) employees(date, code, type, id) Task: Find salary from customers where a matching record exists in employees with the same code. SQL:
SELECT salary FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.code = cust.code );
{ "outer_table": "customers", "inner_table": "employees", "outer_alias": "cust", "inner_alias": "emp", "proj_col": "salary", "join_col": "code", "correlated_ref": "cust.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02906
train
v2
Schema: items (alias: lne)(name, level, id, amount) schedules(name, type, status, date) Task: Find salary from items where a matching record exists in schedules with the same level. SQL:
SELECT salary FROM items AS lne WHERE EXISTS ( SELECT 1 FROM schedules AS schd WHERE schd.level = lne.level );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "lne", "inner_alias": "schd", "proj_col": "salary", "join_col": "level", "correlated_ref": "lne.level", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_02907
train
v1
Schema: projects (alias: prj)(date, level, amount, status) categories(salary, value, level, type) Task: Find code from projects where level appears in categories entries with matching type. SQL:
SELECT code FROM projects AS prj WHERE level IN ( SELECT level FROM categories AS catg WHERE catg.type = prj.type );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "prj", "inner_alias": "catg", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "prj.type", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_02908
train
v1
Schema: products (alias: prod)(date, name, level, code) managers(code, amount, name, value) Task: Retrieve salary from products whose id is found in managers rows where status matches the outer record. SQL:
SELECT salary FROM products AS prod WHERE id IN ( SELECT id FROM managers AS mgr WHERE mgr.status = prod.status );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "prod", "inner_alias": "mgr", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "prod.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02909
train
v1
Schema: customers (alias: cust)(status, id, name, salary) accounts(date, amount, type, name) Task: Select amount from customers where level exists in accounts for the same code. SQL:
SELECT amount FROM customers AS cust WHERE level IN ( SELECT level FROM accounts AS acct WHERE acct.code = cust.code );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "cust", "inner_alias": "acct", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "cust.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02910
train
v1
Schema: projects (alias: prj)(value, name, status, salary) sales(value, type, name, code) Task: Find code from projects where id appears in sales entries with matching code. SQL:
SELECT code FROM projects AS prj WHERE id IN ( SELECT id FROM sales AS sale WHERE sale.code = prj.code );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "prj", "inner_alias": "sale", "proj_col": "code", "filter_col": "id", "join_col": "code", "correlated_ref": "prj.code", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_02911
train
v1
Schema: products (alias: prod)(name, level, status, salary) accounts(value, salary, id, status) Task: Retrieve name from products whose id is found in accounts rows where id matches the outer record. SQL:
SELECT name FROM products AS prod WHERE id IN ( SELECT id FROM accounts AS acct WHERE acct.id = prod.id );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "prod", "inner_alias": "acct", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "prod.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02912
train
v3
Schema: branches (alias: brc)(date, level, code, value) invoices(level, salary, status, date) Task: Find value from branches where salary exceeds the minimum amount from invoices for the same level. SQL:
SELECT value FROM branches AS brc WHERE salary > ( SELECT MIN(amount) FROM invoices AS inv WHERE inv.level = brc.level );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "brc", "inner_alias": "inv", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "brc.level", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_02913
train
v3
Schema: orders (alias: ord)(type, code, level, date) regions(date, level, status, value) Task: Retrieve amount from orders with amount above the MIN(salary) of regions rows sharing the same id. SQL:
SELECT amount FROM orders AS ord WHERE amount > ( SELECT MIN(salary) FROM regions AS rgn WHERE rgn.id = ord.id );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "ord", "inner_alias": "rgn", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "ord.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02914
train
v2
Schema: projects (alias: prj)(date, salary, amount, code) departments(status, salary, name, id) Task: Find name from projects where a matching record exists in departments with the same type. SQL:
SELECT name FROM projects AS prj WHERE EXISTS ( SELECT 1 FROM departments AS dept WHERE dept.type = prj.type );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "prj", "inner_alias": "dept", "proj_col": "name", "join_col": "type", "correlated_ref": "prj.type", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_02915
train
v3
Schema: projects (alias: prj)(id, date, salary, status) managers(code, salary, id, value) Task: Find value from projects where value exceeds the count of amount from managers for the same id. SQL:
SELECT value FROM projects AS prj WHERE value > ( SELECT COUNT(amount) FROM managers AS mgr WHERE mgr.id = prj.id );
{ "outer_table": "projects", "inner_table": "managers", "outer_alias": "prj", "inner_alias": "mgr", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "prj.id", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_02916
train
v2
Schema: shipments (alias: shp)(status, level, name, salary) customers(status, date, type, id) Task: Find value from shipments where a matching record exists in customers with the same type. SQL:
SELECT value FROM shipments AS shp WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.type = shp.type );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "shp", "inner_alias": "cust", "proj_col": "value", "join_col": "type", "correlated_ref": "shp.type", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_02917
train
v1
Schema: branches (alias: brc)(status, date, amount, value) categories(status, code, value, level) Task: Select name from branches where id exists in categories for the same status. SQL:
SELECT name FROM branches AS brc WHERE id IN ( SELECT id FROM categories AS catg WHERE catg.status = brc.status );
{ "outer_table": "branches", "inner_table": "categories", "outer_alias": "brc", "inner_alias": "catg", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "brc.status", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_02918
train
v2
Schema: invoices (alias: inv)(salary, level, amount, id) managers(salary, date, value, id) Task: Find name from invoices where a matching record exists in managers with the same type. SQL:
SELECT name FROM invoices AS inv WHERE EXISTS ( SELECT 1 FROM managers AS mgr WHERE mgr.type = inv.type );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "inv", "inner_alias": "mgr", "proj_col": "name", "join_col": "type", "correlated_ref": "inv.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02919
train
v1
Schema: employees (alias: emp)(date, amount, salary, id) sales(status, amount, value, type) Task: Retrieve value from employees whose code is found in sales rows where level matches the outer record. SQL:
SELECT value FROM employees AS emp WHERE code IN ( SELECT code FROM sales AS sale WHERE sale.level = emp.level );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "emp", "inner_alias": "sale", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "emp.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02920
train
v2
Schema: employees (alias: emp)(id, level, type, amount) transactions(level, code, name, amount) Task: Find amount from employees where a matching record exists in transactions with the same code. SQL:
SELECT amount FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM transactions AS txn WHERE txn.code = emp.code );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "emp", "inner_alias": "txn", "proj_col": "amount", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02921
train
v1
Schema: products (alias: prod)(level, name, value, amount) accounts(type, name, amount, date) Task: Retrieve code from products whose status is found in accounts rows where id matches the outer record. SQL:
SELECT code FROM products AS prod WHERE status IN ( SELECT status FROM accounts AS acct WHERE acct.id = prod.id );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "prod", "inner_alias": "acct", "proj_col": "code", "filter_col": "status", "join_col": "id", "correlated_ref": "prod.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02922
train
v2
Schema: departments (alias: dept)(id, code, value, type) categories(name, value, id, status) Task: Retrieve id from departments that have at least one corresponding entry in categories sharing the same status. SQL:
SELECT id FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM categories AS catg WHERE catg.status = dept.status );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dept", "inner_alias": "catg", "proj_col": "id", "join_col": "status", "correlated_ref": "dept.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02923
train
v2
Schema: branches (alias: brc)(level, amount, type, id) staff(date, id, type, code) Task: Retrieve id from branches that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT id FROM branches AS brc WHERE EXISTS ( SELECT 1 FROM staff AS empl WHERE empl.level = brc.level );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "brc", "inner_alias": "empl", "proj_col": "id", "join_col": "level", "correlated_ref": "brc.level", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_02924
train
v2
Schema: sales (alias: sale)(id, amount, code, type) orders(id, name, type, value) Task: Find code from sales where a matching record exists in orders with the same level. SQL:
SELECT code FROM sales AS sale WHERE EXISTS ( SELECT 1 FROM orders AS ord WHERE ord.level = sale.level );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "sale", "inner_alias": "ord", "proj_col": "code", "join_col": "level", "correlated_ref": "sale.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02925
train
v2
Schema: items (alias: lne)(type, status, id, code) schedules(salary, code, date, value) Task: Retrieve salary from items that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT salary FROM items AS lne WHERE EXISTS ( SELECT 1 FROM schedules AS schd WHERE schd.code = lne.code );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "lne", "inner_alias": "schd", "proj_col": "salary", "join_col": "code", "correlated_ref": "lne.code", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_02926
train
v1
Schema: items (alias: lne)(id, type, date, value) schedules(value, type, level, salary) Task: Select salary from items where type exists in schedules for the same id. SQL:
SELECT salary FROM items AS lne WHERE type IN ( SELECT type FROM schedules AS schd WHERE schd.id = lne.id );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "lne", "inner_alias": "schd", "proj_col": "salary", "filter_col": "type", "join_col": "id", "correlated_ref": "lne.id", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_02927
train
v2
Schema: schedules (alias: schd)(name, type, id, amount) customers(id, type, name, code) Task: Retrieve id from schedules that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT id FROM schedules AS schd WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.type = schd.type );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "schd", "inner_alias": "cust", "proj_col": "id", "join_col": "type", "correlated_ref": "schd.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_02928
train
v3
Schema: staff (alias: empl)(code, id, date, salary) projects(salary, value, name, level) Task: Find code from staff where salary exceeds the maximum salary from projects for the same code. SQL:
SELECT code FROM staff AS empl WHERE salary > ( SELECT MAX(salary) FROM projects AS prj WHERE prj.code = empl.code );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "empl", "inner_alias": "prj", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "empl.code", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_02929
train
v2
Schema: employees (alias: emp)(level, code, type, id) managers(value, level, type, salary) Task: Retrieve code from employees that have at least one corresponding entry in managers sharing the same code. SQL:
SELECT code FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM managers AS mgr WHERE mgr.code = emp.code );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "emp", "inner_alias": "mgr", "proj_col": "code", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02930
train
v2
Schema: departments (alias: dept)(status, type, id, level) employees(status, code, type, name) Task: Find id from departments where a matching record exists in employees with the same code. SQL:
SELECT id FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.code = dept.code );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dept", "inner_alias": "emp", "proj_col": "id", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02931
train
v1
Schema: tasks (alias: tsk)(code, value, date, amount) categories(salary, level, code, type) Task: Find salary from tasks where id appears in categories entries with matching id. SQL:
SELECT salary FROM tasks AS tsk WHERE id IN ( SELECT id FROM categories AS catg WHERE catg.id = tsk.id );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "tsk", "inner_alias": "catg", "proj_col": "salary", "filter_col": "id", "join_col": "id", "correlated_ref": "tsk.id", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_02932
train
v2
Schema: categories (alias: catg)(name, value, id, salary) regions(level, id, value, date) Task: Retrieve id from categories that have at least one corresponding entry in regions sharing the same id. SQL:
SELECT id FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM regions AS rgn WHERE rgn.id = catg.id );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "catg", "inner_alias": "rgn", "proj_col": "id", "join_col": "id", "correlated_ref": "catg.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_02933
train
v2
Schema: invoices (alias: inv)(level, type, salary, status) transactions(type, value, level, status) Task: Find amount from invoices where a matching record exists in transactions with the same type. SQL:
SELECT amount FROM invoices AS inv WHERE EXISTS ( SELECT 1 FROM transactions AS txn WHERE txn.type = inv.type );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "inv", "inner_alias": "txn", "proj_col": "amount", "join_col": "type", "correlated_ref": "inv.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02934
train
v3
Schema: tasks (alias: tsk)(status, type, name, date) categories(date, status, salary, code) Task: Find code from tasks where value exceeds the maximum amount from categories for the same id. SQL:
SELECT code FROM tasks AS tsk WHERE value > ( SELECT MAX(amount) FROM categories AS catg WHERE catg.id = tsk.id );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "tsk", "inner_alias": "catg", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "tsk.id", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_02935
train
v2
Schema: regions (alias: rgn)(date, status, type, value) managers(id, salary, value, date) Task: Find amount from regions where a matching record exists in managers with the same status. SQL:
SELECT amount FROM regions AS rgn WHERE EXISTS ( SELECT 1 FROM managers AS mgr WHERE mgr.status = rgn.status );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "rgn", "inner_alias": "mgr", "proj_col": "amount", "join_col": "status", "correlated_ref": "rgn.status", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_02936
train
v3
Schema: shipments (alias: shp)(date, code, id, amount) departments(level, type, value, id) Task: Find id from shipments where amount exceeds the count of amount from departments for the same level. SQL:
SELECT id FROM shipments AS shp WHERE amount > ( SELECT COUNT(amount) FROM departments AS dept WHERE dept.level = shp.level );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "shp", "inner_alias": "dept", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "shp.level", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_02937
train
v2
Schema: transactions (alias: txn)(amount, id, name, date) orders(value, status, salary, name) Task: Find amount from transactions where a matching record exists in orders with the same level. SQL:
SELECT amount FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM orders AS ord WHERE ord.level = txn.level );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "txn", "inner_alias": "ord", "proj_col": "amount", "join_col": "level", "correlated_ref": "txn.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02938
train
v1
Schema: invoices (alias: inv)(value, date, amount, type) items(salary, value, id, type) Task: Retrieve amount from invoices whose status is found in items rows where id matches the outer record. SQL:
SELECT amount FROM invoices AS inv WHERE status IN ( SELECT status FROM items AS lne WHERE lne.id = inv.id );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "inv", "inner_alias": "lne", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "inv.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02939
train
v2
Schema: customers (alias: cust)(date, level, salary, name) branches(id, status, type, code) Task: Retrieve value from customers that have at least one corresponding entry in branches sharing the same status. SQL:
SELECT value FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM branches AS brc WHERE brc.status = cust.status );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "cust", "inner_alias": "brc", "proj_col": "value", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02940
train
v2
Schema: staff (alias: empl)(level, status, amount, id) regions(status, level, date, salary) Task: Find value from staff where a matching record exists in regions with the same status. SQL:
SELECT value FROM staff AS empl WHERE EXISTS ( SELECT 1 FROM regions AS rgn WHERE rgn.status = empl.status );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "empl", "inner_alias": "rgn", "proj_col": "value", "join_col": "status", "correlated_ref": "empl.status", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_02941
train
v1
Schema: tasks (alias: tsk)(date, amount, id, level) employees(value, status, code, type) Task: Select salary from tasks where level exists in employees for the same status. SQL:
SELECT salary FROM tasks AS tsk WHERE level IN ( SELECT level FROM employees AS emp WHERE emp.status = tsk.status );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "tsk", "inner_alias": "emp", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "tsk.status", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_02942
train
v1
Schema: requests (alias: ordr)(value, amount, type, date) regions(name, status, amount, value) Task: Find amount from requests where status appears in regions entries with matching type. SQL:
SELECT amount FROM requests AS ordr WHERE status IN ( SELECT status FROM regions AS rgn WHERE rgn.type = ordr.type );
{ "outer_table": "requests", "inner_table": "regions", "outer_alias": "ordr", "inner_alias": "rgn", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "ordr.type", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_02943
train
v3
Schema: employees (alias: emp)(level, code, date, amount) tasks(level, type, date, code) Task: Retrieve code from employees with salary above the COUNT(salary) of tasks rows sharing the same code. SQL:
SELECT code FROM employees AS emp WHERE salary > ( SELECT COUNT(salary) FROM tasks AS tsk WHERE tsk.code = emp.code );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "emp", "inner_alias": "tsk", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02944
train
v3
Schema: regions (alias: rgn)(status, date, id, type) categories(salary, value, name, amount) Task: Find value from regions where salary exceeds the minimum salary from categories for the same type. SQL:
SELECT value FROM regions AS rgn WHERE salary > ( SELECT MIN(salary) FROM categories AS catg WHERE catg.type = rgn.type );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "rgn", "inner_alias": "catg", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "rgn.type", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_02945
train
v2
Schema: products (alias: prod)(level, type, value, status) staff(id, date, value, type) Task: Find name from products where a matching record exists in staff with the same level. SQL:
SELECT name FROM products AS prod WHERE EXISTS ( SELECT 1 FROM staff AS empl WHERE empl.level = prod.level );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "prod", "inner_alias": "empl", "proj_col": "name", "join_col": "level", "correlated_ref": "prod.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02946
train
v2
Schema: orders (alias: ord)(value, amount, code, name) accounts(id, value, level, date) Task: Find salary from orders where a matching record exists in accounts with the same type. SQL:
SELECT salary FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM accounts AS acct WHERE acct.type = ord.type );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "ord", "inner_alias": "acct", "proj_col": "salary", "join_col": "type", "correlated_ref": "ord.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02947
train
v3
Schema: products (alias: prod)(code, date, salary, name) categories(status, code, type, amount) Task: Find salary from products where amount exceeds the count of value from categories for the same id. SQL:
SELECT salary FROM products AS prod WHERE amount > ( SELECT COUNT(value) FROM categories AS catg WHERE catg.id = prod.id );
{ "outer_table": "products", "inner_table": "categories", "outer_alias": "prod", "inner_alias": "catg", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "prod.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02948
train
v3
Schema: items (alias: lne)(code, date, name, value) departments(level, date, name, status) Task: Find amount from items where salary exceeds the average amount from departments for the same status. SQL:
SELECT amount FROM items AS lne WHERE salary > ( SELECT AVG(amount) FROM departments AS dept WHERE dept.status = lne.status );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "lne", "inner_alias": "dept", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "lne.status", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_02949
train
v1
Schema: tasks (alias: tsk)(amount, status, level, value) branches(date, status, type, amount) Task: Find name from tasks where type appears in branches entries with matching type. SQL:
SELECT name FROM tasks AS tsk WHERE type IN ( SELECT type FROM branches AS brc WHERE brc.type = tsk.type );
{ "outer_table": "tasks", "inner_table": "branches", "outer_alias": "tsk", "inner_alias": "brc", "proj_col": "name", "filter_col": "type", "join_col": "type", "correlated_ref": "tsk.type", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_02950
train
v1
Schema: staff (alias: empl)(name, status, type, amount) requests(code, id, value, amount) Task: Select amount from staff where level exists in requests for the same status. SQL:
SELECT amount FROM staff AS empl WHERE level IN ( SELECT level FROM requests AS ordr WHERE ordr.status = empl.status );
{ "outer_table": "staff", "inner_table": "requests", "outer_alias": "empl", "inner_alias": "ordr", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "empl.status", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_02951
train
v1
Schema: categories (alias: catg)(value, salary, level, status) schedules(name, code, id, type) Task: Retrieve value from categories whose status is found in schedules rows where code matches the outer record. SQL:
SELECT value FROM categories AS catg WHERE status IN ( SELECT status FROM schedules AS schd WHERE schd.code = catg.code );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "catg", "inner_alias": "schd", "proj_col": "value", "filter_col": "status", "join_col": "code", "correlated_ref": "catg.code", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_02952
train
v2
Schema: requests (alias: ordr)(date, salary, type, status) accounts(value, amount, status, date) Task: Retrieve salary from requests that have at least one corresponding entry in accounts sharing the same type. SQL:
SELECT salary FROM requests AS ordr WHERE EXISTS ( SELECT 1 FROM accounts AS acct WHERE acct.type = ordr.type );
{ "outer_table": "requests", "inner_table": "accounts", "outer_alias": "ordr", "inner_alias": "acct", "proj_col": "salary", "join_col": "type", "correlated_ref": "ordr.type", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_02953
train
v3
Schema: tasks (alias: tsk)(type, amount, name, value) managers(name, salary, type, id) Task: Retrieve code from tasks with value above the MIN(value) of managers rows sharing the same type. SQL:
SELECT code FROM tasks AS tsk WHERE value > ( SELECT MIN(value) FROM managers AS mgr WHERE mgr.type = tsk.type );
{ "outer_table": "tasks", "inner_table": "managers", "outer_alias": "tsk", "inner_alias": "mgr", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "tsk.type", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_02954
train
v3
Schema: branches (alias: brc)(date, salary, name, level) managers(level, name, amount, date) Task: Find name from branches where value exceeds the average salary from managers for the same type. SQL:
SELECT name FROM branches AS brc WHERE value > ( SELECT AVG(salary) FROM managers AS mgr WHERE mgr.type = brc.type );
{ "outer_table": "branches", "inner_table": "managers", "outer_alias": "brc", "inner_alias": "mgr", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "brc.type", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_02955
train
v1
Schema: shipments (alias: shp)(date, name, value, id) orders(value, date, salary, status) Task: Select code from shipments where level exists in orders for the same id. SQL:
SELECT code FROM shipments AS shp WHERE level IN ( SELECT level FROM orders AS ord WHERE ord.id = shp.id );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "shp", "inner_alias": "ord", "proj_col": "code", "filter_col": "level", "join_col": "id", "correlated_ref": "shp.id", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_02956
train
v3
Schema: departments (alias: dept)(code, type, id, date) requests(level, amount, code, id) Task: Find name from departments where salary exceeds the count of value from requests for the same status. SQL:
SELECT name FROM departments AS dept WHERE salary > ( SELECT COUNT(value) FROM requests AS ordr WHERE ordr.status = dept.status );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dept", "inner_alias": "ordr", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "dept.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02957
train
v2
Schema: sales (alias: sale)(code, status, name, id) transactions(type, level, amount, name) Task: Find value from sales where a matching record exists in transactions with the same status. SQL:
SELECT value FROM sales AS sale WHERE EXISTS ( SELECT 1 FROM transactions AS txn WHERE txn.status = sale.status );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "sale", "inner_alias": "txn", "proj_col": "value", "join_col": "status", "correlated_ref": "sale.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02958
train
v1
Schema: schedules (alias: schd)(amount, value, code, id) customers(name, salary, id, type) Task: Retrieve amount from schedules whose status is found in customers rows where status matches the outer record. SQL:
SELECT amount FROM schedules AS schd WHERE status IN ( SELECT status FROM customers AS cust WHERE cust.status = schd.status );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "schd", "inner_alias": "cust", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "schd.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_02959
train
v2
Schema: tasks (alias: tsk)(level, amount, code, value) staff(value, level, id, code) Task: Find name from tasks where a matching record exists in staff with the same id. SQL:
SELECT name FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM staff AS empl WHERE empl.id = tsk.id );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "tsk", "inner_alias": "empl", "proj_col": "name", "join_col": "id", "correlated_ref": "tsk.id", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_02960
train
v3
Schema: products (alias: prod)(salary, type, level, amount) orders(name, id, date, type) Task: Find value from products where value exceeds the total salary from orders for the same level. SQL:
SELECT value FROM products AS prod WHERE value > ( SELECT SUM(salary) FROM orders AS ord WHERE ord.level = prod.level );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "prod", "inner_alias": "ord", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "prod.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02961
train
v1
Schema: schedules (alias: schd)(type, code, level, amount) branches(amount, id, type, status) Task: Select salary from schedules where id exists in branches for the same status. SQL:
SELECT salary FROM schedules AS schd WHERE id IN ( SELECT id FROM branches AS brc WHERE brc.status = schd.status );
{ "outer_table": "schedules", "inner_table": "branches", "outer_alias": "schd", "inner_alias": "brc", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "schd.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_02962
train
v1
Schema: sales (alias: sale)(salary, id, level, code) employees(id, level, value, status) Task: Find amount from sales where type appears in employees entries with matching level. SQL:
SELECT amount FROM sales AS sale WHERE type IN ( SELECT type FROM employees AS emp WHERE emp.level = sale.level );
{ "outer_table": "sales", "inner_table": "employees", "outer_alias": "sale", "inner_alias": "emp", "proj_col": "amount", "filter_col": "type", "join_col": "level", "correlated_ref": "sale.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02963
train
v2
Schema: transactions (alias: txn)(value, level, status, date) shipments(status, level, salary, code) Task: Find name from transactions where a matching record exists in shipments with the same status. SQL:
SELECT name FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM shipments AS shp WHERE shp.status = txn.status );
{ "outer_table": "transactions", "inner_table": "shipments", "outer_alias": "txn", "inner_alias": "shp", "proj_col": "name", "join_col": "status", "correlated_ref": "txn.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02964
train
v1
Schema: employees (alias: emp)(salary, code, value, level) staff(code, type, amount, level) Task: Retrieve value from employees whose status is found in staff rows where status matches the outer record. SQL:
SELECT value FROM employees AS emp WHERE status IN ( SELECT status FROM staff AS empl WHERE empl.status = emp.status );
{ "outer_table": "employees", "inner_table": "staff", "outer_alias": "emp", "inner_alias": "empl", "proj_col": "value", "filter_col": "status", "join_col": "status", "correlated_ref": "emp.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02965
train
v3
Schema: items (alias: lne)(code, level, type, salary) regions(salary, name, id, value) Task: Retrieve id from items with value above the SUM(amount) of regions rows sharing the same type. SQL:
SELECT id FROM items AS lne WHERE value > ( SELECT SUM(amount) FROM regions AS rgn WHERE rgn.type = lne.type );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "lne", "inner_alias": "rgn", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "lne.type", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_02966
train
v3
Schema: branches (alias: brc)(salary, id, date, status) accounts(amount, type, value, date) Task: Find name from branches where value exceeds the count of salary from accounts for the same level. SQL:
SELECT name FROM branches AS brc WHERE value > ( SELECT COUNT(salary) FROM accounts AS acct WHERE acct.level = brc.level );
{ "outer_table": "branches", "inner_table": "accounts", "outer_alias": "brc", "inner_alias": "acct", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "brc.level", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_02967
train
v3
Schema: staff (alias: empl)(name, code, amount, date) accounts(amount, type, id, name) Task: Retrieve name from staff with amount above the COUNT(salary) of accounts rows sharing the same type. SQL:
SELECT name FROM staff AS empl WHERE amount > ( SELECT COUNT(salary) FROM accounts AS acct WHERE acct.type = empl.type );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "empl", "inner_alias": "acct", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "empl.type", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_02968
train
v2
Schema: tasks (alias: tsk)(name, level, status, code) sales(code, name, value, level) Task: Find id from tasks where a matching record exists in sales with the same status. SQL:
SELECT id FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM sales AS sale WHERE sale.status = tsk.status );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "tsk", "inner_alias": "sale", "proj_col": "id", "join_col": "status", "correlated_ref": "tsk.status", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_02969
train
v2
Schema: orders (alias: ord)(code, name, level, salary) sales(id, value, amount, type) Task: Find salary from orders where a matching record exists in sales with the same id. SQL:
SELECT salary FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM sales AS sale WHERE sale.id = ord.id );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "ord", "inner_alias": "sale", "proj_col": "salary", "join_col": "id", "correlated_ref": "ord.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02970
train
v3
Schema: shipments (alias: shp)(amount, code, name, date) items(id, status, salary, name) Task: Find name from shipments where amount exceeds the average salary from items for the same code. SQL:
SELECT name FROM shipments AS shp WHERE amount > ( SELECT AVG(salary) FROM items AS lne WHERE lne.code = shp.code );
{ "outer_table": "shipments", "inner_table": "items", "outer_alias": "shp", "inner_alias": "lne", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "shp.code", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_02971
train
v2
Schema: products (alias: prod)(date, type, level, salary) departments(status, code, type, date) Task: Retrieve value from products that have at least one corresponding entry in departments sharing the same level. SQL:
SELECT value FROM products AS prod WHERE EXISTS ( SELECT 1 FROM departments AS dept WHERE dept.level = prod.level );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "prod", "inner_alias": "dept", "proj_col": "value", "join_col": "level", "correlated_ref": "prod.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02972
train
v1
Schema: shipments (alias: shp)(date, value, id, code) accounts(type, date, amount, value) Task: Select id from shipments where code exists in accounts for the same level. SQL:
SELECT id FROM shipments AS shp WHERE code IN ( SELECT code FROM accounts AS acct WHERE acct.level = shp.level );
{ "outer_table": "shipments", "inner_table": "accounts", "outer_alias": "shp", "inner_alias": "acct", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "shp.level", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_02973
train
v2
Schema: transactions (alias: txn)(amount, status, id, code) tasks(status, amount, level, code) Task: Retrieve code from transactions that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT code FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM tasks AS tsk WHERE tsk.id = txn.id );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "txn", "inner_alias": "tsk", "proj_col": "code", "join_col": "id", "correlated_ref": "txn.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02974
train
v3
Schema: departments (alias: dept)(code, amount, status, name) sales(id, value, level, type) Task: Retrieve code from departments with amount above the COUNT(amount) of sales rows sharing the same level. SQL:
SELECT code FROM departments AS dept WHERE amount > ( SELECT COUNT(amount) FROM sales AS sale WHERE sale.level = dept.level );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dept", "inner_alias": "sale", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "dept.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02975
train
v3
Schema: products (alias: prod)(date, level, code, salary) invoices(amount, level, value, name) Task: Find id from products where amount exceeds the total value from invoices for the same type. SQL:
SELECT id FROM products AS prod WHERE amount > ( SELECT SUM(value) FROM invoices AS inv WHERE inv.type = prod.type );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "prod", "inner_alias": "inv", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "prod.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02976
train
v2
Schema: employees (alias: emp)(date, id, status, amount) transactions(status, salary, date, amount) Task: Retrieve amount from employees that have at least one corresponding entry in transactions sharing the same id. SQL:
SELECT amount FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM transactions AS txn WHERE txn.id = emp.id );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "emp", "inner_alias": "txn", "proj_col": "amount", "join_col": "id", "correlated_ref": "emp.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02977
train
v3
Schema: regions (alias: rgn)(value, status, salary, level) accounts(level, value, code, amount) Task: Find code from regions where value exceeds the minimum amount from accounts for the same level. SQL:
SELECT code FROM regions AS rgn WHERE value > ( SELECT MIN(amount) FROM accounts AS acct WHERE acct.level = rgn.level );
{ "outer_table": "regions", "inner_table": "accounts", "outer_alias": "rgn", "inner_alias": "acct", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "rgn.level", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_02978
train
v1
Schema: shipments (alias: shp)(value, salary, status, code) customers(date, level, name, code) Task: Retrieve code from shipments whose code is found in customers rows where id matches the outer record. SQL:
SELECT code FROM shipments AS shp WHERE code IN ( SELECT code FROM customers AS cust WHERE cust.id = shp.id );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "shp", "inner_alias": "cust", "proj_col": "code", "filter_col": "code", "join_col": "id", "correlated_ref": "shp.id", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_02979
train
v1
Schema: regions (alias: rgn)(type, salary, status, code) sales(code, value, amount, id) Task: Find value from regions where code appears in sales entries with matching type. SQL:
SELECT value FROM regions AS rgn WHERE code IN ( SELECT code FROM sales AS sale WHERE sale.type = rgn.type );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "rgn", "inner_alias": "sale", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "rgn.type", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_02980
train
v2
Schema: departments (alias: dept)(salary, date, name, type) branches(type, amount, status, value) Task: Find code from departments where a matching record exists in branches with the same level. SQL:
SELECT code FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM branches AS brc WHERE brc.level = dept.level );
{ "outer_table": "departments", "inner_table": "branches", "outer_alias": "dept", "inner_alias": "brc", "proj_col": "code", "join_col": "level", "correlated_ref": "dept.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02981
train
v2
Schema: items (alias: lne)(code, level, id, status) categories(salary, date, amount, name) Task: Find amount from items where a matching record exists in categories with the same code. SQL:
SELECT amount FROM items AS lne WHERE EXISTS ( SELECT 1 FROM categories AS catg WHERE catg.code = lne.code );
{ "outer_table": "items", "inner_table": "categories", "outer_alias": "lne", "inner_alias": "catg", "proj_col": "amount", "join_col": "code", "correlated_ref": "lne.code", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_02982
train
v2
Schema: products (alias: prod)(salary, status, type, amount) items(salary, amount, value, code) Task: Retrieve amount from products that have at least one corresponding entry in items sharing the same type. SQL:
SELECT amount FROM products AS prod WHERE EXISTS ( SELECT 1 FROM items AS lne WHERE lne.type = prod.type );
{ "outer_table": "products", "inner_table": "items", "outer_alias": "prod", "inner_alias": "lne", "proj_col": "amount", "join_col": "type", "correlated_ref": "prod.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02983
train
v1
Schema: products (alias: prod)(value, code, id, amount) orders(type, code, level, date) Task: Select amount from products where status exists in orders for the same code. SQL:
SELECT amount FROM products AS prod WHERE status IN ( SELECT status FROM orders AS ord WHERE ord.code = prod.code );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "prod", "inner_alias": "ord", "proj_col": "amount", "filter_col": "status", "join_col": "code", "correlated_ref": "prod.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02984
train
v3
Schema: products (alias: prod)(level, amount, id, date) customers(level, amount, status, id) Task: Find code from products where amount exceeds the maximum value from customers for the same code. SQL:
SELECT code FROM products AS prod WHERE amount > ( SELECT MAX(value) FROM customers AS cust WHERE cust.code = prod.code );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "prod", "inner_alias": "cust", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "prod.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02985
train
v1
Schema: managers (alias: mgr)(name, type, id, amount) products(type, level, code, salary) Task: Select name from managers where code exists in products for the same status. SQL:
SELECT name FROM managers AS mgr WHERE code IN ( SELECT code FROM products AS prod WHERE prod.status = mgr.status );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "mgr", "inner_alias": "prod", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "mgr.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02986
train
v3
Schema: tasks (alias: tsk)(name, code, date, level) branches(name, salary, date, status) Task: Retrieve amount from tasks with salary above the COUNT(amount) of branches rows sharing the same level. SQL:
SELECT amount FROM tasks AS tsk WHERE salary > ( SELECT COUNT(amount) FROM branches AS brc WHERE brc.level = tsk.level );
{ "outer_table": "tasks", "inner_table": "branches", "outer_alias": "tsk", "inner_alias": "brc", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "tsk.level", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_02987
train
v1
Schema: items (alias: lne)(amount, date, level, code) invoices(type, code, value, name) Task: Retrieve amount from items whose id is found in invoices rows where level matches the outer record. SQL:
SELECT amount FROM items AS lne WHERE id IN ( SELECT id FROM invoices AS inv WHERE inv.level = lne.level );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "lne", "inner_alias": "inv", "proj_col": "amount", "filter_col": "id", "join_col": "level", "correlated_ref": "lne.level", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_02988
train
v3
Schema: tasks (alias: tsk)(name, code, amount, value) orders(date, code, salary, level) Task: Find id from tasks where amount exceeds the total amount from orders for the same status. SQL:
SELECT id FROM tasks AS tsk WHERE amount > ( SELECT SUM(amount) FROM orders AS ord WHERE ord.status = tsk.status );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "tsk", "inner_alias": "ord", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "tsk.status", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_02989
train
v1
Schema: schedules (alias: schd)(amount, date, id, salary) managers(id, value, date, level) Task: Select amount from schedules where status exists in managers for the same code. SQL:
SELECT amount FROM schedules AS schd WHERE status IN ( SELECT status FROM managers AS mgr WHERE mgr.code = schd.code );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "schd", "inner_alias": "mgr", "proj_col": "amount", "filter_col": "status", "join_col": "code", "correlated_ref": "schd.code", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_02990
train
v2
Schema: schedules (alias: schd)(value, status, id, name) items(date, name, amount, type) Task: Find id from schedules where a matching record exists in items with the same code. SQL:
SELECT id FROM schedules AS schd WHERE EXISTS ( SELECT 1 FROM items AS lne WHERE lne.code = schd.code );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "schd", "inner_alias": "lne", "proj_col": "id", "join_col": "code", "correlated_ref": "schd.code", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_02991
train
v2
Schema: projects (alias: prj)(code, amount, date, salary) invoices(type, status, value, code) Task: Retrieve id from projects that have at least one corresponding entry in invoices sharing the same status. SQL:
SELECT id FROM projects AS prj WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.status = prj.status );
{ "outer_table": "projects", "inner_table": "invoices", "outer_alias": "prj", "inner_alias": "inv", "proj_col": "id", "join_col": "status", "correlated_ref": "prj.status", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_02992
train
v3
Schema: branches (alias: brc)(amount, type, id, name) departments(status, amount, date, code) Task: Retrieve code from branches with value above the MIN(salary) of departments rows sharing the same status. SQL:
SELECT code FROM branches AS brc WHERE value > ( SELECT MIN(salary) FROM departments AS dept WHERE dept.status = brc.status );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "brc", "inner_alias": "dept", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "brc.status", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_02993
train
v1
Schema: invoices (alias: inv)(name, code, status, type) orders(type, name, date, code) Task: Find value from invoices where id appears in orders entries with matching status. SQL:
SELECT value FROM invoices AS inv WHERE id IN ( SELECT id FROM orders AS ord WHERE ord.status = inv.status );
{ "outer_table": "invoices", "inner_table": "orders", "outer_alias": "inv", "inner_alias": "ord", "proj_col": "value", "filter_col": "id", "join_col": "status", "correlated_ref": "inv.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02994
train
v2
Schema: requests (alias: ordr)(name, date, value, salary) departments(code, name, status, value) Task: Retrieve value from requests that have at least one corresponding entry in departments sharing the same level. SQL:
SELECT value FROM requests AS ordr WHERE EXISTS ( SELECT 1 FROM departments AS dept WHERE dept.level = ordr.level );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ordr", "inner_alias": "dept", "proj_col": "value", "join_col": "level", "correlated_ref": "ordr.level", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_02995
train
v2
Schema: products (alias: prod)(status, code, level, date) managers(level, value, date, salary) Task: Retrieve code from products that have at least one corresponding entry in managers sharing the same id. SQL:
SELECT code FROM products AS prod WHERE EXISTS ( SELECT 1 FROM managers AS mgr WHERE mgr.id = prod.id );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "prod", "inner_alias": "mgr", "proj_col": "code", "join_col": "id", "correlated_ref": "prod.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02996
train
v2
Schema: managers (alias: mgr)(level, name, code, id) requests(salary, value, name, id) Task: Find code from managers where a matching record exists in requests with the same level. SQL:
SELECT code FROM managers AS mgr WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.level = mgr.level );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "mgr", "inner_alias": "ordr", "proj_col": "code", "join_col": "level", "correlated_ref": "mgr.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02997
train
v3
Schema: shipments (alias: shp)(status, level, date, amount) sales(value, salary, level, id) Task: Retrieve value from shipments with amount above the SUM(salary) of sales rows sharing the same code. SQL:
SELECT value FROM shipments AS shp WHERE amount > ( SELECT SUM(salary) FROM sales AS sale WHERE sale.code = shp.code );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "shp", "inner_alias": "sale", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "shp.code", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_02998
train
v2
Schema: departments (alias: dept)(amount, date, value, salary) items(id, name, code, level) Task: Retrieve name from departments that have at least one corresponding entry in items sharing the same id. SQL:
SELECT name FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM items AS lne WHERE lne.id = dept.id );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dept", "inner_alias": "lne", "proj_col": "name", "join_col": "id", "correlated_ref": "dept.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_02999
train