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
v2
Schema: departments (alias: dept)(type, value, level, id) tasks(type, value, level, code) Task: Find salary from departments where a matching record exists in tasks with the same status. SQL:
SELECT salary FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM tasks AS tsk WHERE tsk.status = dept.status );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dept", "inner_alias": "tsk", "proj_col": "salary", "join_col": "status", "correlated_ref": "dept.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05200
train
v3
Schema: customers (alias: cust)(status, salary, level, type) schedules(level, type, id, date) Task: Retrieve value from customers with value above the AVG(salary) of schedules rows sharing the same type. SQL:
SELECT value FROM customers AS cust WHERE value > ( SELECT AVG(salary) FROM schedules AS schd WHERE schd.type = cust.type );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "cust", "inner_alias": "schd", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "cust.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05201
train
v2
Schema: regions (alias: rgn)(type, id, level, name) accounts(status, id, amount, date) Task: Retrieve amount from regions that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT amount FROM regions AS rgn WHERE EXISTS ( SELECT 1 FROM accounts AS acct WHERE acct.code = rgn.code );
{ "outer_table": "regions", "inner_table": "accounts", "outer_alias": "rgn", "inner_alias": "acct", "proj_col": "amount", "join_col": "code", "correlated_ref": "rgn.code", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_05202
train
v2
Schema: employees (alias: emp)(status, salary, amount, level) regions(id, level, salary, value) Task: Find id from employees where a matching record exists in regions with the same status. SQL:
SELECT id FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM regions AS rgn WHERE rgn.status = emp.status );
{ "outer_table": "employees", "inner_table": "regions", "outer_alias": "emp", "inner_alias": "rgn", "proj_col": "id", "join_col": "status", "correlated_ref": "emp.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05203
train
v2
Schema: staff (alias: empl)(id, code, date, type) projects(date, amount, value, type) Task: Retrieve id from staff that have at least one corresponding entry in projects sharing the same status. SQL:
SELECT id FROM staff AS empl WHERE EXISTS ( SELECT 1 FROM projects AS prj WHERE prj.status = empl.status );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "empl", "inner_alias": "prj", "proj_col": "id", "join_col": "status", "correlated_ref": "empl.status", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_05204
train
v2
Schema: departments (alias: dept)(type, value, date, name) shipments(date, type, value, id) Task: Retrieve name from departments that have at least one corresponding entry in shipments sharing the same level. SQL:
SELECT name FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM shipments AS shp WHERE shp.level = dept.level );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dept", "inner_alias": "shp", "proj_col": "name", "join_col": "level", "correlated_ref": "dept.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05205
train
v1
Schema: managers (alias: mgr)(value, name, type, amount) transactions(level, type, salary, status) Task: Find amount from managers where id appears in transactions entries with matching id. SQL:
SELECT amount FROM managers AS mgr WHERE id IN ( SELECT id FROM transactions AS txn WHERE txn.id = mgr.id );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "mgr", "inner_alias": "txn", "proj_col": "amount", "filter_col": "id", "join_col": "id", "correlated_ref": "mgr.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05206
train
v1
Schema: employees (alias: emp)(amount, salary, level, code) managers(date, amount, value, status) Task: Find amount from employees where level appears in managers entries with matching id. SQL:
SELECT amount FROM employees AS emp WHERE level IN ( SELECT level FROM managers AS mgr WHERE mgr.id = emp.id );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "emp", "inner_alias": "mgr", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "emp.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05207
train
v2
Schema: items (alias: lne)(type, salary, status, name) projects(level, name, date, salary) Task: Retrieve amount from items that have at least one corresponding entry in projects sharing the same type. SQL:
SELECT amount FROM items AS lne WHERE EXISTS ( SELECT 1 FROM projects AS prj WHERE prj.type = lne.type );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "lne", "inner_alias": "prj", "proj_col": "amount", "join_col": "type", "correlated_ref": "lne.type", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_05208
train
v2
Schema: departments (alias: dept)(level, amount, date, code) categories(date, salary, value, level) Task: Retrieve value from departments that have at least one corresponding entry in categories sharing the same type. SQL:
SELECT value FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM categories AS catg WHERE catg.type = dept.type );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dept", "inner_alias": "catg", "proj_col": "value", "join_col": "type", "correlated_ref": "dept.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05209
train
v3
Schema: sales (alias: sale)(type, code, amount, name) regions(name, date, id, level) Task: Retrieve name from sales with value above the SUM(salary) of regions rows sharing the same code. SQL:
SELECT name FROM sales AS sale WHERE value > ( SELECT SUM(salary) FROM regions AS rgn WHERE rgn.code = sale.code );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "sale", "inner_alias": "rgn", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "sale.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05210
train
v2
Schema: projects (alias: prj)(code, type, name, salary) invoices(date, status, salary, name) Task: Find code from projects where a matching record exists in invoices with the same code. SQL:
SELECT code FROM projects AS prj WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.code = prj.code );
{ "outer_table": "projects", "inner_table": "invoices", "outer_alias": "prj", "inner_alias": "inv", "proj_col": "code", "join_col": "code", "correlated_ref": "prj.code", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_05211
train
v2
Schema: employees (alias: emp)(amount, id, name, value) invoices(amount, id, name, status) Task: Find salary from employees where a matching record exists in invoices with the same level. SQL:
SELECT salary FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.level = emp.level );
{ "outer_table": "employees", "inner_table": "invoices", "outer_alias": "emp", "inner_alias": "inv", "proj_col": "salary", "join_col": "level", "correlated_ref": "emp.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05212
train
v1
Schema: accounts (alias: acct)(date, value, amount, level) items(status, value, level, id) Task: Find value from accounts where code appears in items entries with matching level. SQL:
SELECT value FROM accounts AS acct WHERE code IN ( SELECT code FROM items AS lne WHERE lne.level = acct.level );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "acct", "inner_alias": "lne", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "acct.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05213
train
v2
Schema: transactions (alias: txn)(name, code, status, id) products(salary, name, status, amount) Task: Retrieve value from transactions that have at least one corresponding entry in products sharing the same type. SQL:
SELECT value FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM products AS prod WHERE prod.type = txn.type );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "txn", "inner_alias": "prod", "proj_col": "value", "join_col": "type", "correlated_ref": "txn.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05214
train
v1
Schema: managers (alias: mgr)(date, name, value, code) branches(value, status, date, name) Task: Retrieve value from managers whose id is found in branches rows where type matches the outer record. SQL:
SELECT value FROM managers AS mgr WHERE id IN ( SELECT id FROM branches AS brc WHERE brc.type = mgr.type );
{ "outer_table": "managers", "inner_table": "branches", "outer_alias": "mgr", "inner_alias": "brc", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "mgr.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05215
train
v1
Schema: products (alias: prod)(name, level, status, type) accounts(value, code, id, type) Task: Select name from products where code exists in accounts for the same id. SQL:
SELECT name FROM products AS prod WHERE code IN ( SELECT code 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": "code", "join_col": "id", "correlated_ref": "prod.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05216
train
v2
Schema: customers (alias: cust)(id, date, code, value) staff(amount, level, salary, date) Task: Retrieve salary from customers that have at least one corresponding entry in staff sharing the same id. SQL:
SELECT salary 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": "salary", "join_col": "id", "correlated_ref": "cust.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05217
train
v1
Schema: transactions (alias: txn)(level, code, value, name) products(status, name, type, amount) Task: Retrieve name from transactions whose level is found in products rows where status matches the outer record. SQL:
SELECT name FROM transactions AS txn WHERE level IN ( SELECT level FROM products AS prod WHERE prod.status = txn.status );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "txn", "inner_alias": "prod", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "txn.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05218
train
v3
Schema: regions (alias: rgn)(status, amount, level, code) projects(level, code, amount, name) Task: Retrieve salary from regions with salary above the MIN(salary) of projects rows sharing the same level. SQL:
SELECT salary FROM regions AS rgn WHERE salary > ( SELECT MIN(salary) FROM projects AS prj WHERE prj.level = rgn.level );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "rgn", "inner_alias": "prj", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "rgn.level", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_05219
train
v2
Schema: branches (alias: brc)(date, name, code, value) customers(type, status, amount, value) Task: Find value from branches where a matching record exists in customers with the same type. SQL:
SELECT value FROM branches AS brc WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.type = brc.type );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "brc", "inner_alias": "cust", "proj_col": "value", "join_col": "type", "correlated_ref": "brc.type", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_05220
train
v2
Schema: sales (alias: sale)(salary, level, date, type) customers(level, name, amount, value) Task: Retrieve salary from sales that have at least one corresponding entry in customers sharing the same code. SQL:
SELECT salary FROM sales AS sale WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.code = sale.code );
{ "outer_table": "sales", "inner_table": "customers", "outer_alias": "sale", "inner_alias": "cust", "proj_col": "salary", "join_col": "code", "correlated_ref": "sale.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05221
train
v3
Schema: employees (alias: emp)(amount, value, type, id) managers(id, code, value, status) Task: Find id from employees where amount exceeds the total salary from managers for the same type. SQL:
SELECT id FROM employees AS emp WHERE amount > ( SELECT SUM(salary) FROM managers AS mgr WHERE mgr.type = emp.type );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "emp", "inner_alias": "mgr", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "emp.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05222
train
v3
Schema: regions (alias: rgn)(type, name, status, salary) staff(level, id, status, amount) Task: Retrieve salary from regions with amount above the MIN(value) of staff rows sharing the same code. SQL:
SELECT salary FROM regions AS rgn WHERE amount > ( SELECT MIN(value) FROM staff AS empl WHERE empl.code = rgn.code );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "rgn", "inner_alias": "empl", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "rgn.code", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_05223
train
v1
Schema: sales (alias: sale)(salary, type, name, date) schedules(code, salary, level, value) Task: Retrieve amount from sales whose level is found in schedules rows where type matches the outer record. SQL:
SELECT amount FROM sales AS sale WHERE level IN ( SELECT level FROM schedules AS schd WHERE schd.type = sale.type );
{ "outer_table": "sales", "inner_table": "schedules", "outer_alias": "sale", "inner_alias": "schd", "proj_col": "amount", "filter_col": "level", "join_col": "type", "correlated_ref": "sale.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05224
train
v2
Schema: items (alias: lne)(type, id, salary, date) managers(level, value, amount, name) Task: Find id from items where a matching record exists in managers with the same status. SQL:
SELECT id FROM items AS lne WHERE EXISTS ( SELECT 1 FROM managers AS mgr WHERE mgr.status = lne.status );
{ "outer_table": "items", "inner_table": "managers", "outer_alias": "lne", "inner_alias": "mgr", "proj_col": "id", "join_col": "status", "correlated_ref": "lne.status", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_05225
train
v3
Schema: staff (alias: empl)(date, amount, id, level) sales(value, id, type, status) Task: Find salary from staff where amount exceeds the maximum value from sales for the same level. SQL:
SELECT salary FROM staff AS empl WHERE amount > ( SELECT MAX(value) FROM sales AS sale WHERE sale.level = empl.level );
{ "outer_table": "staff", "inner_table": "sales", "outer_alias": "empl", "inner_alias": "sale", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "empl.level", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_05226
train
v3
Schema: regions (alias: rgn)(status, amount, type, value) departments(amount, date, name, salary) Task: Find name from regions where amount exceeds the total salary from departments for the same status. SQL:
SELECT name FROM regions AS rgn WHERE amount > ( SELECT SUM(salary) FROM departments AS dept WHERE dept.status = rgn.status );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "rgn", "inner_alias": "dept", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "rgn.status", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_05227
train
v1
Schema: categories (alias: catg)(id, name, code, level) employees(type, amount, level, value) Task: Select code from categories where type exists in employees for the same status. SQL:
SELECT code FROM categories AS catg WHERE type IN ( SELECT type FROM employees AS emp WHERE emp.status = catg.status );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "catg", "inner_alias": "emp", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "catg.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_05228
train
v2
Schema: customers (alias: cust)(type, value, level, salary) managers(type, value, id, level) Task: Retrieve name from customers that have at least one corresponding entry in managers sharing the same code. SQL:
SELECT name FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM managers AS mgr WHERE mgr.code = cust.code );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "cust", "inner_alias": "mgr", "proj_col": "name", "join_col": "code", "correlated_ref": "cust.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05229
train
v3
Schema: categories (alias: catg)(status, name, id, type) accounts(id, amount, code, value) Task: Retrieve code from categories with value above the AVG(value) of accounts rows sharing the same status. SQL:
SELECT code FROM categories AS catg WHERE value > ( SELECT AVG(value) FROM accounts AS acct WHERE acct.status = catg.status );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "catg", "inner_alias": "acct", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "catg.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_05230
train
v3
Schema: customers (alias: cust)(name, amount, date, value) tasks(name, date, amount, value) Task: Find name from customers where value exceeds the average salary from tasks for the same status. SQL:
SELECT name FROM customers AS cust WHERE value > ( SELECT AVG(salary) FROM tasks AS tsk WHERE tsk.status = cust.status );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "cust", "inner_alias": "tsk", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05231
train
v1
Schema: departments (alias: dept)(code, date, status, amount) sales(id, name, status, level) Task: Find id from departments where id appears in sales entries with matching status. SQL:
SELECT id FROM departments AS dept WHERE id IN ( SELECT id FROM sales AS sale WHERE sale.status = dept.status );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dept", "inner_alias": "sale", "proj_col": "id", "filter_col": "id", "join_col": "status", "correlated_ref": "dept.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05232
train
v2
Schema: products (alias: prod)(name, value, status, date) employees(name, code, id, status) Task: Find value from products where a matching record exists in employees with the same level. SQL:
SELECT value FROM products AS prod WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.level = prod.level );
{ "outer_table": "products", "inner_table": "employees", "outer_alias": "prod", "inner_alias": "emp", "proj_col": "value", "join_col": "level", "correlated_ref": "prod.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05233
train
v1
Schema: requests (alias: ordr)(id, value, status, amount) schedules(name, value, amount, status) Task: Find amount from requests where status appears in schedules entries with matching code. SQL:
SELECT amount FROM requests AS ordr WHERE status IN ( SELECT status FROM schedules AS schd WHERE schd.code = ordr.code );
{ "outer_table": "requests", "inner_table": "schedules", "outer_alias": "ordr", "inner_alias": "schd", "proj_col": "amount", "filter_col": "status", "join_col": "code", "correlated_ref": "ordr.code", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_05234
train
v1
Schema: invoices (alias: inv)(status, id, value, name) schedules(value, name, date, salary) Task: Select value from invoices where id exists in schedules for the same level. SQL:
SELECT value FROM invoices AS inv WHERE id IN ( SELECT id FROM schedules AS schd WHERE schd.level = inv.level );
{ "outer_table": "invoices", "inner_table": "schedules", "outer_alias": "inv", "inner_alias": "schd", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "inv.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05235
train
v2
Schema: products (alias: prod)(date, amount, name, value) regions(name, amount, type, date) Task: Find amount from products where a matching record exists in regions with the same type. SQL:
SELECT amount FROM products AS prod WHERE EXISTS ( SELECT 1 FROM regions AS rgn WHERE rgn.type = prod.type );
{ "outer_table": "products", "inner_table": "regions", "outer_alias": "prod", "inner_alias": "rgn", "proj_col": "amount", "join_col": "type", "correlated_ref": "prod.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05236
train
v2
Schema: projects (alias: prj)(salary, type, amount, value) departments(name, id, date, code) Task: Retrieve amount from projects that have at least one corresponding entry in departments sharing the same status. SQL:
SELECT amount FROM projects AS prj WHERE EXISTS ( SELECT 1 FROM departments AS dept WHERE dept.status = prj.status );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "prj", "inner_alias": "dept", "proj_col": "amount", "join_col": "status", "correlated_ref": "prj.status", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_05237
train
v2
Schema: departments (alias: dept)(id, value, level, amount) customers(level, code, type, value) Task: Find name from departments where a matching record exists in customers with the same status. SQL:
SELECT name FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.status = dept.status );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dept", "inner_alias": "cust", "proj_col": "name", "join_col": "status", "correlated_ref": "dept.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05238
train
v3
Schema: customers (alias: cust)(level, status, amount, value) products(salary, id, amount, name) Task: Find id from customers where amount exceeds the maximum value from products for the same id. SQL:
SELECT id FROM customers AS cust WHERE amount > ( SELECT MAX(value) FROM products AS prod WHERE prod.id = cust.id );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "cust", "inner_alias": "prod", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "cust.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05239
train
v1
Schema: requests (alias: ordr)(salary, type, code, value) categories(status, code, amount, name) Task: Find id from requests where code appears in categories entries with matching status. SQL:
SELECT id FROM requests AS ordr WHERE code IN ( SELECT code FROM categories AS catg WHERE catg.status = ordr.status );
{ "outer_table": "requests", "inner_table": "categories", "outer_alias": "ordr", "inner_alias": "catg", "proj_col": "id", "filter_col": "code", "join_col": "status", "correlated_ref": "ordr.status", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_05240
train
v1
Schema: tasks (alias: tsk)(id, name, status, salary) regions(code, type, salary, status) Task: Select salary from tasks where status exists in regions for the same status. SQL:
SELECT salary FROM tasks AS tsk WHERE status IN ( SELECT status FROM regions AS rgn WHERE rgn.status = tsk.status );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "tsk", "inner_alias": "rgn", "proj_col": "salary", "filter_col": "status", "join_col": "status", "correlated_ref": "tsk.status", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_05241
train
v3
Schema: branches (alias: brc)(code, type, salary, name) orders(name, value, level, status) Task: Find code from branches where amount exceeds the maximum salary from orders for the same id. SQL:
SELECT code FROM branches AS brc WHERE amount > ( SELECT MAX(salary) FROM orders AS ord WHERE ord.id = brc.id );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "brc", "inner_alias": "ord", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "brc.id", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_05242
train
v2
Schema: employees (alias: emp)(value, amount, type, level) products(status, level, code, amount) Task: Find value from employees where a matching record exists in products with the same level. SQL:
SELECT value FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM products AS prod WHERE prod.level = emp.level );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "emp", "inner_alias": "prod", "proj_col": "value", "join_col": "level", "correlated_ref": "emp.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05243
train
v1
Schema: departments (alias: dept)(amount, type, name, salary) regions(code, salary, type, date) Task: Retrieve value from departments whose id is found in regions rows where code matches the outer record. SQL:
SELECT value FROM departments AS dept WHERE id IN ( SELECT id FROM regions AS rgn WHERE rgn.code = dept.code );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dept", "inner_alias": "rgn", "proj_col": "value", "filter_col": "id", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05244
train
v1
Schema: orders (alias: ord)(code, status, date, amount) invoices(id, amount, value, date) Task: Select value from orders where level exists in invoices for the same code. SQL:
SELECT value FROM orders AS ord WHERE level IN ( SELECT level FROM invoices AS inv WHERE inv.code = ord.code );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "ord", "inner_alias": "inv", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "ord.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05245
train
v2
Schema: orders (alias: ord)(amount, type, value, date) items(salary, status, level, type) Task: Retrieve code from orders that have at least one corresponding entry in items sharing the same status. SQL:
SELECT code FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM items AS lne WHERE lne.status = ord.status );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "ord", "inner_alias": "lne", "proj_col": "code", "join_col": "status", "correlated_ref": "ord.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05246
train
v3
Schema: transactions (alias: txn)(salary, id, date, type) orders(code, type, id, status) Task: Retrieve amount from transactions with value above the AVG(amount) of orders rows sharing the same code. SQL:
SELECT amount FROM transactions AS txn WHERE value > ( SELECT AVG(amount) FROM orders AS ord WHERE ord.code = txn.code );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "txn", "inner_alias": "ord", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "txn.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05247
train
v3
Schema: shipments (alias: shp)(code, level, date, id) regions(type, name, id, date) Task: Retrieve value from shipments with value above the COUNT(salary) of regions rows sharing the same id. SQL:
SELECT value FROM shipments AS shp WHERE value > ( SELECT COUNT(salary) FROM regions AS rgn WHERE rgn.id = shp.id );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "shp", "inner_alias": "rgn", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "shp.id", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_05248
train
v3
Schema: projects (alias: prj)(name, salary, amount, status) schedules(status, id, level, amount) Task: Find id from projects where amount exceeds the average salary from schedules for the same id. SQL:
SELECT id FROM projects AS prj WHERE amount > ( SELECT AVG(salary) FROM schedules AS schd WHERE schd.id = prj.id );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "prj", "inner_alias": "schd", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "prj.id", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_05249
train
v2
Schema: products (alias: prod)(value, status, date, code) items(salary, date, code, value) Task: Retrieve salary from products that have at least one corresponding entry in items sharing the same status. SQL:
SELECT salary FROM products AS prod WHERE EXISTS ( SELECT 1 FROM items AS lne WHERE lne.status = prod.status );
{ "outer_table": "products", "inner_table": "items", "outer_alias": "prod", "inner_alias": "lne", "proj_col": "salary", "join_col": "status", "correlated_ref": "prod.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05250
train
v2
Schema: transactions (alias: txn)(value, status, code, salary) customers(name, level, status, type) Task: Find id from transactions where a matching record exists in customers with the same level. SQL:
SELECT id FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.level = txn.level );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "txn", "inner_alias": "cust", "proj_col": "id", "join_col": "level", "correlated_ref": "txn.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05251
train
v3
Schema: accounts (alias: acct)(type, name, date, code) regions(level, value, type, amount) Task: Find id from accounts where salary exceeds the count of salary from regions for the same type. SQL:
SELECT id FROM accounts AS acct WHERE salary > ( SELECT COUNT(salary) FROM regions AS rgn WHERE rgn.type = acct.type );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "acct", "inner_alias": "rgn", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "acct.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05252
train
v1
Schema: sales (alias: sale)(amount, type, status, code) departments(level, value, amount, code) Task: Find name from sales where code appears in departments entries with matching code. SQL:
SELECT name FROM sales AS sale WHERE code IN ( SELECT code FROM departments AS dept WHERE dept.code = sale.code );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "sale", "inner_alias": "dept", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "sale.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05253
train
v2
Schema: transactions (alias: txn)(status, level, amount, code) invoices(id, type, salary, status) Task: Retrieve code from transactions that have at least one corresponding entry in invoices sharing the same level. SQL:
SELECT code FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.level = txn.level );
{ "outer_table": "transactions", "inner_table": "invoices", "outer_alias": "txn", "inner_alias": "inv", "proj_col": "code", "join_col": "level", "correlated_ref": "txn.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05254
train
v1
Schema: staff (alias: empl)(status, code, value, type) tasks(amount, salary, level, type) Task: Select name from staff where id exists in tasks for the same status. SQL:
SELECT name FROM staff AS empl WHERE id IN ( SELECT id FROM tasks AS tsk WHERE tsk.status = empl.status );
{ "outer_table": "staff", "inner_table": "tasks", "outer_alias": "empl", "inner_alias": "tsk", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "empl.status", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_05255
train
v2
Schema: regions (alias: rgn)(amount, id, level, type) sales(type, name, code, status) Task: Find salary from regions where a matching record exists in sales with the same status. SQL:
SELECT salary FROM regions AS rgn WHERE EXISTS ( SELECT 1 FROM sales AS sale WHERE sale.status = rgn.status );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "rgn", "inner_alias": "sale", "proj_col": "salary", "join_col": "status", "correlated_ref": "rgn.status", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_05256
train
v1
Schema: projects (alias: prj)(id, name, status, type) staff(name, status, date, code) Task: Find value from projects where code appears in staff entries with matching code. SQL:
SELECT value FROM projects AS prj WHERE code IN ( SELECT code FROM staff AS empl WHERE empl.code = prj.code );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "prj", "inner_alias": "empl", "proj_col": "value", "filter_col": "code", "join_col": "code", "correlated_ref": "prj.code", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_05257
train
v1
Schema: orders (alias: ord)(name, level, value, status) invoices(salary, type, level, date) Task: Find value from orders where type appears in invoices entries with matching status. SQL:
SELECT value FROM orders AS ord WHERE type IN ( SELECT type FROM invoices AS inv WHERE inv.status = ord.status );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "ord", "inner_alias": "inv", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "ord.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05258
train
v1
Schema: items (alias: lne)(amount, salary, code, name) departments(name, value, level, salary) Task: Select name from items where level exists in departments for the same type. SQL:
SELECT name FROM items AS lne WHERE level IN ( SELECT level FROM departments AS dept WHERE dept.type = lne.type );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "lne", "inner_alias": "dept", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "lne.type", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_05259
train
v2
Schema: departments (alias: dept)(level, code, id, amount) products(amount, value, date, status) Task: Find salary from departments where a matching record exists in products with the same level. SQL:
SELECT salary FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM products AS prod WHERE prod.level = dept.level );
{ "outer_table": "departments", "inner_table": "products", "outer_alias": "dept", "inner_alias": "prod", "proj_col": "salary", "join_col": "level", "correlated_ref": "dept.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05260
train
v3
Schema: staff (alias: empl)(status, value, salary, name) schedules(date, level, status, value) Task: Retrieve value from staff with amount above the MIN(salary) of schedules rows sharing the same type. SQL:
SELECT value FROM staff AS empl WHERE amount > ( SELECT MIN(salary) FROM schedules AS schd WHERE schd.type = empl.type );
{ "outer_table": "staff", "inner_table": "schedules", "outer_alias": "empl", "inner_alias": "schd", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "empl.type", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_05261
train
v2
Schema: schedules (alias: schd)(status, name, type, amount) tasks(name, salary, value, status) Task: Retrieve code from schedules that have at least one corresponding entry in tasks sharing the same code. SQL:
SELECT code FROM schedules AS schd WHERE EXISTS ( SELECT 1 FROM tasks AS tsk WHERE tsk.code = schd.code );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "schd", "inner_alias": "tsk", "proj_col": "code", "join_col": "code", "correlated_ref": "schd.code", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_05262
train
v2
Schema: employees (alias: emp)(code, date, name, id) projects(status, name, amount, date) Task: Find id from employees where a matching record exists in projects with the same type. SQL:
SELECT id FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM projects AS prj WHERE prj.type = emp.type );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "emp", "inner_alias": "prj", "proj_col": "id", "join_col": "type", "correlated_ref": "emp.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05263
train
v1
Schema: projects (alias: prj)(id, status, name, date) customers(amount, name, salary, code) Task: Find amount from projects where code appears in customers entries with matching code. SQL:
SELECT amount FROM projects AS prj WHERE code IN ( SELECT code FROM customers AS cust WHERE cust.code = prj.code );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "prj", "inner_alias": "cust", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "prj.code", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_05264
train
v1
Schema: orders (alias: ord)(amount, type, id, code) sales(type, salary, date, amount) Task: Select amount from orders where id exists in sales for the same code. SQL:
SELECT amount FROM orders AS ord WHERE id IN ( SELECT id FROM sales AS sale WHERE sale.code = ord.code );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "ord", "inner_alias": "sale", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "ord.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05265
train
v2
Schema: staff (alias: empl)(code, id, salary, name) projects(value, amount, status, date) Task: Find value from staff where a matching record exists in projects with the same status. SQL:
SELECT value FROM staff AS empl WHERE EXISTS ( SELECT 1 FROM projects AS prj WHERE prj.status = empl.status );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "empl", "inner_alias": "prj", "proj_col": "value", "join_col": "status", "correlated_ref": "empl.status", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_05266
train
v3
Schema: accounts (alias: acct)(level, name, code, id) transactions(date, salary, value, type) Task: Find salary from accounts where amount exceeds the count of salary from transactions for the same status. SQL:
SELECT salary FROM accounts AS acct WHERE amount > ( SELECT COUNT(salary) FROM transactions AS txn WHERE txn.status = acct.status );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "acct", "inner_alias": "txn", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "acct.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05267
train
v1
Schema: requests (alias: ordr)(type, amount, code, status) transactions(type, amount, value, code) Task: Select salary from requests where level exists in transactions for the same code. SQL:
SELECT salary FROM requests AS ordr WHERE level IN ( SELECT level FROM transactions AS txn WHERE txn.code = ordr.code );
{ "outer_table": "requests", "inner_table": "transactions", "outer_alias": "ordr", "inner_alias": "txn", "proj_col": "salary", "filter_col": "level", "join_col": "code", "correlated_ref": "ordr.code", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_05268
train
v2
Schema: projects (alias: prj)(status, value, name, code) requests(type, name, date, code) Task: Retrieve name from projects that have at least one corresponding entry in requests sharing the same type. SQL:
SELECT name FROM projects AS prj WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.type = prj.type );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "prj", "inner_alias": "ordr", "proj_col": "name", "join_col": "type", "correlated_ref": "prj.type", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_05269
train
v1
Schema: accounts (alias: acct)(code, type, id, level) departments(type, amount, code, level) Task: Select amount from accounts where status exists in departments for the same type. SQL:
SELECT amount FROM accounts AS acct WHERE status IN ( SELECT status FROM departments AS dept WHERE dept.type = acct.type );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "acct", "inner_alias": "dept", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "acct.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05270
train
v3
Schema: branches (alias: brc)(code, type, date, value) departments(name, amount, type, date) Task: Find value from branches where amount exceeds the minimum value from departments for the same id. SQL:
SELECT value FROM branches AS brc WHERE amount > ( SELECT MIN(value) FROM departments AS dept WHERE dept.id = brc.id );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "brc", "inner_alias": "dept", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "brc.id", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_05271
train
v3
Schema: items (alias: lne)(level, salary, amount, value) employees(value, level, id, date) Task: Retrieve name from items with salary above the SUM(value) of employees rows sharing the same level. SQL:
SELECT name FROM items AS lne WHERE salary > ( SELECT SUM(value) FROM employees AS emp WHERE emp.level = lne.level );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "lne", "inner_alias": "emp", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "lne.level", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_05272
train
v1
Schema: requests (alias: ordr)(level, date, salary, status) accounts(value, id, code, type) Task: Find amount from requests where status appears in accounts entries with matching status. SQL:
SELECT amount FROM requests AS ordr WHERE status IN ( SELECT status FROM accounts AS acct WHERE acct.status = ordr.status );
{ "outer_table": "requests", "inner_table": "accounts", "outer_alias": "ordr", "inner_alias": "acct", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "ordr.status", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_05273
train
v3
Schema: schedules (alias: schd)(name, amount, salary, level) branches(salary, date, level, id) Task: Retrieve value from schedules with value above the AVG(salary) of branches rows sharing the same code. SQL:
SELECT value FROM schedules AS schd WHERE value > ( SELECT AVG(salary) FROM branches AS brc WHERE brc.code = schd.code );
{ "outer_table": "schedules", "inner_table": "branches", "outer_alias": "schd", "inner_alias": "brc", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "schd.code", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_05274
train
v1
Schema: items (alias: lne)(salary, code, status, name) departments(salary, amount, name, level) Task: Find name from items where id appears in departments entries with matching id. SQL:
SELECT name FROM items AS lne WHERE id IN ( SELECT id FROM departments AS dept WHERE dept.id = lne.id );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "lne", "inner_alias": "dept", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "lne.id", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_05275
train
v1
Schema: shipments (alias: shp)(amount, level, value, name) branches(date, salary, name, amount) Task: Retrieve value from shipments whose level is found in branches rows where status matches the outer record. SQL:
SELECT value FROM shipments AS shp WHERE level IN ( SELECT level FROM branches AS brc WHERE brc.status = shp.status );
{ "outer_table": "shipments", "inner_table": "branches", "outer_alias": "shp", "inner_alias": "brc", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "shp.status", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_05276
train
v2
Schema: categories (alias: catg)(id, code, amount, name) accounts(name, code, type, level) Task: Find code from categories where a matching record exists in accounts with the same code. SQL:
SELECT code FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM accounts AS acct WHERE acct.code = catg.code );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "catg", "inner_alias": "acct", "proj_col": "code", "join_col": "code", "correlated_ref": "catg.code", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_05277
train
v2
Schema: branches (alias: brc)(type, level, amount, salary) employees(code, amount, type, status) Task: Retrieve name from branches that have at least one corresponding entry in employees sharing the same code. SQL:
SELECT name FROM branches AS brc WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.code = brc.code );
{ "outer_table": "branches", "inner_table": "employees", "outer_alias": "brc", "inner_alias": "emp", "proj_col": "name", "join_col": "code", "correlated_ref": "brc.code", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_05278
train
v1
Schema: customers (alias: cust)(salary, amount, code, level) items(code, type, status, level) Task: Select code from customers where status exists in items for the same status. SQL:
SELECT code FROM customers AS cust WHERE status IN ( SELECT status FROM items AS lne WHERE lne.status = cust.status );
{ "outer_table": "customers", "inner_table": "items", "outer_alias": "cust", "inner_alias": "lne", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05279
train
v1
Schema: sales (alias: sale)(amount, value, level, date) orders(salary, name, date, value) Task: Find code from sales where code appears in orders entries with matching status. SQL:
SELECT code FROM sales AS sale WHERE code IN ( SELECT code FROM orders AS ord WHERE ord.status = sale.status );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "sale", "inner_alias": "ord", "proj_col": "code", "filter_col": "code", "join_col": "status", "correlated_ref": "sale.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05280
train
v2
Schema: employees (alias: emp)(name, date, level, id) transactions(id, name, value, level) 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_05281
train
v1
Schema: transactions (alias: txn)(code, salary, type, date) products(id, value, amount, name) Task: Retrieve value from transactions whose level is found in products rows where id matches the outer record. SQL:
SELECT value FROM transactions AS txn WHERE level IN ( SELECT level FROM products AS prod WHERE prod.id = txn.id );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "txn", "inner_alias": "prod", "proj_col": "value", "filter_col": "level", "join_col": "id", "correlated_ref": "txn.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05282
train
v1
Schema: departments (alias: dept)(id, value, status, level) managers(amount, type, level, code) Task: Retrieve value from departments whose id is found in managers rows where status matches the outer record. SQL:
SELECT value FROM departments AS dept WHERE id IN ( SELECT id FROM managers AS mgr WHERE mgr.status = dept.status );
{ "outer_table": "departments", "inner_table": "managers", "outer_alias": "dept", "inner_alias": "mgr", "proj_col": "value", "filter_col": "id", "join_col": "status", "correlated_ref": "dept.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05283
train
v2
Schema: employees (alias: emp)(amount, value, code, status) tasks(date, name, value, id) Task: Find id from employees where a matching record exists in tasks with the same code. SQL:
SELECT id FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM tasks AS tsk WHERE tsk.code = emp.code );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "emp", "inner_alias": "tsk", "proj_col": "id", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05284
train
v1
Schema: items (alias: lne)(code, name, amount, status) transactions(date, value, code, level) Task: Retrieve value from items whose code is found in transactions rows where status matches the outer record. SQL:
SELECT value FROM items AS lne WHERE code IN ( SELECT code FROM transactions AS txn WHERE txn.status = lne.status );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "lne", "inner_alias": "txn", "proj_col": "value", "filter_col": "code", "join_col": "status", "correlated_ref": "lne.status", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_05285
train
v2
Schema: departments (alias: dept)(value, level, date, id) orders(level, salary, id, date) Task: Retrieve name from departments that have at least one corresponding entry in orders sharing the same code. SQL:
SELECT name FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM orders AS ord WHERE ord.code = dept.code );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dept", "inner_alias": "ord", "proj_col": "name", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05286
train
v2
Schema: managers (alias: mgr)(code, date, level, amount) projects(type, date, salary, amount) Task: Retrieve name from managers that have at least one corresponding entry in projects sharing the same id. SQL:
SELECT name FROM managers AS mgr WHERE EXISTS ( SELECT 1 FROM projects AS prj WHERE prj.id = mgr.id );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "mgr", "inner_alias": "prj", "proj_col": "name", "join_col": "id", "correlated_ref": "mgr.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05287
train
v2
Schema: categories (alias: catg)(type, code, amount, level) requests(value, level, type, status) Task: Find salary from categories where a matching record exists in requests with the same type. SQL:
SELECT salary FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.type = catg.type );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "catg", "inner_alias": "ordr", "proj_col": "salary", "join_col": "type", "correlated_ref": "catg.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_05288
train
v3
Schema: projects (alias: prj)(id, value, level, type) shipments(id, level, name, date) Task: Retrieve name from projects with salary above the COUNT(amount) of shipments rows sharing the same level. SQL:
SELECT name FROM projects AS prj WHERE salary > ( SELECT COUNT(amount) FROM shipments AS shp WHERE shp.level = prj.level );
{ "outer_table": "projects", "inner_table": "shipments", "outer_alias": "prj", "inner_alias": "shp", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "prj.level", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_05289
train
v1
Schema: projects (alias: prj)(type, id, value, name) staff(value, date, name, id) Task: Select id from projects where status exists in staff for the same status. SQL:
SELECT id FROM projects AS prj WHERE status IN ( SELECT status FROM staff AS empl WHERE empl.status = prj.status );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "prj", "inner_alias": "empl", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "prj.status", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_05290
train
v2
Schema: staff (alias: empl)(status, value, level, salary) departments(value, status, name, code) Task: Retrieve value from staff that have at least one corresponding entry in departments sharing the same code. SQL:
SELECT value FROM staff AS empl WHERE EXISTS ( SELECT 1 FROM departments AS dept WHERE dept.code = empl.code );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "empl", "inner_alias": "dept", "proj_col": "value", "join_col": "code", "correlated_ref": "empl.code", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_05291
train
v3
Schema: regions (alias: rgn)(status, level, date, salary) orders(amount, type, date, salary) Task: Find amount from regions where value exceeds the maximum amount from orders for the same id. SQL:
SELECT amount FROM regions AS rgn WHERE value > ( SELECT MAX(amount) FROM orders AS ord WHERE ord.id = rgn.id );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "rgn", "inner_alias": "ord", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "rgn.id", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_05292
train
v1
Schema: regions (alias: rgn)(amount, status, value, id) schedules(type, name, code, status) Task: Select amount from regions where id exists in schedules for the same code. SQL:
SELECT amount FROM regions AS rgn WHERE id IN ( SELECT id FROM schedules AS schd WHERE schd.code = rgn.code );
{ "outer_table": "regions", "inner_table": "schedules", "outer_alias": "rgn", "inner_alias": "schd", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "rgn.code", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_05293
train
v3
Schema: staff (alias: empl)(status, code, salary, level) regions(name, salary, type, amount) Task: Retrieve id from staff with amount above the MIN(salary) of regions rows sharing the same type. SQL:
SELECT id FROM staff AS empl WHERE amount > ( SELECT MIN(salary) FROM regions AS rgn WHERE rgn.type = empl.type );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "empl", "inner_alias": "rgn", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "empl.type", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_05294
train
v3
Schema: managers (alias: mgr)(status, name, amount, salary) products(code, level, value, id) Task: Find value from managers where amount exceeds the average salary from products for the same code. SQL:
SELECT value FROM managers AS mgr WHERE amount > ( SELECT AVG(salary) FROM products AS prod WHERE prod.code = mgr.code );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "mgr", "inner_alias": "prod", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "mgr.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05295
train
v3
Schema: transactions (alias: txn)(level, type, date, id) sales(amount, id, status, name) Task: Find salary from transactions where amount exceeds the minimum amount from sales for the same type. SQL:
SELECT salary FROM transactions AS txn WHERE amount > ( SELECT MIN(amount) FROM sales AS sale WHERE sale.type = txn.type );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "txn", "inner_alias": "sale", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "txn.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05296
train
v1
Schema: tasks (alias: tsk)(level, id, type, code) requests(level, name, type, code) Task: Retrieve salary from tasks whose code is found in requests rows where status matches the outer record. SQL:
SELECT salary FROM tasks AS tsk WHERE code IN ( SELECT code FROM requests AS ordr WHERE ordr.status = tsk.status );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "tsk", "inner_alias": "ordr", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "tsk.status", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_05297
train
v1
Schema: accounts (alias: acct)(value, status, id, salary) regions(amount, level, code, salary) Task: Select salary from accounts where code exists in regions for the same code. SQL:
SELECT salary FROM accounts AS acct WHERE code IN ( SELECT code FROM regions AS rgn WHERE rgn.code = acct.code );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "acct", "inner_alias": "rgn", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "acct.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_05298
train
v1
Schema: shipments (alias: shp)(date, status, name, salary) tasks(name, id, amount, level) Task: Retrieve amount from shipments whose status is found in tasks rows where level matches the outer record. SQL:
SELECT amount FROM shipments AS shp WHERE status IN ( SELECT status FROM tasks AS tsk WHERE tsk.level = shp.level );
{ "outer_table": "shipments", "inner_table": "tasks", "outer_alias": "shp", "inner_alias": "tsk", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "shp.level", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_05299
train