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: employees (alias: emp)(type, amount, status, level) sales(id, value, date, salary) Task: Find code from employees where a matching record exists in sales with the same status. SQL:
SELECT code FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM sales AS sale WHERE sale.status = emp.status );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "emp", "inner_alias": "sale", "proj_col": "code", "join_col": "status", "correlated_ref": "emp.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07800
train
v2
Schema: invoices (alias: inv)(name, salary, amount, type) employees(status, id, level, amount) Task: Find id from invoices where a matching record exists in employees with the same id. SQL:
SELECT id FROM invoices AS inv WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.id = inv.id );
{ "outer_table": "invoices", "inner_table": "employees", "outer_alias": "inv", "inner_alias": "emp", "proj_col": "id", "join_col": "id", "correlated_ref": "inv.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07801
train
v2
Schema: tasks (alias: tsk)(level, value, salary, code) sales(id, salary, code, value) Task: Find amount from tasks where a matching record exists in sales with the same code. SQL:
SELECT amount FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM sales AS sale WHERE sale.code = tsk.code );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "tsk", "inner_alias": "sale", "proj_col": "amount", "join_col": "code", "correlated_ref": "tsk.code", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_07802
train
v3
Schema: departments (alias: dept)(amount, id, value, date) invoices(status, id, value, level) Task: Retrieve id from departments with value above the MAX(salary) of invoices rows sharing the same id. SQL:
SELECT id FROM departments AS dept WHERE value > ( SELECT MAX(salary) FROM invoices AS inv WHERE inv.id = dept.id );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dept", "inner_alias": "inv", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "dept.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07803
train
v3
Schema: shipments (alias: shp)(id, amount, date, salary) orders(id, salary, status, type) Task: Retrieve amount from shipments with value above the SUM(salary) of orders rows sharing the same status. SQL:
SELECT amount FROM shipments AS shp WHERE value > ( SELECT SUM(salary) FROM orders AS ord WHERE ord.status = shp.status );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "shp", "inner_alias": "ord", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "shp.status", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_07804
train
v2
Schema: customers (alias: cust)(value, salary, date, code) orders(date, status, level, id) Task: Find amount from customers where a matching record exists in orders with the same type. SQL:
SELECT amount FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM orders AS ord WHERE ord.type = cust.type );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "cust", "inner_alias": "ord", "proj_col": "amount", "join_col": "type", "correlated_ref": "cust.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07805
train
v2
Schema: departments (alias: dept)(type, id, level, date) products(code, level, salary, date) Task: Retrieve amount from departments that have at least one corresponding entry in products sharing the same id. SQL:
SELECT amount FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM products AS prod WHERE prod.id = dept.id );
{ "outer_table": "departments", "inner_table": "products", "outer_alias": "dept", "inner_alias": "prod", "proj_col": "amount", "join_col": "id", "correlated_ref": "dept.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07806
train
v3
Schema: requests (alias: ordr)(status, value, id, name) branches(date, id, name, salary) Task: Find name from requests where value exceeds the total salary from branches for the same level. SQL:
SELECT name FROM requests AS ordr WHERE value > ( SELECT SUM(salary) FROM branches AS brc WHERE brc.level = ordr.level );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ordr", "inner_alias": "brc", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "ordr.level", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_07807
train
v1
Schema: schedules (alias: schd)(name, salary, id, type) accounts(value, code, name, id) Task: Select value from schedules where level exists in accounts for the same id. SQL:
SELECT value FROM schedules AS schd WHERE level IN ( SELECT level FROM accounts AS acct WHERE acct.id = schd.id );
{ "outer_table": "schedules", "inner_table": "accounts", "outer_alias": "schd", "inner_alias": "acct", "proj_col": "value", "filter_col": "level", "join_col": "id", "correlated_ref": "schd.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_07808
train
v1
Schema: tasks (alias: tsk)(level, date, id, name) sales(value, date, id, amount) Task: Select id from tasks where id exists in sales for the same type. SQL:
SELECT id FROM tasks AS tsk WHERE id IN ( SELECT id FROM sales AS sale WHERE sale.type = tsk.type );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "tsk", "inner_alias": "sale", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "tsk.type", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_07809
train
v1
Schema: staff (alias: empl)(level, date, status, salary) regions(value, type, id, name) Task: Retrieve name from staff whose type is found in regions rows where status matches the outer record. SQL:
SELECT name FROM staff AS empl WHERE type IN ( SELECT type FROM regions AS rgn WHERE rgn.status = empl.status );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "empl", "inner_alias": "rgn", "proj_col": "name", "filter_col": "type", "join_col": "status", "correlated_ref": "empl.status", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_07810
train
v1
Schema: tasks (alias: tsk)(date, amount, id, value) sales(salary, amount, status, date) Task: Find salary from tasks where id appears in sales entries with matching code. SQL:
SELECT salary FROM tasks AS tsk WHERE id IN ( SELECT id FROM sales AS sale WHERE sale.code = tsk.code );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "tsk", "inner_alias": "sale", "proj_col": "salary", "filter_col": "id", "join_col": "code", "correlated_ref": "tsk.code", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_07811
train
v2
Schema: employees (alias: emp)(status, value, amount, id) branches(date, amount, value, salary) Task: Find code from employees where a matching record exists in branches with the same code. SQL:
SELECT code FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM branches AS brc WHERE brc.code = emp.code );
{ "outer_table": "employees", "inner_table": "branches", "outer_alias": "emp", "inner_alias": "brc", "proj_col": "code", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07812
train
v3
Schema: sales (alias: sale)(type, code, status, date) employees(code, value, level, date) Task: Retrieve name from sales with amount above the SUM(salary) of employees rows sharing the same type. SQL:
SELECT name FROM sales AS sale WHERE amount > ( SELECT SUM(salary) FROM employees AS emp WHERE emp.type = sale.type );
{ "outer_table": "sales", "inner_table": "employees", "outer_alias": "sale", "inner_alias": "emp", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "sale.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07813
train
v1
Schema: shipments (alias: shp)(date, salary, type, status) managers(id, date, level, name) Task: Select code from shipments where code exists in managers for the same level. SQL:
SELECT code FROM shipments AS shp WHERE code IN ( SELECT code FROM managers AS mgr WHERE mgr.level = shp.level );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "shp", "inner_alias": "mgr", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "shp.level", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_07814
train
v2
Schema: orders (alias: ord)(name, value, code, level) transactions(amount, id, salary, code) Task: Find id from orders where a matching record exists in transactions with the same level. SQL:
SELECT id FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM transactions AS txn WHERE txn.level = ord.level );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "ord", "inner_alias": "txn", "proj_col": "id", "join_col": "level", "correlated_ref": "ord.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07815
train
v1
Schema: accounts (alias: acct)(type, date, id, code) staff(status, amount, name, type) Task: Retrieve amount from accounts whose id is found in staff rows where status matches the outer record. SQL:
SELECT amount FROM accounts AS acct WHERE id IN ( SELECT id FROM staff AS empl WHERE empl.status = acct.status );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "acct", "inner_alias": "empl", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "acct.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07816
train
v1
Schema: regions (alias: rgn)(name, date, salary, status) products(name, id, code, date) Task: Select salary from regions where type exists in products for the same type. SQL:
SELECT salary FROM regions AS rgn WHERE type IN ( SELECT type FROM products AS prod WHERE prod.type = rgn.type );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "rgn", "inner_alias": "prod", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "rgn.type", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_07817
train
v1
Schema: departments (alias: dept)(name, amount, code, salary) transactions(value, status, level, id) Task: Retrieve name from departments whose id is found in transactions rows where code matches the outer record. SQL:
SELECT name FROM departments AS dept WHERE id IN ( SELECT id FROM transactions AS txn WHERE txn.code = dept.code );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dept", "inner_alias": "txn", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07818
train
v2
Schema: tasks (alias: tsk)(type, amount, value, date) employees(type, level, status, amount) Task: Retrieve value from tasks that have at least one corresponding entry in employees sharing the same level. SQL:
SELECT value FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.level = tsk.level );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "tsk", "inner_alias": "emp", "proj_col": "value", "join_col": "level", "correlated_ref": "tsk.level", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_07819
train
v1
Schema: accounts (alias: acct)(type, salary, date, status) branches(amount, salary, level, status) Task: Find salary from accounts where level appears in branches entries with matching status. SQL:
SELECT salary FROM accounts AS acct WHERE level IN ( SELECT level FROM branches AS brc WHERE brc.status = acct.status );
{ "outer_table": "accounts", "inner_table": "branches", "outer_alias": "acct", "inner_alias": "brc", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "acct.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07820
train
v2
Schema: staff (alias: empl)(amount, status, code, name) shipments(name, value, type, level) Task: Retrieve amount from staff that have at least one corresponding entry in shipments sharing the same level. SQL:
SELECT amount FROM staff AS empl WHERE EXISTS ( SELECT 1 FROM shipments AS shp WHERE shp.level = empl.level );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "empl", "inner_alias": "shp", "proj_col": "amount", "join_col": "level", "correlated_ref": "empl.level", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_07821
train
v1
Schema: customers (alias: cust)(type, status, amount, name) branches(name, date, salary, status) Task: Find name from customers where status appears in branches entries with matching type. SQL:
SELECT name FROM customers AS cust WHERE status IN ( SELECT status FROM branches AS brc WHERE brc.type = cust.type );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "cust", "inner_alias": "brc", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "cust.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07822
train
v1
Schema: transactions (alias: txn)(level, type, date, code) tasks(amount, code, date, level) Task: Retrieve code from transactions whose code is found in tasks rows where code matches the outer record. SQL:
SELECT code FROM transactions AS txn WHERE code IN ( SELECT code FROM tasks AS tsk WHERE tsk.code = txn.code );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "txn", "inner_alias": "tsk", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "txn.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07823
train
v2
Schema: accounts (alias: acct)(level, code, id, value) managers(date, status, level, id) Task: Find amount from accounts where a matching record exists in managers with the same type. SQL:
SELECT amount FROM accounts AS acct WHERE EXISTS ( SELECT 1 FROM managers AS mgr WHERE mgr.type = acct.type );
{ "outer_table": "accounts", "inner_table": "managers", "outer_alias": "acct", "inner_alias": "mgr", "proj_col": "amount", "join_col": "type", "correlated_ref": "acct.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07824
train
v2
Schema: customers (alias: cust)(level, date, code, name) invoices(code, status, name, level) Task: Retrieve salary from customers that have at least one corresponding entry in invoices sharing the same level. SQL:
SELECT salary FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.level = cust.level );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "cust", "inner_alias": "inv", "proj_col": "salary", "join_col": "level", "correlated_ref": "cust.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07825
train
v2
Schema: orders (alias: ord)(salary, status, type, date) customers(date, type, value, amount) Task: Find salary from orders where a matching record exists in customers with the same type. SQL:
SELECT salary FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.type = ord.type );
{ "outer_table": "orders", "inner_table": "customers", "outer_alias": "ord", "inner_alias": "cust", "proj_col": "salary", "join_col": "type", "correlated_ref": "ord.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07826
train
v3
Schema: categories (alias: catg)(value, salary, amount, id) projects(salary, name, status, id) Task: Find code from categories where amount exceeds the total amount from projects for the same type. SQL:
SELECT code FROM categories AS catg WHERE amount > ( SELECT SUM(amount) FROM projects AS prj WHERE prj.type = catg.type );
{ "outer_table": "categories", "inner_table": "projects", "outer_alias": "catg", "inner_alias": "prj", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "catg.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_07827
train
v2
Schema: managers (alias: mgr)(value, salary, date, name) schedules(id, date, code, name) Task: Find name from managers where a matching record exists in schedules with the same code. SQL:
SELECT name FROM managers AS mgr WHERE EXISTS ( SELECT 1 FROM schedules AS schd WHERE schd.code = mgr.code );
{ "outer_table": "managers", "inner_table": "schedules", "outer_alias": "mgr", "inner_alias": "schd", "proj_col": "name", "join_col": "code", "correlated_ref": "mgr.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07828
train
v1
Schema: customers (alias: cust)(code, status, level, date) transactions(type, value, name, date) Task: Select code from customers where level exists in transactions for the same type. SQL:
SELECT code FROM customers AS cust WHERE level IN ( SELECT level FROM transactions AS txn WHERE txn.type = cust.type );
{ "outer_table": "customers", "inner_table": "transactions", "outer_alias": "cust", "inner_alias": "txn", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "cust.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07829
train
v1
Schema: employees (alias: emp)(value, code, level, name) customers(name, value, salary, level) Task: Find name from employees where type appears in customers entries with matching status. SQL:
SELECT name FROM employees AS emp WHERE type IN ( SELECT type FROM customers AS cust WHERE cust.status = emp.status );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "emp", "inner_alias": "cust", "proj_col": "name", "filter_col": "type", "join_col": "status", "correlated_ref": "emp.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07830
train
v3
Schema: sales (alias: sale)(type, status, amount, code) invoices(code, value, level, status) Task: Retrieve amount from sales with value above the MAX(amount) of invoices rows sharing the same status. SQL:
SELECT amount FROM sales AS sale WHERE value > ( SELECT MAX(amount) FROM invoices AS inv WHERE inv.status = sale.status );
{ "outer_table": "sales", "inner_table": "invoices", "outer_alias": "sale", "inner_alias": "inv", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "sale.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07831
train
v1
Schema: shipments (alias: shp)(value, salary, date, id) employees(salary, code, id, name) Task: Find salary from shipments where level appears in employees entries with matching status. SQL:
SELECT salary FROM shipments AS shp WHERE level IN ( SELECT level FROM employees AS emp WHERE emp.status = shp.status );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "shp", "inner_alias": "emp", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "shp.status", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_07832
train
v2
Schema: accounts (alias: acct)(id, type, amount, status) transactions(type, status, id, name) Task: Retrieve value from accounts that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT value FROM accounts AS acct WHERE EXISTS ( SELECT 1 FROM transactions AS txn WHERE txn.code = acct.code );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "acct", "inner_alias": "txn", "proj_col": "value", "join_col": "code", "correlated_ref": "acct.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07833
train
v2
Schema: invoices (alias: inv)(level, value, amount, status) projects(name, date, id, type) Task: Find name from invoices where a matching record exists in projects with the same id. SQL:
SELECT name FROM invoices AS inv WHERE EXISTS ( SELECT 1 FROM projects AS prj WHERE prj.id = inv.id );
{ "outer_table": "invoices", "inner_table": "projects", "outer_alias": "inv", "inner_alias": "prj", "proj_col": "name", "join_col": "id", "correlated_ref": "inv.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07834
train
v1
Schema: products (alias: prod)(salary, code, name, amount) accounts(date, amount, value, salary) Task: Find amount from products where level appears in accounts entries with matching id. SQL:
SELECT amount FROM products AS prod WHERE level IN ( SELECT level FROM accounts AS acct WHERE acct.id = prod.id );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "prod", "inner_alias": "acct", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "prod.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07835
train
v3
Schema: categories (alias: catg)(type, salary, code, name) branches(type, name, level, status) Task: Find code from categories where salary exceeds the minimum value from branches for the same type. SQL:
SELECT code FROM categories AS catg WHERE salary > ( SELECT MIN(value) FROM branches AS brc WHERE brc.type = catg.type );
{ "outer_table": "categories", "inner_table": "branches", "outer_alias": "catg", "inner_alias": "brc", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "catg.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_07836
train
v3
Schema: requests (alias: ordr)(name, status, level, date) products(type, name, salary, id) Task: Find salary from requests where salary exceeds the total value from products for the same status. SQL:
SELECT salary FROM requests AS ordr WHERE salary > ( SELECT SUM(value) FROM products AS prod WHERE prod.status = ordr.status );
{ "outer_table": "requests", "inner_table": "products", "outer_alias": "ordr", "inner_alias": "prod", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "ordr.status", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_07837
train
v2
Schema: accounts (alias: acct)(type, name, level, value) regions(value, date, level, code) Task: Find id from accounts where a matching record exists in regions with the same type. SQL:
SELECT id FROM accounts AS acct WHERE EXISTS ( SELECT 1 FROM regions AS rgn WHERE rgn.type = acct.type );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "acct", "inner_alias": "rgn", "proj_col": "id", "join_col": "type", "correlated_ref": "acct.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07838
train
v3
Schema: schedules (alias: schd)(status, salary, id, type) shipments(type, id, amount, name) Task: Retrieve amount from schedules with salary above the MAX(salary) of shipments rows sharing the same status. SQL:
SELECT amount FROM schedules AS schd WHERE salary > ( SELECT MAX(salary) FROM shipments AS shp WHERE shp.status = schd.status );
{ "outer_table": "schedules", "inner_table": "shipments", "outer_alias": "schd", "inner_alias": "shp", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "schd.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_07839
train
v2
Schema: tasks (alias: tsk)(status, id, code, name) regions(salary, date, type, status) Task: Retrieve code from tasks that have at least one corresponding entry in regions sharing the same id. SQL:
SELECT code FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM regions AS rgn WHERE rgn.id = tsk.id );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "tsk", "inner_alias": "rgn", "proj_col": "code", "join_col": "id", "correlated_ref": "tsk.id", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_07840
train
v2
Schema: schedules (alias: schd)(salary, value, level, name) employees(value, status, type, name) Task: Retrieve code from schedules that have at least one corresponding entry in employees sharing the same id. SQL:
SELECT code FROM schedules AS schd WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.id = schd.id );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "schd", "inner_alias": "emp", "proj_col": "code", "join_col": "id", "correlated_ref": "schd.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_07841
train
v2
Schema: projects (alias: prj)(amount, date, status, salary) staff(amount, code, salary, date) Task: Retrieve code from projects that have at least one corresponding entry in staff sharing the same type. SQL:
SELECT code FROM projects AS prj WHERE EXISTS ( SELECT 1 FROM staff AS empl WHERE empl.type = prj.type );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "prj", "inner_alias": "empl", "proj_col": "code", "join_col": "type", "correlated_ref": "prj.type", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_07842
train
v3
Schema: products (alias: prod)(amount, name, id, code) employees(name, date, status, level) Task: Find id from products where value exceeds the total salary from employees for the same id. SQL:
SELECT id FROM products AS prod WHERE value > ( SELECT SUM(salary) FROM employees AS emp WHERE emp.id = prod.id );
{ "outer_table": "products", "inner_table": "employees", "outer_alias": "prod", "inner_alias": "emp", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "prod.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07843
train
v2
Schema: orders (alias: ord)(name, value, salary, code) regions(id, name, status, code) Task: Find salary from orders where a matching record exists in regions with the same code. SQL:
SELECT salary FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM regions AS rgn WHERE rgn.code = ord.code );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "ord", "inner_alias": "rgn", "proj_col": "salary", "join_col": "code", "correlated_ref": "ord.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07844
train
v1
Schema: projects (alias: prj)(salary, amount, id, level) managers(salary, amount, id, date) Task: Select value from projects where level exists in managers for the same level. SQL:
SELECT value FROM projects AS prj WHERE level IN ( SELECT level FROM managers AS mgr WHERE mgr.level = prj.level );
{ "outer_table": "projects", "inner_table": "managers", "outer_alias": "prj", "inner_alias": "mgr", "proj_col": "value", "filter_col": "level", "join_col": "level", "correlated_ref": "prj.level", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_07845
train
v1
Schema: orders (alias: ord)(name, id, level, code) regions(code, salary, type, name) Task: Retrieve code from orders whose id is found in regions rows where level matches the outer record. SQL:
SELECT code FROM orders AS ord WHERE id IN ( SELECT id FROM regions AS rgn WHERE rgn.level = ord.level );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "ord", "inner_alias": "rgn", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "ord.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07846
train
v1
Schema: schedules (alias: schd)(code, value, salary, amount) managers(name, level, code, date) Task: Find id from schedules where type appears in managers entries with matching type. SQL:
SELECT id FROM schedules AS schd WHERE type IN ( SELECT type FROM managers AS mgr WHERE mgr.type = schd.type );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "schd", "inner_alias": "mgr", "proj_col": "id", "filter_col": "type", "join_col": "type", "correlated_ref": "schd.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_07847
train
v1
Schema: categories (alias: catg)(id, type, level, date) employees(level, type, id, amount) Task: Retrieve salary from categories whose level is found in employees rows where status matches the outer record. SQL:
SELECT salary FROM categories AS catg WHERE level IN ( SELECT level FROM employees AS emp WHERE emp.status = catg.status );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "catg", "inner_alias": "emp", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "catg.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_07848
train
v3
Schema: departments (alias: dept)(code, level, salary, id) tasks(value, type, amount, salary) Task: Retrieve value from departments with value above the COUNT(amount) of tasks rows sharing the same level. SQL:
SELECT value FROM departments AS dept WHERE value > ( SELECT COUNT(amount) FROM tasks AS tsk WHERE tsk.level = dept.level );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dept", "inner_alias": "tsk", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "dept.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07849
train
v2
Schema: orders (alias: ord)(status, date, type, name) staff(type, date, level, id) Task: Retrieve code from orders that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT code FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM staff AS empl WHERE empl.level = ord.level );
{ "outer_table": "orders", "inner_table": "staff", "outer_alias": "ord", "inner_alias": "empl", "proj_col": "code", "join_col": "level", "correlated_ref": "ord.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07850
train
v2
Schema: categories (alias: catg)(value, id, status, code) managers(id, amount, level, type) Task: Retrieve id from categories that have at least one corresponding entry in managers sharing the same code. SQL:
SELECT id FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM managers AS mgr WHERE mgr.code = catg.code );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "catg", "inner_alias": "mgr", "proj_col": "id", "join_col": "code", "correlated_ref": "catg.code", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_07851
train
v2
Schema: managers (alias: mgr)(type, status, value, code) shipments(value, amount, name, level) Task: Find code from managers where a matching record exists in shipments with the same type. SQL:
SELECT code FROM managers AS mgr WHERE EXISTS ( SELECT 1 FROM shipments AS shp WHERE shp.type = mgr.type );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "mgr", "inner_alias": "shp", "proj_col": "code", "join_col": "type", "correlated_ref": "mgr.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07852
train
v1
Schema: accounts (alias: acct)(amount, date, type, salary) managers(amount, value, name, status) Task: Select id from accounts where level exists in managers for the same level. SQL:
SELECT id FROM accounts AS acct WHERE level IN ( SELECT level FROM managers AS mgr WHERE mgr.level = acct.level );
{ "outer_table": "accounts", "inner_table": "managers", "outer_alias": "acct", "inner_alias": "mgr", "proj_col": "id", "filter_col": "level", "join_col": "level", "correlated_ref": "acct.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07853
train
v2
Schema: tasks (alias: tsk)(id, name, code, salary) shipments(level, type, id, name) Task: Retrieve amount from tasks that have at least one corresponding entry in shipments sharing the same status. SQL:
SELECT amount FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM shipments AS shp WHERE shp.status = tsk.status );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "tsk", "inner_alias": "shp", "proj_col": "amount", "join_col": "status", "correlated_ref": "tsk.status", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_07854
train
v2
Schema: departments (alias: dept)(date, status, level, type) products(status, salary, name, value) Task: Find amount from departments where a matching record exists in products with the same level. SQL:
SELECT amount 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": "amount", "join_col": "level", "correlated_ref": "dept.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07855
train
v3
Schema: categories (alias: catg)(name, type, code, value) managers(code, level, value, id) Task: Retrieve code from categories with salary above the AVG(salary) of managers rows sharing the same status. SQL:
SELECT code FROM categories AS catg WHERE salary > ( SELECT AVG(salary) FROM managers AS mgr WHERE mgr.status = catg.status );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "catg", "inner_alias": "mgr", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "catg.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_07856
train
v1
Schema: orders (alias: ord)(salary, type, date, name) items(code, date, value, salary) Task: Retrieve code from orders whose code is found in items rows where status matches the outer record. SQL:
SELECT code FROM orders AS ord WHERE code IN ( SELECT code FROM items AS lne WHERE lne.status = ord.status );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "ord", "inner_alias": "lne", "proj_col": "code", "filter_col": "code", "join_col": "status", "correlated_ref": "ord.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07857
train
v3
Schema: sales (alias: sale)(id, status, type, amount) accounts(code, type, date, status) Task: Retrieve salary from sales with amount above the AVG(salary) of accounts rows sharing the same id. SQL:
SELECT salary FROM sales AS sale WHERE amount > ( SELECT AVG(salary) FROM accounts AS acct WHERE acct.id = sale.id );
{ "outer_table": "sales", "inner_table": "accounts", "outer_alias": "sale", "inner_alias": "acct", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "sale.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07858
train
v3
Schema: orders (alias: ord)(id, status, value, level) shipments(type, value, date, level) Task: Find value from orders where value exceeds the total salary from shipments for the same level. SQL:
SELECT value FROM orders AS ord WHERE value > ( SELECT SUM(salary) FROM shipments AS shp WHERE shp.level = ord.level );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "ord", "inner_alias": "shp", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "ord.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07859
train
v2
Schema: transactions (alias: txn)(code, type, name, date) products(status, name, type, salary) Task: Retrieve code from transactions that have at least one corresponding entry in products sharing the same id. SQL:
SELECT code FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM products AS prod WHERE prod.id = txn.id );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "txn", "inner_alias": "prod", "proj_col": "code", "join_col": "id", "correlated_ref": "txn.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07860
train
v2
Schema: items (alias: lne)(status, salary, date, amount) requests(id, value, salary, amount) Task: Find code from items where a matching record exists in requests with the same id. SQL:
SELECT code FROM items AS lne WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.id = lne.id );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "lne", "inner_alias": "ordr", "proj_col": "code", "join_col": "id", "correlated_ref": "lne.id", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_07861
train
v1
Schema: projects (alias: prj)(status, amount, date, value) orders(value, date, type, salary) Task: Select id from projects where level exists in orders for the same type. SQL:
SELECT id FROM projects AS prj WHERE level IN ( SELECT level 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": "level", "join_col": "type", "correlated_ref": "prj.type", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_07862
train
v2
Schema: employees (alias: emp)(id, code, name, type) categories(salary, amount, value, name) Task: Retrieve code from employees that have at least one corresponding entry in categories sharing the same level. SQL:
SELECT code FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM categories AS catg WHERE catg.level = emp.level );
{ "outer_table": "employees", "inner_table": "categories", "outer_alias": "emp", "inner_alias": "catg", "proj_col": "code", "join_col": "level", "correlated_ref": "emp.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07863
train
v1
Schema: staff (alias: empl)(salary, type, level, amount) sales(amount, id, salary, type) Task: Select amount from staff where level exists in sales for the same id. SQL:
SELECT amount FROM staff AS empl WHERE level IN ( SELECT level FROM sales AS sale WHERE sale.id = empl.id );
{ "outer_table": "staff", "inner_table": "sales", "outer_alias": "empl", "inner_alias": "sale", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "empl.id", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_07864
train
v1
Schema: sales (alias: sale)(status, salary, value, date) staff(amount, name, date, id) Task: Find amount from sales where level appears in staff entries with matching level. SQL:
SELECT amount FROM sales AS sale WHERE level IN ( SELECT level FROM staff AS empl WHERE empl.level = sale.level );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "sale", "inner_alias": "empl", "proj_col": "amount", "filter_col": "level", "join_col": "level", "correlated_ref": "sale.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07865
train
v3
Schema: employees (alias: emp)(status, date, type, code) customers(name, date, level, status) Task: Retrieve name from employees with salary above the COUNT(value) of customers rows sharing the same type. SQL:
SELECT name FROM employees AS emp WHERE salary > ( SELECT COUNT(value) FROM customers AS cust WHERE cust.type = emp.type );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "emp", "inner_alias": "cust", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "emp.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07866
train
v1
Schema: regions (alias: rgn)(amount, value, code, status) shipments(name, id, date, type) Task: Retrieve name from regions whose status is found in shipments rows where level matches the outer record. SQL:
SELECT name FROM regions AS rgn WHERE status IN ( SELECT status FROM shipments AS shp WHERE shp.level = rgn.level );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "rgn", "inner_alias": "shp", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "rgn.level", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_07867
train
v2
Schema: accounts (alias: acct)(amount, value, name, status) categories(status, amount, date, code) Task: Retrieve code from accounts that have at least one corresponding entry in categories sharing the same code. SQL:
SELECT code FROM accounts AS acct WHERE EXISTS ( SELECT 1 FROM categories AS catg WHERE catg.code = acct.code );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "acct", "inner_alias": "catg", "proj_col": "code", "join_col": "code", "correlated_ref": "acct.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07868
train
v1
Schema: customers (alias: cust)(date, value, status, amount) orders(amount, name, id, salary) Task: Retrieve value from customers whose code is found in orders rows where type matches the outer record. SQL:
SELECT value FROM customers AS cust WHERE code IN ( SELECT code FROM orders AS ord WHERE ord.type = cust.type );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "cust", "inner_alias": "ord", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "cust.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07869
train
v2
Schema: employees (alias: emp)(name, value, id, amount) items(type, salary, level, date) Task: Retrieve code from employees that have at least one corresponding entry in items sharing the same id. SQL:
SELECT code FROM employees AS emp WHERE EXISTS ( SELECT 1 FROM items AS lne WHERE lne.id = emp.id );
{ "outer_table": "employees", "inner_table": "items", "outer_alias": "emp", "inner_alias": "lne", "proj_col": "code", "join_col": "id", "correlated_ref": "emp.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07870
train
v1
Schema: shipments (alias: shp)(salary, name, code, level) employees(name, type, salary, status) Task: Retrieve value from shipments whose id is found in employees rows where level matches the outer record. SQL:
SELECT value FROM shipments AS shp WHERE id IN ( SELECT id FROM employees AS emp WHERE emp.level = shp.level );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "shp", "inner_alias": "emp", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "shp.level", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_07871
train
v3
Schema: sales (alias: sale)(amount, date, salary, value) managers(amount, date, type, code) Task: Find name from sales where value exceeds the total salary from managers for the same level. SQL:
SELECT name FROM sales AS sale WHERE value > ( SELECT SUM(salary) FROM managers AS mgr WHERE mgr.level = sale.level );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "sale", "inner_alias": "mgr", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "sale.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07872
train
v1
Schema: tasks (alias: tsk)(amount, id, value, type) departments(value, amount, id, status) Task: Retrieve value from tasks whose status is found in departments rows where level matches the outer record. SQL:
SELECT value FROM tasks AS tsk WHERE status IN ( SELECT status FROM departments AS dept WHERE dept.level = tsk.level );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "tsk", "inner_alias": "dept", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "tsk.level", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_07873
train
v1
Schema: departments (alias: dept)(name, amount, code, status) requests(status, amount, value, name) Task: Find code from departments where code appears in requests entries with matching level. SQL:
SELECT code FROM departments AS dept WHERE code IN ( SELECT code FROM requests AS ordr WHERE ordr.level = dept.level );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dept", "inner_alias": "ordr", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "dept.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07874
train
v1
Schema: categories (alias: catg)(value, status, date, type) schedules(name, amount, salary, status) Task: Find id from categories where id appears in schedules entries with matching status. SQL:
SELECT id FROM categories AS catg WHERE id IN ( SELECT id FROM schedules AS schd WHERE schd.status = catg.status );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "catg", "inner_alias": "schd", "proj_col": "id", "filter_col": "id", "join_col": "status", "correlated_ref": "catg.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_07875
train
v2
Schema: customers (alias: cust)(value, salary, id, amount) tasks(type, value, amount, salary) Task: Retrieve salary from customers that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT salary FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM tasks AS tsk WHERE tsk.status = cust.status );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "cust", "inner_alias": "tsk", "proj_col": "salary", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07876
train
v2
Schema: managers (alias: mgr)(amount, level, salary, code) requests(date, type, value, id) Task: Retrieve name from managers that have at least one corresponding entry in requests sharing the same status. SQL:
SELECT name FROM managers AS mgr WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.status = mgr.status );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "mgr", "inner_alias": "ordr", "proj_col": "name", "join_col": "status", "correlated_ref": "mgr.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07877
train
v2
Schema: projects (alias: prj)(amount, level, date, name) invoices(name, amount, value, level) Task: Find amount from projects where a matching record exists in invoices with the same id. SQL:
SELECT amount FROM projects AS prj WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.id = prj.id );
{ "outer_table": "projects", "inner_table": "invoices", "outer_alias": "prj", "inner_alias": "inv", "proj_col": "amount", "join_col": "id", "correlated_ref": "prj.id", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_07878
train
v1
Schema: accounts (alias: acct)(type, value, name, code) departments(salary, amount, status, code) Task: Retrieve value from accounts whose level is found in departments rows where status matches the outer record. SQL:
SELECT value FROM accounts AS acct WHERE level IN ( SELECT level FROM departments AS dept WHERE dept.status = acct.status );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "acct", "inner_alias": "dept", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "acct.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07879
train
v1
Schema: requests (alias: ordr)(salary, level, amount, date) managers(salary, status, amount, value) Task: Retrieve name from requests whose status is found in managers rows where type matches the outer record. SQL:
SELECT name FROM requests AS ordr WHERE status IN ( SELECT status FROM managers AS mgr WHERE mgr.type = ordr.type );
{ "outer_table": "requests", "inner_table": "managers", "outer_alias": "ordr", "inner_alias": "mgr", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "ordr.type", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_07880
train
v2
Schema: projects (alias: prj)(value, type, level, salary) departments(value, salary, date, id) Task: Find amount from projects where a matching record exists in departments with 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_07881
train
v1
Schema: schedules (alias: schd)(status, level, date, name) products(code, date, salary, value) Task: Find salary from schedules where code appears in products entries with matching id. SQL:
SELECT salary FROM schedules AS schd WHERE code IN ( SELECT code FROM products AS prod WHERE prod.id = schd.id );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "schd", "inner_alias": "prod", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "schd.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_07882
train
v2
Schema: transactions (alias: txn)(level, status, id, date) customers(date, type, status, code) Task: Find value from transactions where a matching record exists in customers with the same type. SQL:
SELECT value FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.type = txn.type );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "txn", "inner_alias": "cust", "proj_col": "value", "join_col": "type", "correlated_ref": "txn.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07883
train
v3
Schema: invoices (alias: inv)(status, level, amount, salary) staff(salary, name, type, level) Task: Find id from invoices where amount exceeds the count of salary from staff for the same code. SQL:
SELECT id FROM invoices AS inv WHERE amount > ( SELECT COUNT(salary) FROM staff AS empl WHERE empl.code = inv.code );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "inv", "inner_alias": "empl", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "inv.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07884
train
v3
Schema: tasks (alias: tsk)(type, salary, date, code) schedules(date, salary, amount, status) Task: Retrieve amount from tasks with amount above the MIN(amount) of schedules rows sharing the same id. SQL:
SELECT amount FROM tasks AS tsk WHERE amount > ( SELECT MIN(amount) FROM schedules AS schd WHERE schd.id = tsk.id );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "tsk", "inner_alias": "schd", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "tsk.id", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_07885
train
v1
Schema: shipments (alias: shp)(name, type, status, amount) schedules(type, code, amount, level) Task: Retrieve amount from shipments whose status is found in schedules rows where level matches the outer record. SQL:
SELECT amount FROM shipments AS shp WHERE status IN ( SELECT status FROM schedules AS schd WHERE schd.level = shp.level );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "shp", "inner_alias": "schd", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "shp.level", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_07886
train
v3
Schema: accounts (alias: acct)(level, status, id, amount) products(amount, date, value, status) Task: Find salary from accounts where salary exceeds the count of value from products for the same id. SQL:
SELECT salary FROM accounts AS acct WHERE salary > ( SELECT COUNT(value) FROM products AS prod WHERE prod.id = acct.id );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "acct", "inner_alias": "prod", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "acct.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07887
train
v2
Schema: items (alias: lne)(level, status, code, value) requests(salary, value, level, id) Task: Retrieve id from items that have at least one corresponding entry in requests sharing the same status. SQL:
SELECT id FROM items AS lne WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.status = lne.status );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "lne", "inner_alias": "ordr", "proj_col": "id", "join_col": "status", "correlated_ref": "lne.status", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_07888
train
v1
Schema: accounts (alias: acct)(amount, level, status, code) requests(id, value, code, status) Task: Find amount from accounts where code appears in requests entries with matching status. SQL:
SELECT amount FROM accounts AS acct WHERE code IN ( SELECT code FROM requests AS ordr WHERE ordr.status = acct.status );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "acct", "inner_alias": "ordr", "proj_col": "amount", "filter_col": "code", "join_col": "status", "correlated_ref": "acct.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07889
train
v2
Schema: tasks (alias: tsk)(status, level, date, amount) schedules(value, id, date, amount) Task: Retrieve salary from tasks that have at least one corresponding entry in schedules sharing the same level. SQL:
SELECT salary FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM schedules AS schd WHERE schd.level = tsk.level );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "tsk", "inner_alias": "schd", "proj_col": "salary", "join_col": "level", "correlated_ref": "tsk.level", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_07890
train
v2
Schema: items (alias: lne)(level, date, amount, name) invoices(id, date, level, value) Task: Retrieve name from items that have at least one corresponding entry in invoices sharing the same status. SQL:
SELECT name FROM items AS lne WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.status = lne.status );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "lne", "inner_alias": "inv", "proj_col": "name", "join_col": "status", "correlated_ref": "lne.status", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_07891
train
v3
Schema: accounts (alias: acct)(date, type, salary, code) staff(code, date, name, amount) Task: Retrieve amount from accounts with amount above the MIN(amount) of staff rows sharing the same code. SQL:
SELECT amount FROM accounts AS acct WHERE amount > ( SELECT MIN(amount) FROM staff AS empl WHERE empl.code = acct.code );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "acct", "inner_alias": "empl", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "acct.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07892
train
v2
Schema: shipments (alias: shp)(status, amount, date, salary) customers(name, id, amount, level) Task: Retrieve code from shipments that have at least one corresponding entry in customers sharing the same id. SQL:
SELECT code FROM shipments AS shp WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.id = shp.id );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "shp", "inner_alias": "cust", "proj_col": "code", "join_col": "id", "correlated_ref": "shp.id", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_07893
train
v2
Schema: transactions (alias: txn)(code, name, value, type) items(amount, type, name, salary) Task: Retrieve name from transactions that have at least one corresponding entry in items sharing the same type. SQL:
SELECT name FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM items AS lne WHERE lne.type = txn.type );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "txn", "inner_alias": "lne", "proj_col": "name", "join_col": "type", "correlated_ref": "txn.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07894
train
v1
Schema: orders (alias: ord)(name, level, code, salary) projects(amount, name, code, date) Task: Retrieve code from orders whose code is found in projects rows where type matches the outer record. SQL:
SELECT code FROM orders AS ord WHERE code IN ( SELECT code FROM projects AS prj WHERE prj.type = ord.type );
{ "outer_table": "orders", "inner_table": "projects", "outer_alias": "ord", "inner_alias": "prj", "proj_col": "code", "filter_col": "code", "join_col": "type", "correlated_ref": "ord.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07895
train
v3
Schema: managers (alias: mgr)(amount, name, salary, status) staff(value, status, date, id) Task: Find code from managers where value exceeds the count of value from staff for the same id. SQL:
SELECT code FROM managers AS mgr WHERE value > ( SELECT COUNT(value) FROM staff AS empl WHERE empl.id = mgr.id );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "mgr", "inner_alias": "empl", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "mgr.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07896
train
v1
Schema: sales (alias: sale)(type, status, value, date) products(level, value, name, salary) Task: Find salary from sales where status appears in products entries with matching level. SQL:
SELECT salary FROM sales AS sale WHERE status IN ( SELECT status FROM products AS prod WHERE prod.level = sale.level );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "sale", "inner_alias": "prod", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "sale.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07897
train
v1
Schema: managers (alias: mgr)(name, date, code, salary) projects(value, code, salary, id) Task: Select amount from managers where code exists in projects for the same code. SQL:
SELECT amount FROM managers AS mgr WHERE code IN ( SELECT code FROM projects AS prj WHERE prj.code = mgr.code );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "mgr", "inner_alias": "prj", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "mgr.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07898
train
v3
Schema: managers (alias: mgr)(value, salary, status, date) categories(date, level, salary, id) Task: Find code from managers where amount exceeds the count of salary from categories for the same code. SQL:
SELECT code FROM managers AS mgr WHERE amount > ( SELECT COUNT(salary) FROM categories AS catg WHERE catg.code = mgr.code );
{ "outer_table": "managers", "inner_table": "categories", "outer_alias": "mgr", "inner_alias": "catg", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "mgr.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_07899
train