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
v3
Schema: branches (alias: brc)(value, type, code, salary) schedules(type, code, id, salary) Task: Find name from branches where salary exceeds the count of amount from schedules for the same id. SQL:
SELECT name FROM branches AS brc WHERE salary > ( SELECT COUNT(amount) FROM schedules AS schd WHERE schd.id = brc.id );
{ "outer_table": "branches", "inner_table": "schedules", "outer_alias": "brc", "inner_alias": "schd", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "brc.id", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_16300
train
v1
Schema: products (alias: prod)(salary, type, date, amount) customers(level, id, name, status) Task: Find value from products where id appears in customers entries with matching level. SQL:
SELECT value FROM products AS prod WHERE id IN ( SELECT id FROM customers AS cust WHERE cust.level = prod.level );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "prod", "inner_alias": "cust", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "prod.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16301
train
v1
Schema: invoices (alias: inv)(value, level, type, date) categories(code, salary, name, id) Task: Find amount from invoices where level appears in categories entries with matching id. SQL:
SELECT amount FROM invoices AS inv WHERE level IN ( SELECT level FROM categories AS catg WHERE catg.id = inv.id );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "inv", "inner_alias": "catg", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "inv.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16302
train
v3
Schema: tasks (alias: tsk)(amount, status, name, level) transactions(level, amount, status, name) Task: Retrieve name from tasks with amount above the MAX(value) of transactions rows sharing the same code. SQL:
SELECT name FROM tasks AS tsk WHERE amount > ( SELECT MAX(value) FROM transactions AS txn WHERE txn.code = tsk.code );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "tsk", "inner_alias": "txn", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "tsk.code", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_16303
train
v2
Schema: branches (alias: brc)(name, value, code, type) projects(status, name, id, salary) Task: Retrieve value from branches that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT value FROM branches AS brc WHERE EXISTS ( SELECT 1 FROM projects AS prj WHERE prj.code = brc.code );
{ "outer_table": "branches", "inner_table": "projects", "outer_alias": "brc", "inner_alias": "prj", "proj_col": "value", "join_col": "code", "correlated_ref": "brc.code", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_16304
train
v1
Schema: branches (alias: brc)(id, salary, value, amount) sales(name, date, level, amount) Task: Find value from branches where type appears in sales entries with matching id. SQL:
SELECT value FROM branches AS brc WHERE type IN ( SELECT type FROM sales AS sale WHERE sale.id = brc.id );
{ "outer_table": "branches", "inner_table": "sales", "outer_alias": "brc", "inner_alias": "sale", "proj_col": "value", "filter_col": "type", "join_col": "id", "correlated_ref": "brc.id", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_16305
train
v1
Schema: projects (alias: prj)(date, id, level, code) items(code, salary, id, amount) Task: Retrieve id from projects whose level is found in items rows where code matches the outer record. SQL:
SELECT id FROM projects AS prj WHERE level IN ( SELECT level FROM items AS lne WHERE lne.code = prj.code );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "prj", "inner_alias": "lne", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "prj.code", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_16306
train
v3
Schema: shipments (alias: shp)(amount, level, name, salary) tasks(salary, name, date, id) Task: Retrieve amount from shipments with value above the COUNT(amount) of tasks rows sharing the same status. SQL:
SELECT amount FROM shipments AS shp WHERE value > ( SELECT COUNT(amount) FROM tasks AS tsk WHERE tsk.status = shp.status );
{ "outer_table": "shipments", "inner_table": "tasks", "outer_alias": "shp", "inner_alias": "tsk", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "shp.status", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_16307
train
v3
Schema: tasks (alias: tsk)(name, code, amount, salary) orders(amount, name, code, salary) Task: Find value from tasks where amount exceeds the maximum salary from orders for the same code. SQL:
SELECT value FROM tasks AS tsk WHERE amount > ( SELECT MAX(salary) FROM orders AS ord WHERE ord.code = tsk.code );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "tsk", "inner_alias": "ord", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "tsk.code", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_16308
train
v1
Schema: tasks (alias: tsk)(salary, code, id, status) branches(code, salary, type, id) Task: Find value from tasks where type appears in branches entries with matching type. SQL:
SELECT value 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": "value", "filter_col": "type", "join_col": "type", "correlated_ref": "tsk.type", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_16309
train
v3
Schema: customers (alias: cust)(value, level, amount, status) branches(value, id, level, name) Task: Retrieve name from customers with salary above the MAX(salary) of branches rows sharing the same code. SQL:
SELECT name FROM customers AS cust WHERE salary > ( SELECT MAX(salary) FROM branches AS brc WHERE brc.code = cust.code );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "cust", "inner_alias": "brc", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "cust.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16310
train
v2
Schema: products (alias: prod)(value, name, date, status) staff(date, status, name, id) Task: Find value from products where a matching record exists in staff with the same status. SQL:
SELECT value FROM products AS prod WHERE EXISTS ( SELECT 1 FROM staff AS empl WHERE empl.status = prod.status );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "prod", "inner_alias": "empl", "proj_col": "value", "join_col": "status", "correlated_ref": "prod.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16311
train
v1
Schema: sales (alias: sale)(value, level, id, salary) accounts(salary, level, status, type) Task: Retrieve salary from sales whose code is found in accounts rows where code matches the outer record. SQL:
SELECT salary FROM sales AS sale WHERE code IN ( SELECT code FROM accounts AS acct WHERE acct.code = sale.code );
{ "outer_table": "sales", "inner_table": "accounts", "outer_alias": "sale", "inner_alias": "acct", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "sale.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16312
train
v2
Schema: transactions (alias: txn)(value, date, id, amount) employees(level, value, salary, date) Task: Find code from transactions where a matching record exists in employees with the same type. SQL:
SELECT code FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.type = txn.type );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "txn", "inner_alias": "emp", "proj_col": "code", "join_col": "type", "correlated_ref": "txn.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16313
train
v3
Schema: items (alias: lne)(amount, date, name, status) sales(name, status, id, type) Task: Find id from items where amount exceeds the minimum value from sales for the same status. SQL:
SELECT id FROM items AS lne WHERE amount > ( SELECT MIN(value) FROM sales AS sale WHERE sale.status = lne.status );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "lne", "inner_alias": "sale", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "lne.status", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_16314
train
v2
Schema: requests (alias: ordr)(type, code, amount, status) transactions(amount, level, date, salary) Task: Find id from requests where a matching record exists in transactions with the same status. SQL:
SELECT id FROM requests AS ordr WHERE EXISTS ( SELECT 1 FROM transactions AS txn WHERE txn.status = ordr.status );
{ "outer_table": "requests", "inner_table": "transactions", "outer_alias": "ordr", "inner_alias": "txn", "proj_col": "id", "join_col": "status", "correlated_ref": "ordr.status", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_16315
train
v2
Schema: managers (alias: mgr)(salary, id, type, amount) departments(name, status, code, id) Task: Retrieve name from managers that have at least one corresponding entry in departments sharing the same code. SQL:
SELECT name FROM managers AS mgr WHERE EXISTS ( SELECT 1 FROM departments AS dept WHERE dept.code = mgr.code );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "mgr", "inner_alias": "dept", "proj_col": "name", "join_col": "code", "correlated_ref": "mgr.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16316
train
v3
Schema: staff (alias: empl)(date, value, type, name) customers(value, salary, date, name) Task: Retrieve id from staff with salary above the MIN(salary) of customers rows sharing the same type. SQL:
SELECT id FROM staff AS empl WHERE salary > ( SELECT MIN(salary) FROM customers AS cust WHERE cust.type = empl.type );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "empl", "inner_alias": "cust", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "empl.type", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_16317
train
v3
Schema: accounts (alias: acct)(value, amount, status, id) invoices(id, date, amount, value) Task: Find code from accounts where value exceeds the minimum amount from invoices for the same id. SQL:
SELECT code FROM accounts AS acct WHERE value > ( SELECT MIN(amount) FROM invoices AS inv WHERE inv.id = acct.id );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "acct", "inner_alias": "inv", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "acct.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16318
train
v2
Schema: invoices (alias: inv)(id, type, value, status) categories(id, type, name, date) Task: Retrieve code from invoices that have at least one corresponding entry in categories sharing the same code. SQL:
SELECT code FROM invoices AS inv WHERE EXISTS ( SELECT 1 FROM categories AS catg WHERE catg.code = inv.code );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "inv", "inner_alias": "catg", "proj_col": "code", "join_col": "code", "correlated_ref": "inv.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16319
train
v2
Schema: schedules (alias: schd)(date, id, status, level) employees(status, level, date, id) Task: Find id from schedules where a matching record exists in employees with the same status. SQL:
SELECT id FROM schedules AS schd WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.status = schd.status );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "schd", "inner_alias": "emp", "proj_col": "id", "join_col": "status", "correlated_ref": "schd.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_16320
train
v2
Schema: invoices (alias: inv)(status, salary, date, id) projects(status, id, level, date) Task: Retrieve salary from invoices that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT salary FROM invoices AS inv WHERE EXISTS ( SELECT 1 FROM projects AS prj WHERE prj.code = inv.code );
{ "outer_table": "invoices", "inner_table": "projects", "outer_alias": "inv", "inner_alias": "prj", "proj_col": "salary", "join_col": "code", "correlated_ref": "inv.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16321
train
v3
Schema: orders (alias: ord)(id, code, amount, date) shipments(name, salary, type, date) Task: Find salary from orders where value exceeds the total amount from shipments for the same type. SQL:
SELECT salary FROM orders AS ord WHERE value > ( SELECT SUM(amount) FROM shipments AS shp WHERE shp.type = ord.type );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "ord", "inner_alias": "shp", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "ord.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16322
train
v2
Schema: transactions (alias: txn)(name, amount, date, salary) branches(type, code, name, salary) Task: Find value from transactions where a matching record exists in branches with the same type. SQL:
SELECT value FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM branches AS brc WHERE brc.type = txn.type );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "txn", "inner_alias": "brc", "proj_col": "value", "join_col": "type", "correlated_ref": "txn.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16323
train
v2
Schema: tasks (alias: tsk)(code, id, level, date) products(name, code, level, value) Task: Find value from tasks where a matching record exists in products with the same id. SQL:
SELECT value FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM products AS prod WHERE prod.id = tsk.id );
{ "outer_table": "tasks", "inner_table": "products", "outer_alias": "tsk", "inner_alias": "prod", "proj_col": "value", "join_col": "id", "correlated_ref": "tsk.id", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_16324
train
v1
Schema: sales (alias: sale)(amount, id, status, type) products(salary, value, amount, id) Task: Select code from sales where type exists in products for the same code. SQL:
SELECT code FROM sales AS sale WHERE type IN ( SELECT type FROM products AS prod WHERE prod.code = sale.code );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "sale", "inner_alias": "prod", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "sale.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16325
train
v1
Schema: sales (alias: sale)(value, salary, status, type) branches(code, level, name, value) Task: Select salary from sales where code exists in branches for the same id. SQL:
SELECT salary FROM sales AS sale WHERE code IN ( SELECT code FROM branches AS brc WHERE brc.id = sale.id );
{ "outer_table": "sales", "inner_table": "branches", "outer_alias": "sale", "inner_alias": "brc", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "sale.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16326
train
v3
Schema: tasks (alias: tsk)(salary, id, status, code) requests(id, salary, status, level) Task: Retrieve code from tasks with amount above the MAX(value) of requests rows sharing the same status. SQL:
SELECT code FROM tasks AS tsk WHERE amount > ( SELECT MAX(value) FROM requests AS ordr WHERE ordr.status = tsk.status );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "tsk", "inner_alias": "ordr", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "tsk.status", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_16327
train
v2
Schema: invoices (alias: inv)(type, level, status, code) orders(date, status, code, level) Task: Find salary from invoices where a matching record exists in orders with the same id. SQL:
SELECT salary FROM invoices AS inv WHERE EXISTS ( SELECT 1 FROM orders AS ord WHERE ord.id = inv.id );
{ "outer_table": "invoices", "inner_table": "orders", "outer_alias": "inv", "inner_alias": "ord", "proj_col": "salary", "join_col": "id", "correlated_ref": "inv.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16328
train
v3
Schema: customers (alias: cust)(amount, code, name, salary) projects(code, value, id, date) Task: Retrieve name from customers with value above the MAX(value) of projects rows sharing the same code. SQL:
SELECT name FROM customers AS cust WHERE value > ( SELECT MAX(value) FROM projects AS prj WHERE prj.code = cust.code );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "cust", "inner_alias": "prj", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "cust.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16329
train
v3
Schema: branches (alias: brc)(date, level, salary, value) categories(status, value, amount, id) Task: Find salary from branches where salary exceeds the maximum value from categories for the same status. SQL:
SELECT salary FROM branches AS brc WHERE salary > ( SELECT MAX(value) FROM categories AS catg WHERE catg.status = brc.status );
{ "outer_table": "branches", "inner_table": "categories", "outer_alias": "brc", "inner_alias": "catg", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "brc.status", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_16330
train
v1
Schema: departments (alias: dept)(amount, value, status, id) sales(code, salary, level, name) Task: Find value from departments where status appears in sales entries with matching level. SQL:
SELECT value FROM departments AS dept WHERE status IN ( SELECT status FROM sales AS sale WHERE sale.level = dept.level );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dept", "inner_alias": "sale", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "dept.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16331
train
v1
Schema: departments (alias: dept)(id, amount, salary, type) projects(salary, type, value, status) Task: Retrieve code from departments whose level is found in projects rows where type matches the outer record. SQL:
SELECT code FROM departments AS dept WHERE level IN ( SELECT level FROM projects AS prj WHERE prj.type = dept.type );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dept", "inner_alias": "prj", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "dept.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16332
train
v3
Schema: categories (alias: catg)(id, date, status, level) sales(level, amount, type, salary) Task: Find name from categories where amount exceeds the total salary from sales for the same id. SQL:
SELECT name FROM categories AS catg WHERE amount > ( SELECT SUM(salary) FROM sales AS sale WHERE sale.id = catg.id );
{ "outer_table": "categories", "inner_table": "sales", "outer_alias": "catg", "inner_alias": "sale", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "catg.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_16333
train
v2
Schema: accounts (alias: acct)(code, salary, value, level) staff(amount, id, code, type) Task: Retrieve amount from accounts that have at least one corresponding entry in staff sharing the same id. SQL:
SELECT amount FROM accounts AS acct WHERE EXISTS ( SELECT 1 FROM staff AS empl WHERE empl.id = acct.id );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "acct", "inner_alias": "empl", "proj_col": "amount", "join_col": "id", "correlated_ref": "acct.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16334
train
v1
Schema: regions (alias: rgn)(id, name, value, level) branches(salary, value, date, amount) Task: Retrieve salary from regions whose code is found in branches rows where id matches the outer record. SQL:
SELECT salary FROM regions AS rgn WHERE code IN ( SELECT code FROM branches AS brc WHERE brc.id = rgn.id );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "rgn", "inner_alias": "brc", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "rgn.id", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_16335
train
v3
Schema: tasks (alias: tsk)(code, type, status, id) orders(level, value, code, status) Task: Retrieve name from tasks with salary above the COUNT(salary) of orders rows sharing the same level. SQL:
SELECT name FROM tasks AS tsk WHERE salary > ( SELECT COUNT(salary) FROM orders AS ord WHERE ord.level = tsk.level );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "tsk", "inner_alias": "ord", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "tsk.level", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_16336
train
v3
Schema: orders (alias: ord)(type, name, value, salary) accounts(value, id, name, amount) Task: Find salary from orders where amount exceeds the count of salary from accounts for the same type. SQL:
SELECT salary FROM orders AS ord WHERE amount > ( SELECT COUNT(salary) FROM accounts AS acct WHERE acct.type = ord.type );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "ord", "inner_alias": "acct", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "ord.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16337
train
v1
Schema: schedules (alias: schd)(value, name, amount, level) requests(date, type, amount, level) Task: Select id from schedules where code exists in requests for the same id. SQL:
SELECT id FROM schedules AS schd WHERE code IN ( SELECT code FROM requests AS ordr WHERE ordr.id = schd.id );
{ "outer_table": "schedules", "inner_table": "requests", "outer_alias": "schd", "inner_alias": "ordr", "proj_col": "id", "filter_col": "code", "join_col": "id", "correlated_ref": "schd.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_16338
train
v3
Schema: customers (alias: cust)(id, salary, amount, type) products(code, id, date, salary) Task: Find value from customers where amount exceeds the count of value from products for the same level. SQL:
SELECT value FROM customers AS cust WHERE amount > ( SELECT COUNT(value) FROM products AS prod WHERE prod.level = cust.level );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "cust", "inner_alias": "prod", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "cust.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16339
train
v2
Schema: items (alias: lne)(value, salary, code, date) invoices(status, name, date, value) Task: Find id from items where a matching record exists in invoices with the same type. SQL:
SELECT id FROM items AS lne WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.type = lne.type );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "lne", "inner_alias": "inv", "proj_col": "id", "join_col": "type", "correlated_ref": "lne.type", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_16340
train
v1
Schema: requests (alias: ordr)(date, id, level, code) transactions(type, name, amount, date) Task: Retrieve id from requests whose id is found in transactions rows where code matches the outer record. SQL:
SELECT id FROM requests AS ordr WHERE id IN ( SELECT id FROM transactions AS txn WHERE txn.code = ordr.code );
{ "outer_table": "requests", "inner_table": "transactions", "outer_alias": "ordr", "inner_alias": "txn", "proj_col": "id", "filter_col": "id", "join_col": "code", "correlated_ref": "ordr.code", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_16341
train
v1
Schema: invoices (alias: inv)(level, name, type, status) customers(salary, date, value, status) Task: Find salary from invoices where code appears in customers entries with matching status. SQL:
SELECT salary FROM invoices AS inv WHERE code IN ( SELECT code FROM customers AS cust WHERE cust.status = inv.status );
{ "outer_table": "invoices", "inner_table": "customers", "outer_alias": "inv", "inner_alias": "cust", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "inv.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16342
train
v3
Schema: staff (alias: empl)(salary, date, id, code) orders(amount, date, type, code) Task: Retrieve salary from staff with value above the MIN(salary) of orders rows sharing the same code. SQL:
SELECT salary FROM staff AS empl WHERE value > ( SELECT MIN(salary) FROM orders AS ord WHERE ord.code = empl.code );
{ "outer_table": "staff", "inner_table": "orders", "outer_alias": "empl", "inner_alias": "ord", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "empl.code", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_16343
train
v3
Schema: employees (alias: emp)(salary, amount, code, date) schedules(date, id, value, salary) Task: Retrieve id from employees with value above the AVG(amount) of schedules rows sharing the same status. SQL:
SELECT id FROM employees AS emp WHERE value > ( SELECT AVG(amount) FROM schedules AS schd WHERE schd.status = emp.status );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "emp", "inner_alias": "schd", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "emp.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16344
train
v3
Schema: managers (alias: mgr)(name, type, code, salary) items(name, code, value, level) Task: Find id from managers where salary exceeds the average amount from items for the same id. SQL:
SELECT id FROM managers AS mgr WHERE salary > ( SELECT AVG(amount) FROM items AS lne WHERE lne.id = mgr.id );
{ "outer_table": "managers", "inner_table": "items", "outer_alias": "mgr", "inner_alias": "lne", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "mgr.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16345
train
v2
Schema: orders (alias: ord)(amount, date, status, code) tasks(name, salary, id, amount) Task: Find id from orders where a matching record exists in tasks with the same type. SQL:
SELECT id FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM tasks AS tsk WHERE tsk.type = ord.type );
{ "outer_table": "orders", "inner_table": "tasks", "outer_alias": "ord", "inner_alias": "tsk", "proj_col": "id", "join_col": "type", "correlated_ref": "ord.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16346
train
v1
Schema: employees (alias: emp)(date, id, type, level) sales(name, type, code, value) Task: Find id from employees where type appears in sales entries with matching type. SQL:
SELECT id FROM employees AS emp WHERE type IN ( SELECT type FROM sales AS sale WHERE sale.type = emp.type );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "emp", "inner_alias": "sale", "proj_col": "id", "filter_col": "type", "join_col": "type", "correlated_ref": "emp.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16347
train
v1
Schema: invoices (alias: inv)(id, amount, type, salary) orders(id, status, name, date) Task: Find value from invoices where code appears in orders entries with matching id. SQL:
SELECT value FROM invoices AS inv WHERE code IN ( SELECT code FROM orders AS ord WHERE ord.id = inv.id );
{ "outer_table": "invoices", "inner_table": "orders", "outer_alias": "inv", "inner_alias": "ord", "proj_col": "value", "filter_col": "code", "join_col": "id", "correlated_ref": "inv.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16348
train
v1
Schema: tasks (alias: tsk)(name, id, code, type) branches(id, name, salary, value) Task: Select code from tasks where status exists in branches for the same level. SQL:
SELECT code FROM tasks AS tsk WHERE status IN ( SELECT status FROM branches AS brc WHERE brc.level = tsk.level );
{ "outer_table": "tasks", "inner_table": "branches", "outer_alias": "tsk", "inner_alias": "brc", "proj_col": "code", "filter_col": "status", "join_col": "level", "correlated_ref": "tsk.level", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_16349
train
v1
Schema: employees (alias: emp)(level, name, amount, date) schedules(type, status, name, code) Task: Find name from employees where id appears in schedules entries with matching status. SQL:
SELECT name FROM employees AS emp WHERE id IN ( SELECT id FROM schedules AS schd WHERE schd.status = emp.status );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "emp", "inner_alias": "schd", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "emp.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16350
train
v1
Schema: invoices (alias: inv)(date, salary, status, id) managers(salary, code, date, type) Task: Find value from invoices where status appears in managers entries with matching level. SQL:
SELECT value FROM invoices AS inv WHERE status IN ( SELECT status FROM managers AS mgr WHERE mgr.level = inv.level );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "inv", "inner_alias": "mgr", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "inv.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16351
train
v1
Schema: items (alias: lne)(salary, code, id, value) schedules(amount, id, salary, date) Task: Retrieve amount from items whose level is found in schedules rows where code matches the outer record. SQL:
SELECT amount FROM items AS lne WHERE level IN ( SELECT level FROM schedules AS schd WHERE schd.code = lne.code );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "lne", "inner_alias": "schd", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "lne.code", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_16352
train
v3
Schema: requests (alias: ordr)(id, date, level, name) orders(value, date, level, name) Task: Find name from requests where amount exceeds the minimum salary from orders for the same code. SQL:
SELECT name FROM requests AS ordr WHERE amount > ( SELECT MIN(salary) FROM orders AS ord WHERE ord.code = ordr.code );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ordr", "inner_alias": "ord", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "ordr.code", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_16353
train
v1
Schema: requests (alias: ordr)(level, status, id, value) transactions(id, amount, level, type) Task: Select code from requests where code exists in transactions for the same level. SQL:
SELECT code FROM requests AS ordr WHERE code IN ( SELECT code FROM transactions AS txn WHERE txn.level = ordr.level );
{ "outer_table": "requests", "inner_table": "transactions", "outer_alias": "ordr", "inner_alias": "txn", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "ordr.level", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_16354
train
v3
Schema: categories (alias: catg)(id, value, name, level) staff(code, level, status, amount) Task: Find code from categories where salary exceeds the minimum salary from staff for the same id. SQL:
SELECT code FROM categories AS catg WHERE salary > ( SELECT MIN(salary) FROM staff AS empl WHERE empl.id = catg.id );
{ "outer_table": "categories", "inner_table": "staff", "outer_alias": "catg", "inner_alias": "empl", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "catg.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_16355
train
v3
Schema: schedules (alias: schd)(type, id, salary, status) employees(date, code, type, amount) Task: Find name from schedules where amount exceeds the count of salary from employees for the same level. SQL:
SELECT name FROM schedules AS schd WHERE amount > ( SELECT COUNT(salary) FROM employees AS emp WHERE emp.level = schd.level );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "schd", "inner_alias": "emp", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "schd.level", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_16356
train
v3
Schema: transactions (alias: txn)(value, id, date, amount) tasks(amount, name, value, type) Task: Retrieve code from transactions with value above the MAX(amount) of tasks rows sharing the same status. SQL:
SELECT code FROM transactions AS txn WHERE value > ( SELECT MAX(amount) FROM tasks AS tsk WHERE tsk.status = txn.status );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "txn", "inner_alias": "tsk", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "txn.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16357
train
v2
Schema: branches (alias: brc)(status, salary, name, date) schedules(level, id, status, code) Task: Retrieve amount from branches that have at least one corresponding entry in schedules sharing the same level. SQL:
SELECT amount FROM branches AS brc WHERE EXISTS ( SELECT 1 FROM schedules AS schd WHERE schd.level = brc.level );
{ "outer_table": "branches", "inner_table": "schedules", "outer_alias": "brc", "inner_alias": "schd", "proj_col": "amount", "join_col": "level", "correlated_ref": "brc.level", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_16358
train
v2
Schema: schedules (alias: schd)(amount, value, name, level) sales(amount, level, value, salary) Task: Retrieve value from schedules that have at least one corresponding entry in sales sharing the same level. SQL:
SELECT value FROM schedules AS schd WHERE EXISTS ( SELECT 1 FROM sales AS sale WHERE sale.level = schd.level );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "schd", "inner_alias": "sale", "proj_col": "value", "join_col": "level", "correlated_ref": "schd.level", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_16359
train
v1
Schema: customers (alias: cust)(code, value, amount, status) orders(amount, status, type, name) Task: Retrieve name from customers whose id is found in orders rows where id matches the outer record. SQL:
SELECT name FROM customers AS cust WHERE id IN ( SELECT id FROM orders AS ord WHERE ord.id = cust.id );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "cust", "inner_alias": "ord", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "cust.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16360
train
v1
Schema: departments (alias: dept)(status, id, amount, name) transactions(date, value, salary, amount) Task: Find code from departments where status appears in transactions entries with matching type. SQL:
SELECT code FROM departments AS dept WHERE status IN ( SELECT status FROM transactions AS txn WHERE txn.type = dept.type );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dept", "inner_alias": "txn", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "dept.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16361
train
v3
Schema: sales (alias: sale)(id, type, level, code) departments(name, amount, level, id) Task: Find id from sales where value exceeds the count of salary from departments for the same id. SQL:
SELECT id FROM sales AS sale WHERE value > ( SELECT COUNT(salary) FROM departments AS dept WHERE dept.id = sale.id );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "sale", "inner_alias": "dept", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "sale.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16362
train
v1
Schema: projects (alias: prj)(id, type, date, level) orders(status, type, name, salary) Task: Retrieve id from projects whose status is found in orders rows where type matches the outer record. SQL:
SELECT id FROM projects AS prj WHERE status IN ( SELECT status FROM orders AS ord WHERE ord.type = prj.type );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "prj", "inner_alias": "ord", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "prj.type", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_16363
train
v3
Schema: projects (alias: prj)(id, code, type, salary) staff(type, amount, id, status) Task: Retrieve name from projects with salary above the SUM(amount) of staff rows sharing the same status. SQL:
SELECT name FROM projects AS prj WHERE salary > ( SELECT SUM(amount) FROM staff AS empl WHERE empl.status = prj.status );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "prj", "inner_alias": "empl", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "prj.status", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_16364
train
v2
Schema: customers (alias: cust)(salary, amount, date, code) schedules(date, id, name, type) Task: Retrieve value from customers that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT value FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM schedules AS schd WHERE schd.code = cust.code );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "cust", "inner_alias": "schd", "proj_col": "value", "join_col": "code", "correlated_ref": "cust.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16365
train
v1
Schema: transactions (alias: txn)(level, name, type, amount) orders(id, code, name, value) Task: Select code from transactions where type exists in orders for the same type. SQL:
SELECT code FROM transactions AS txn WHERE type IN ( SELECT type FROM orders AS ord WHERE ord.type = txn.type );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "txn", "inner_alias": "ord", "proj_col": "code", "filter_col": "type", "join_col": "type", "correlated_ref": "txn.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16366
train
v2
Schema: products (alias: prod)(type, level, value, amount) regions(amount, code, type, id) Task: Retrieve amount from products that have at least one corresponding entry in regions sharing the same code. SQL:
SELECT amount FROM products AS prod WHERE EXISTS ( SELECT 1 FROM regions AS rgn WHERE rgn.code = prod.code );
{ "outer_table": "products", "inner_table": "regions", "outer_alias": "prod", "inner_alias": "rgn", "proj_col": "amount", "join_col": "code", "correlated_ref": "prod.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16367
train
v3
Schema: staff (alias: empl)(salary, id, date, name) shipments(name, code, type, amount) Task: Find id from staff where value exceeds the average value from shipments for the same code. SQL:
SELECT id FROM staff AS empl WHERE value > ( SELECT AVG(value) FROM shipments AS shp WHERE shp.code = empl.code );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "empl", "inner_alias": "shp", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "empl.code", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_16368
train
v1
Schema: customers (alias: cust)(date, name, id, code) tasks(date, id, code, amount) Task: Find code from customers where status appears in tasks entries with matching status. SQL:
SELECT code FROM customers AS cust WHERE status IN ( SELECT status FROM tasks AS tsk WHERE tsk.status = cust.status );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "cust", "inner_alias": "tsk", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16369
train
v3
Schema: requests (alias: ordr)(salary, code, status, name) sales(status, name, type, salary) Task: Find name from requests where amount exceeds the count of amount from sales for the same level. SQL:
SELECT name FROM requests AS ordr WHERE amount > ( SELECT COUNT(amount) FROM sales AS sale WHERE sale.level = ordr.level );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ordr", "inner_alias": "sale", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "ordr.level", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_16370
train
v1
Schema: employees (alias: emp)(status, name, code, level) transactions(salary, id, level, value) Task: Find salary from employees where status appears in transactions entries with matching level. SQL:
SELECT salary FROM employees AS emp WHERE status IN ( SELECT status FROM transactions AS txn WHERE txn.level = emp.level );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "emp", "inner_alias": "txn", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "emp.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16371
train
v3
Schema: requests (alias: ordr)(value, code, id, date) tasks(name, level, type, salary) Task: Retrieve amount from requests with value above the MIN(value) of tasks rows sharing the same status. SQL:
SELECT amount FROM requests AS ordr WHERE value > ( SELECT MIN(value) FROM tasks AS tsk WHERE tsk.status = ordr.status );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ordr", "inner_alias": "tsk", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "ordr.status", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_16372
train
v1
Schema: staff (alias: empl)(type, value, status, level) orders(type, code, id, status) Task: Retrieve value from staff whose code is found in orders rows where id matches the outer record. SQL:
SELECT value FROM staff AS empl WHERE code IN ( SELECT code FROM orders AS ord WHERE ord.id = empl.id );
{ "outer_table": "staff", "inner_table": "orders", "outer_alias": "empl", "inner_alias": "ord", "proj_col": "value", "filter_col": "code", "join_col": "id", "correlated_ref": "empl.id", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_16373
train
v1
Schema: sales (alias: sale)(status, name, amount, type) staff(status, name, amount, date) Task: Retrieve amount from sales whose id is found in staff rows where code matches the outer record. SQL:
SELECT amount FROM sales AS sale WHERE id IN ( SELECT id FROM staff AS empl WHERE empl.code = sale.code );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "sale", "inner_alias": "empl", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "sale.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16374
train
v1
Schema: invoices (alias: inv)(type, date, code, name) regions(id, type, code, salary) Task: Select id from invoices where level exists in regions for the same type. SQL:
SELECT id FROM invoices AS inv WHERE level IN ( SELECT level FROM regions AS rgn WHERE rgn.type = inv.type );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "inv", "inner_alias": "rgn", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "inv.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16375
train
v1
Schema: tasks (alias: tsk)(code, level, status, name) regions(level, salary, type, value) Task: Retrieve id from tasks whose code is found in regions rows where level matches the outer record. SQL:
SELECT id FROM tasks AS tsk WHERE code IN ( SELECT code FROM regions AS rgn WHERE rgn.level = tsk.level );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "tsk", "inner_alias": "rgn", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "tsk.level", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_16376
train
v3
Schema: tasks (alias: tsk)(code, salary, name, level) projects(code, id, date, name) Task: Find id from tasks where salary exceeds the count of salary from projects for the same level. SQL:
SELECT id FROM tasks AS tsk WHERE salary > ( SELECT COUNT(salary) FROM projects AS prj WHERE prj.level = tsk.level );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "tsk", "inner_alias": "prj", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "tsk.level", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_16377
train
v3
Schema: shipments (alias: shp)(salary, status, date, type) managers(amount, id, status, type) Task: Find value from shipments where value exceeds the minimum value from managers for the same status. SQL:
SELECT value FROM shipments AS shp WHERE value > ( SELECT MIN(value) FROM managers AS mgr WHERE mgr.status = shp.status );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "shp", "inner_alias": "mgr", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "shp.status", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_16378
train
v1
Schema: orders (alias: ord)(type, level, amount, date) transactions(value, salary, date, status) Task: Find salary from orders where id appears in transactions entries with matching status. SQL:
SELECT salary FROM orders AS ord WHERE id IN ( SELECT id FROM transactions AS txn WHERE txn.status = ord.status );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "ord", "inner_alias": "txn", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "ord.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16379
train
v3
Schema: invoices (alias: inv)(date, code, status, value) staff(value, date, salary, amount) Task: Find amount from invoices where value exceeds the count of value from staff for the same type. SQL:
SELECT amount FROM invoices AS inv WHERE value > ( SELECT COUNT(value) FROM staff AS empl WHERE empl.type = inv.type );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "inv", "inner_alias": "empl", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "inv.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16380
train
v2
Schema: customers (alias: cust)(status, salary, type, name) branches(id, level, date, type) Task: Retrieve name from customers that have at least one corresponding entry in branches sharing the same status. SQL:
SELECT name 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": "name", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16381
train
v3
Schema: categories (alias: catg)(value, id, code, level) products(id, date, status, value) Task: Retrieve salary from categories with value above the MIN(amount) of products rows sharing the same level. SQL:
SELECT salary FROM categories AS catg WHERE value > ( SELECT MIN(amount) FROM products AS prod WHERE prod.level = catg.level );
{ "outer_table": "categories", "inner_table": "products", "outer_alias": "catg", "inner_alias": "prod", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "catg.level", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_16382
train
v1
Schema: schedules (alias: schd)(type, amount, code, date) transactions(amount, date, level, name) Task: Select name from schedules where level exists in transactions for the same level. SQL:
SELECT name FROM schedules AS schd WHERE level IN ( SELECT level FROM transactions AS txn WHERE txn.level = schd.level );
{ "outer_table": "schedules", "inner_table": "transactions", "outer_alias": "schd", "inner_alias": "txn", "proj_col": "name", "filter_col": "level", "join_col": "level", "correlated_ref": "schd.level", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_16383
train
v3
Schema: invoices (alias: inv)(id, amount, salary, code) products(date, type, status, amount) Task: Retrieve id from invoices with amount above the AVG(value) of products rows sharing the same code. SQL:
SELECT id FROM invoices AS inv WHERE amount > ( SELECT AVG(value) FROM products AS prod WHERE prod.code = inv.code );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "inv", "inner_alias": "prod", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "inv.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16384
train
v1
Schema: tasks (alias: tsk)(code, date, value, status) transactions(id, status, salary, type) Task: Retrieve id from tasks whose type is found in transactions rows where status matches the outer record. SQL:
SELECT id FROM tasks AS tsk WHERE type IN ( SELECT type FROM transactions AS txn WHERE txn.status = tsk.status );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "tsk", "inner_alias": "txn", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "tsk.status", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_16385
train
v2
Schema: items (alias: lne)(status, level, amount, date) regions(name, id, code, amount) Task: Retrieve name from items that have at least one corresponding entry in regions sharing the same type. SQL:
SELECT name FROM items AS lne WHERE EXISTS ( SELECT 1 FROM regions AS rgn WHERE rgn.type = lne.type );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "lne", "inner_alias": "rgn", "proj_col": "name", "join_col": "type", "correlated_ref": "lne.type", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_16386
train
v1
Schema: shipments (alias: shp)(type, code, amount, level) staff(type, salary, code, id) Task: Select value from shipments where level exists in staff for the same level. SQL:
SELECT value FROM shipments AS shp WHERE level IN ( SELECT level FROM staff AS empl WHERE empl.level = shp.level );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "shp", "inner_alias": "empl", "proj_col": "value", "filter_col": "level", "join_col": "level", "correlated_ref": "shp.level", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_16387
train
v1
Schema: departments (alias: dept)(type, code, level, value) regions(level, code, name, date) Task: Find name from departments where code appears in regions entries with matching type. SQL:
SELECT name FROM departments AS dept WHERE code IN ( SELECT code FROM regions AS rgn WHERE rgn.type = dept.type );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dept", "inner_alias": "rgn", "proj_col": "name", "filter_col": "code", "join_col": "type", "correlated_ref": "dept.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16388
train
v1
Schema: tasks (alias: tsk)(id, level, code, value) products(value, name, level, status) Task: Retrieve amount from tasks whose status is found in products rows where status matches the outer record. SQL:
SELECT amount FROM tasks AS tsk WHERE status IN ( SELECT status FROM products AS prod WHERE prod.status = tsk.status );
{ "outer_table": "tasks", "inner_table": "products", "outer_alias": "tsk", "inner_alias": "prod", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "tsk.status", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_16389
train
v3
Schema: employees (alias: emp)(name, id, value, date) accounts(level, amount, value, date) Task: Retrieve amount from employees with salary above the SUM(salary) of accounts rows sharing the same code. SQL:
SELECT amount FROM employees AS emp WHERE salary > ( SELECT SUM(salary) FROM accounts AS acct WHERE acct.code = emp.code );
{ "outer_table": "employees", "inner_table": "accounts", "outer_alias": "emp", "inner_alias": "acct", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16390
train
v2
Schema: schedules (alias: schd)(status, code, salary, level) employees(id, salary, status, name) Task: Retrieve name from schedules that have at least one corresponding entry in employees sharing the same level. SQL:
SELECT name FROM schedules AS schd WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.level = schd.level );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "schd", "inner_alias": "emp", "proj_col": "name", "join_col": "level", "correlated_ref": "schd.level", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_16391
train
v2
Schema: shipments (alias: shp)(id, name, amount, salary) transactions(date, id, code, name) Task: Retrieve code from shipments that have at least one corresponding entry in transactions sharing the same status. SQL:
SELECT code FROM shipments AS shp WHERE EXISTS ( SELECT 1 FROM transactions AS txn WHERE txn.status = shp.status );
{ "outer_table": "shipments", "inner_table": "transactions", "outer_alias": "shp", "inner_alias": "txn", "proj_col": "code", "join_col": "status", "correlated_ref": "shp.status", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_16392
train
v3
Schema: transactions (alias: txn)(value, name, type, salary) departments(status, date, value, amount) Task: Find name from transactions where amount exceeds the total amount from departments for the same level. SQL:
SELECT name FROM transactions AS txn WHERE amount > ( SELECT SUM(amount) FROM departments AS dept WHERE dept.level = txn.level );
{ "outer_table": "transactions", "inner_table": "departments", "outer_alias": "txn", "inner_alias": "dept", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "txn.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16393
train
v2
Schema: sales (alias: sale)(code, name, level, type) products(date, code, level, type) Task: Find code from sales where a matching record exists in products with the same type. SQL:
SELECT code FROM sales AS sale WHERE EXISTS ( SELECT 1 FROM products AS prod WHERE prod.type = sale.type );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "sale", "inner_alias": "prod", "proj_col": "code", "join_col": "type", "correlated_ref": "sale.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16394
train
v2
Schema: accounts (alias: acct)(id, name, value, code) orders(code, amount, name, id) Task: Find salary from accounts where a matching record exists in orders with the same status. SQL:
SELECT salary FROM accounts AS acct WHERE EXISTS ( SELECT 1 FROM orders AS ord WHERE ord.status = acct.status );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "acct", "inner_alias": "ord", "proj_col": "salary", "join_col": "status", "correlated_ref": "acct.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16395
train
v3
Schema: orders (alias: ord)(type, id, name, date) schedules(level, type, code, name) Task: Find value from orders where salary exceeds the average amount from schedules for the same code. SQL:
SELECT value FROM orders AS ord WHERE salary > ( SELECT AVG(amount) FROM schedules AS schd WHERE schd.code = ord.code );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "ord", "inner_alias": "schd", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "ord.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_16396
train
v2
Schema: categories (alias: catg)(value, salary, date, type) requests(date, status, value, level) Task: Find salary from categories where a matching record exists in requests with the same status. SQL:
SELECT salary FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.status = catg.status );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "catg", "inner_alias": "ordr", "proj_col": "salary", "join_col": "status", "correlated_ref": "catg.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_16397
train
v2
Schema: projects (alias: prj)(level, salary, id, amount) products(value, code, status, name) Task: Retrieve id from projects that have at least one corresponding entry in products sharing the same level. SQL:
SELECT id FROM projects AS prj WHERE EXISTS ( SELECT 1 FROM products AS prod WHERE prod.level = prj.level );
{ "outer_table": "projects", "inner_table": "products", "outer_alias": "prj", "inner_alias": "prod", "proj_col": "id", "join_col": "level", "correlated_ref": "prj.level", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_16398
train
v1
Schema: schedules (alias: schd)(level, date, id, amount) tasks(type, salary, amount, level) Task: Find id from schedules where status appears in tasks entries with matching level. SQL:
SELECT id FROM schedules AS schd WHERE status IN ( SELECT status FROM tasks AS tsk WHERE tsk.level = schd.level );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "schd", "inner_alias": "tsk", "proj_col": "id", "filter_col": "status", "join_col": "level", "correlated_ref": "schd.level", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_16399
train