variant
stringclasses
3 values
prompt
stringlengths
160
237
sql
stringlengths
102
141
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v1
Schema: orders (alias: ord)(value, id, amount, type) invoices(status, level, value, salary) Task: Retrieve salary from orders whose type is found in invoices rows where code matches the outer record. SQL:
SELECT salary FROM orders AS ord WHERE type IN ( SELECT type FROM invoices AS inv WHERE inv.code = ord.code );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "ord", "inner_alias": "inv", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "ord.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18700
train
v2
Schema: accounts (alias: acct)(name, type, value, code) projects(name, value, level, type) Task: Find code from accounts where a matching record exists in projects with the same level. SQL:
SELECT code FROM accounts AS acct WHERE EXISTS ( SELECT 1 FROM projects AS prj WHERE prj.level = acct.level );
{ "outer_table": "accounts", "inner_table": "projects", "outer_alias": "acct", "inner_alias": "prj", "proj_col": "code", "join_col": "level", "correlated_ref": "acct.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18701
train
v1
Schema: shipments (alias: shp)(status, code, salary, value) products(salary, status, id, value) Task: Select id from shipments where status exists in products for the same code. SQL:
SELECT id FROM shipments AS shp WHERE status IN ( SELECT status FROM products AS prod WHERE prod.code = shp.code );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "shp", "inner_alias": "prod", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "shp.code", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_18702
train
v3
Schema: invoices (alias: inv)(value, id, status, code) customers(date, status, salary, code) Task: Retrieve code from invoices with salary above the SUM(value) of customers rows sharing the same level. SQL:
SELECT code FROM invoices AS inv WHERE salary > ( SELECT SUM(value) FROM customers AS cust WHERE cust.level = inv.level );
{ "outer_table": "invoices", "inner_table": "customers", "outer_alias": "inv", "inner_alias": "cust", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "inv.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18703
train
v3
Schema: staff (alias: empl)(salary, type, level, id) customers(amount, type, id, level) Task: Find value from staff where value exceeds the count of salary from customers for the same code. SQL:
SELECT value FROM staff AS empl WHERE value > ( SELECT COUNT(salary) FROM customers AS cust WHERE cust.code = empl.code );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "empl", "inner_alias": "cust", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "empl.code", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_18704
train
v3
Schema: categories (alias: catg)(status, level, name, date) transactions(status, date, code, salary) Task: Find id from categories where value exceeds the count of amount from transactions for the same status. SQL:
SELECT id FROM categories AS catg WHERE value > ( SELECT COUNT(amount) FROM transactions AS txn WHERE txn.status = catg.status );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "catg", "inner_alias": "txn", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "catg.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_18705
train
v1
Schema: customers (alias: cust)(amount, level, id, type) employees(status, code, value, name) Task: Retrieve name from customers whose level is found in employees rows where status matches the outer record. SQL:
SELECT name FROM customers AS cust WHERE level IN ( SELECT level FROM employees AS emp WHERE emp.status = cust.status );
{ "outer_table": "customers", "inner_table": "employees", "outer_alias": "cust", "inner_alias": "emp", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18706
train
v2
Schema: departments (alias: dept)(type, salary, id, name) sales(id, date, name, value) Task: Find code from departments where a matching record exists in sales with the same code. SQL:
SELECT code FROM departments AS dept WHERE EXISTS ( SELECT 1 FROM sales AS sale WHERE sale.code = dept.code );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dept", "inner_alias": "sale", "proj_col": "code", "join_col": "code", "correlated_ref": "dept.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18707
train
v2
Schema: projects (alias: prj)(date, level, code, type) customers(value, date, salary, amount) Task: Retrieve code from projects that have at least one corresponding entry in customers sharing the same level. SQL:
SELECT code FROM projects AS prj WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.level = prj.level );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "prj", "inner_alias": "cust", "proj_col": "code", "join_col": "level", "correlated_ref": "prj.level", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_18708
train
v2
Schema: managers (alias: mgr)(value, type, date, id) branches(type, code, level, id) Task: Retrieve code from managers that have at least one corresponding entry in branches sharing the same status. SQL:
SELECT code FROM managers AS mgr WHERE EXISTS ( SELECT 1 FROM branches AS brc WHERE brc.status = mgr.status );
{ "outer_table": "managers", "inner_table": "branches", "outer_alias": "mgr", "inner_alias": "brc", "proj_col": "code", "join_col": "status", "correlated_ref": "mgr.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18709
train
v1
Schema: employees (alias: emp)(status, value, name, level) managers(id, salary, name, date) Task: Find salary from employees where level appears in managers entries with matching code. SQL:
SELECT salary FROM employees AS emp WHERE level IN ( SELECT level FROM managers AS mgr WHERE mgr.code = emp.code );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "emp", "inner_alias": "mgr", "proj_col": "salary", "filter_col": "level", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18710
train
v1
Schema: products (alias: prod)(amount, code, status, id) branches(date, amount, id, salary) Task: Select id from products where code exists in branches for the same level. SQL:
SELECT id FROM products AS prod WHERE code IN ( SELECT code FROM branches AS brc WHERE brc.level = prod.level );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "prod", "inner_alias": "brc", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "prod.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18711
train
v1
Schema: accounts (alias: acct)(id, code, value, amount) employees(level, date, status, name) Task: Select id from accounts where status exists in employees for the same type. SQL:
SELECT id FROM accounts AS acct WHERE status IN ( SELECT status FROM employees AS emp WHERE emp.type = acct.type );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "acct", "inner_alias": "emp", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "acct.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18712
train
v2
Schema: items (alias: lne)(value, type, status, date) accounts(type, value, id, date) Task: Find name from items where a matching record exists in accounts with the same code. SQL:
SELECT name FROM items AS lne WHERE EXISTS ( SELECT 1 FROM accounts AS acct WHERE acct.code = lne.code );
{ "outer_table": "items", "inner_table": "accounts", "outer_alias": "lne", "inner_alias": "acct", "proj_col": "name", "join_col": "code", "correlated_ref": "lne.code", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_18713
train
v3
Schema: requests (alias: ordr)(salary, date, code, amount) departments(value, status, id, type) Task: Find value from requests where salary exceeds the maximum amount from departments for the same level. SQL:
SELECT value FROM requests AS ordr WHERE salary > ( SELECT MAX(amount) FROM departments AS dept WHERE dept.level = ordr.level );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ordr", "inner_alias": "dept", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "ordr.level", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_18714
train
v1
Schema: items (alias: lne)(type, amount, id, level) schedules(level, code, status, name) Task: Retrieve value from items whose id is found in schedules rows where code matches the outer record. SQL:
SELECT value FROM items AS lne WHERE id IN ( SELECT id FROM schedules AS schd WHERE schd.code = lne.code );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "lne", "inner_alias": "schd", "proj_col": "value", "filter_col": "id", "join_col": "code", "correlated_ref": "lne.code", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_18715
train
v2
Schema: customers (alias: cust)(date, id, type, amount) invoices(level, type, value, name) Task: Retrieve salary from customers that have at least one corresponding entry in invoices sharing the same status. SQL:
SELECT salary FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.status = cust.status );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "cust", "inner_alias": "inv", "proj_col": "salary", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18716
train
v1
Schema: projects (alias: prj)(salary, level, amount, id) departments(level, salary, value, id) Task: Retrieve salary from projects whose type is found in departments rows where status matches the outer record. SQL:
SELECT salary FROM projects AS prj WHERE type IN ( SELECT type FROM departments AS dept WHERE dept.status = prj.status );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "prj", "inner_alias": "dept", "proj_col": "salary", "filter_col": "type", "join_col": "status", "correlated_ref": "prj.status", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_18717
train
v2
Schema: staff (alias: empl)(salary, date, id, level) requests(name, date, level, id) Task: Find salary from staff where a matching record exists in requests with the same level. SQL:
SELECT salary FROM staff AS empl WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.level = empl.level );
{ "outer_table": "staff", "inner_table": "requests", "outer_alias": "empl", "inner_alias": "ordr", "proj_col": "salary", "join_col": "level", "correlated_ref": "empl.level", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_18718
train
v2
Schema: transactions (alias: txn)(status, level, name, id) shipments(type, level, value, code) Task: Retrieve name from transactions that have at least one corresponding entry in shipments sharing the same id. SQL:
SELECT name FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM shipments AS shp WHERE shp.id = txn.id );
{ "outer_table": "transactions", "inner_table": "shipments", "outer_alias": "txn", "inner_alias": "shp", "proj_col": "name", "join_col": "id", "correlated_ref": "txn.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18719
train
v1
Schema: requests (alias: ordr)(value, date, amount, salary) tasks(value, salary, type, status) Task: Find salary from requests where type appears in tasks entries with matching level. SQL:
SELECT salary FROM requests AS ordr WHERE type IN ( SELECT type FROM tasks AS tsk WHERE tsk.level = ordr.level );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ordr", "inner_alias": "tsk", "proj_col": "salary", "filter_col": "type", "join_col": "level", "correlated_ref": "ordr.level", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_18720
train
v2
Schema: accounts (alias: acct)(code, status, date, type) requests(salary, id, status, value) Task: Find amount from accounts where a matching record exists in requests with the same level. SQL:
SELECT amount FROM accounts AS acct WHERE EXISTS ( SELECT 1 FROM requests AS ordr WHERE ordr.level = acct.level );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "acct", "inner_alias": "ordr", "proj_col": "amount", "join_col": "level", "correlated_ref": "acct.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18721
train
v2
Schema: invoices (alias: inv)(id, value, date, salary) branches(code, name, status, date) Task: Retrieve amount from invoices that have at least one corresponding entry in branches sharing the same status. SQL:
SELECT amount FROM invoices AS inv WHERE EXISTS ( SELECT 1 FROM branches AS brc WHERE brc.status = inv.status );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "inv", "inner_alias": "brc", "proj_col": "amount", "join_col": "status", "correlated_ref": "inv.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18722
train
v3
Schema: employees (alias: emp)(status, value, code, salary) items(value, name, status, level) Task: Find amount from employees where amount exceeds the count of salary from items for the same id. SQL:
SELECT amount FROM employees AS emp WHERE amount > ( SELECT COUNT(salary) FROM items AS lne WHERE lne.id = emp.id );
{ "outer_table": "employees", "inner_table": "items", "outer_alias": "emp", "inner_alias": "lne", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "emp.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18723
train
v1
Schema: products (alias: prod)(id, code, salary, status) categories(type, value, amount, id) Task: Select amount from products where status exists in categories for the same level. SQL:
SELECT amount FROM products AS prod WHERE status IN ( SELECT status FROM categories AS catg WHERE catg.level = prod.level );
{ "outer_table": "products", "inner_table": "categories", "outer_alias": "prod", "inner_alias": "catg", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "prod.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18724
train
v3
Schema: customers (alias: cust)(id, code, name, status) projects(status, code, type, name) Task: Retrieve name from customers with salary above the SUM(amount) of projects rows sharing the same status. SQL:
SELECT name FROM customers AS cust WHERE salary > ( SELECT SUM(amount) FROM projects AS prj WHERE prj.status = cust.status );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "cust", "inner_alias": "prj", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18725
train
v3
Schema: departments (alias: dept)(amount, status, name, id) tasks(amount, type, salary, level) Task: Find code from departments where value exceeds the minimum salary from tasks for the same type. SQL:
SELECT code FROM departments AS dept WHERE value > ( SELECT MIN(salary) FROM tasks AS tsk WHERE tsk.type = dept.type );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dept", "inner_alias": "tsk", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "dept.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18726
train
v2
Schema: tasks (alias: tsk)(status, amount, type, name) employees(id, name, code, date) Task: Retrieve amount from tasks that have at least one corresponding entry in employees sharing the same code. SQL:
SELECT amount FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.code = tsk.code );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "tsk", "inner_alias": "emp", "proj_col": "amount", "join_col": "code", "correlated_ref": "tsk.code", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_18727
train
v1
Schema: accounts (alias: acct)(type, status, name, amount) categories(code, name, value, level) Task: Find amount from accounts where type appears in categories entries with matching code. SQL:
SELECT amount FROM accounts AS acct WHERE type IN ( SELECT type FROM categories AS catg WHERE catg.code = acct.code );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "acct", "inner_alias": "catg", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "acct.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18728
train
v1
Schema: managers (alias: mgr)(code, salary, status, name) orders(code, amount, id, salary) Task: Select amount from managers where status exists in orders for the same status. SQL:
SELECT amount FROM managers AS mgr WHERE status IN ( SELECT status FROM orders AS ord WHERE ord.status = mgr.status );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "mgr", "inner_alias": "ord", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "mgr.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18729
train
v2
Schema: branches (alias: brc)(amount, level, value, id) staff(date, id, salary, level) Task: Retrieve amount from branches that have at least one corresponding entry in staff sharing the same id. SQL:
SELECT amount FROM branches AS brc WHERE EXISTS ( SELECT 1 FROM staff AS empl WHERE empl.id = brc.id );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "brc", "inner_alias": "empl", "proj_col": "amount", "join_col": "id", "correlated_ref": "brc.id", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_18730
train
v2
Schema: categories (alias: catg)(id, code, type, value) items(amount, id, code, status) Task: Find amount from categories where a matching record exists in items with the same type. SQL:
SELECT amount FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM items AS lne WHERE lne.type = catg.type );
{ "outer_table": "categories", "inner_table": "items", "outer_alias": "catg", "inner_alias": "lne", "proj_col": "amount", "join_col": "type", "correlated_ref": "catg.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_18731
train
v3
Schema: sales (alias: sale)(salary, value, level, code) schedules(type, amount, name, code) Task: Retrieve name from sales with value above the MAX(amount) of schedules rows sharing the same level. SQL:
SELECT name FROM sales AS sale WHERE value > ( SELECT MAX(amount) FROM schedules AS schd WHERE schd.level = sale.level );
{ "outer_table": "sales", "inner_table": "schedules", "outer_alias": "sale", "inner_alias": "schd", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "sale.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18732
train
v3
Schema: transactions (alias: txn)(value, code, date, level) shipments(code, id, amount, status) Task: Find amount from transactions where value exceeds the minimum value from shipments for the same level. SQL:
SELECT amount FROM transactions AS txn WHERE value > ( SELECT MIN(value) FROM shipments AS shp WHERE shp.level = txn.level );
{ "outer_table": "transactions", "inner_table": "shipments", "outer_alias": "txn", "inner_alias": "shp", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "txn.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18733
train
v3
Schema: products (alias: prod)(date, salary, amount, value) schedules(amount, value, date, salary) Task: Find code from products where value exceeds the maximum value from schedules for the same status. SQL:
SELECT code FROM products AS prod WHERE value > ( SELECT MAX(value) FROM schedules AS schd WHERE schd.status = prod.status );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "prod", "inner_alias": "schd", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "prod.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18734
train
v1
Schema: requests (alias: ordr)(status, value, date, name) tasks(status, amount, level, code) Task: Find name from requests where status appears in tasks entries with matching status. SQL:
SELECT name FROM requests AS ordr WHERE status IN ( SELECT status FROM tasks AS tsk WHERE tsk.status = ordr.status );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ordr", "inner_alias": "tsk", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "ordr.status", "token_group": "T2", "fan_out": 95 }
T2
cs8_fixed_v4_train_18735
train
v2
Schema: categories (alias: catg)(date, amount, level, value) schedules(code, amount, salary, level) Task: Find amount from categories where a matching record exists in schedules with the same level. SQL:
SELECT amount FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM schedules AS schd WHERE schd.level = catg.level );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "catg", "inner_alias": "schd", "proj_col": "amount", "join_col": "level", "correlated_ref": "catg.level", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_18736
train
v1
Schema: departments (alias: dept)(level, value, type, code) staff(date, type, id, salary) Task: Select name from departments where level exists in staff for the same type. SQL:
SELECT name FROM departments AS dept WHERE level IN ( SELECT level FROM staff AS empl WHERE empl.type = dept.type );
{ "outer_table": "departments", "inner_table": "staff", "outer_alias": "dept", "inner_alias": "empl", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "dept.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18737
train
v1
Schema: staff (alias: empl)(status, code, value, amount) accounts(type, code, id, level) Task: Find id from staff where type appears in accounts entries with matching level. SQL:
SELECT id FROM staff AS empl WHERE type IN ( SELECT type FROM accounts AS acct WHERE acct.level = empl.level );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "empl", "inner_alias": "acct", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "empl.level", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_18738
train
v1
Schema: staff (alias: empl)(value, code, name, type) transactions(code, value, type, amount) Task: Select code from staff where id exists in transactions for the same type. SQL:
SELECT code FROM staff AS empl WHERE id IN ( SELECT id FROM transactions AS txn WHERE txn.type = empl.type );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "empl", "inner_alias": "txn", "proj_col": "code", "filter_col": "id", "join_col": "type", "correlated_ref": "empl.type", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_18739
train
v3
Schema: staff (alias: empl)(code, level, date, type) sales(status, id, name, level) Task: Find value from staff where amount exceeds the count of salary from sales for the same level. SQL:
SELECT value FROM staff AS empl WHERE amount > ( SELECT COUNT(salary) FROM sales AS sale WHERE sale.level = empl.level );
{ "outer_table": "staff", "inner_table": "sales", "outer_alias": "empl", "inner_alias": "sale", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "empl.level", "token_group": "T2", "fan_out": 110 }
T2
cs8_fixed_v4_train_18740
train
v3
Schema: tasks (alias: tsk)(status, date, code, level) transactions(name, amount, status, salary) Task: Retrieve name from tasks with amount above the MAX(value) of transactions rows sharing the same level. SQL:
SELECT name FROM tasks AS tsk WHERE amount > ( SELECT MAX(value) FROM transactions AS txn WHERE txn.level = tsk.level );
{ "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": "level", "correlated_ref": "tsk.level", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_18741
train
v3
Schema: projects (alias: prj)(id, date, salary, value) requests(level, code, amount, status) Task: Retrieve id from projects with salary above the MIN(value) of requests rows sharing the same id. SQL:
SELECT id FROM projects AS prj WHERE salary > ( SELECT MIN(value) FROM requests AS ordr WHERE ordr.id = prj.id );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "prj", "inner_alias": "ordr", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "prj.id", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_18742
train
v1
Schema: departments (alias: dept)(id, date, salary, code) shipments(date, id, salary, level) Task: Select code from departments where status exists in shipments for the same type. SQL:
SELECT code FROM departments AS dept WHERE status IN ( SELECT status FROM shipments AS shp WHERE shp.type = dept.type );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dept", "inner_alias": "shp", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "dept.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18743
train
v3
Schema: sales (alias: sale)(value, type, name, date) shipments(date, name, id, amount) Task: Retrieve salary from sales with salary above the COUNT(amount) of shipments rows sharing the same code. SQL:
SELECT salary FROM sales AS sale WHERE salary > ( SELECT COUNT(amount) FROM shipments AS shp WHERE shp.code = sale.code );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "sale", "inner_alias": "shp", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "sale.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18744
train
v2
Schema: tasks (alias: tsk)(name, level, code, amount) items(code, salary, id, type) Task: Retrieve amount from tasks that have at least one corresponding entry in items sharing the same level. SQL:
SELECT amount FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM items AS lne WHERE lne.level = tsk.level );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "tsk", "inner_alias": "lne", "proj_col": "amount", "join_col": "level", "correlated_ref": "tsk.level", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_18745
train
v1
Schema: employees (alias: emp)(salary, value, date, status) tasks(id, amount, level, date) Task: Select name from employees where type exists in tasks for the same code. SQL:
SELECT name FROM employees AS emp WHERE type IN ( SELECT type FROM tasks AS tsk WHERE tsk.code = emp.code );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "emp", "inner_alias": "tsk", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "emp.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18746
train
v3
Schema: schedules (alias: schd)(id, amount, type, name) employees(name, code, id, value) Task: Retrieve name from schedules with value above the MIN(value) of employees rows sharing the same id. SQL:
SELECT name FROM schedules AS schd WHERE value > ( SELECT MIN(value) FROM employees AS emp WHERE emp.id = schd.id );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "schd", "inner_alias": "emp", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "schd.id", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_18747
train
v3
Schema: items (alias: lne)(status, id, salary, code) sales(date, name, id, code) Task: Retrieve salary from items with amount above the COUNT(amount) of sales rows sharing the same level. SQL:
SELECT salary FROM items AS lne WHERE amount > ( SELECT COUNT(amount) FROM sales AS sale WHERE sale.level = lne.level );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "lne", "inner_alias": "sale", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "lne.level", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_18748
train
v1
Schema: tasks (alias: tsk)(salary, type, level, date) sales(name, status, id, date) Task: Select amount from tasks where status exists in sales for the same code. SQL:
SELECT amount FROM tasks AS tsk WHERE status IN ( SELECT status FROM sales AS sale WHERE sale.code = tsk.code );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "tsk", "inner_alias": "sale", "proj_col": "amount", "filter_col": "status", "join_col": "code", "correlated_ref": "tsk.code", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_18749
train
v2
Schema: shipments (alias: shp)(name, value, type, status) departments(amount, id, level, status) Task: Find amount from shipments where a matching record exists in departments with the same level. SQL:
SELECT amount FROM shipments AS shp WHERE EXISTS ( SELECT 1 FROM departments AS dept WHERE dept.level = shp.level );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "shp", "inner_alias": "dept", "proj_col": "amount", "join_col": "level", "correlated_ref": "shp.level", "token_group": "T2", "fan_out": 30 }
T2
cs8_fixed_v4_train_18750
train
v3
Schema: products (alias: prod)(date, value, type, level) projects(value, id, date, name) Task: Find code from products where amount exceeds the average value from projects for the same id. SQL:
SELECT code FROM products AS prod WHERE amount > ( SELECT AVG(value) FROM projects AS prj WHERE prj.id = prod.id );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "prod", "inner_alias": "prj", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "prod.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18751
train
v3
Schema: regions (alias: rgn)(id, code, level, value) requests(salary, level, name, type) Task: Retrieve value from regions with amount above the COUNT(value) of requests rows sharing the same id. SQL:
SELECT value FROM regions AS rgn WHERE amount > ( SELECT COUNT(value) FROM requests AS ordr WHERE ordr.id = rgn.id );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "rgn", "inner_alias": "ordr", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "rgn.id", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_18752
train
v2
Schema: projects (alias: prj)(type, value, status, level) invoices(level, code, type, value) Task: Find name from projects where a matching record exists in invoices with the same code. SQL:
SELECT name FROM projects AS prj WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.code = prj.code );
{ "outer_table": "projects", "inner_table": "invoices", "outer_alias": "prj", "inner_alias": "inv", "proj_col": "name", "join_col": "code", "correlated_ref": "prj.code", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_18753
train
v2
Schema: customers (alias: cust)(date, name, code, level) branches(amount, salary, value, date) Task: Find amount from customers where a matching record exists in branches with the same status. SQL:
SELECT amount 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": "amount", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18754
train
v2
Schema: orders (alias: ord)(type, level, salary, amount) transactions(salary, type, status, id) Task: Retrieve amount from orders that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT amount FROM orders AS ord WHERE EXISTS ( SELECT 1 FROM transactions AS txn WHERE txn.code = ord.code );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "ord", "inner_alias": "txn", "proj_col": "amount", "join_col": "code", "correlated_ref": "ord.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18755
train
v3
Schema: schedules (alias: schd)(id, code, name, amount) accounts(amount, type, id, level) Task: Retrieve name from schedules with salary above the MIN(salary) of accounts rows sharing the same type. SQL:
SELECT name FROM schedules AS schd WHERE salary > ( SELECT MIN(salary) FROM accounts AS acct WHERE acct.type = schd.type );
{ "outer_table": "schedules", "inner_table": "accounts", "outer_alias": "schd", "inner_alias": "acct", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "schd.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_18756
train
v1
Schema: tasks (alias: tsk)(date, status, salary, type) customers(name, salary, code, value) Task: Retrieve id from tasks whose type is found in customers rows where id matches the outer record. SQL:
SELECT id FROM tasks AS tsk WHERE type IN ( SELECT type FROM customers AS cust WHERE cust.id = tsk.id );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "tsk", "inner_alias": "cust", "proj_col": "id", "filter_col": "type", "join_col": "id", "correlated_ref": "tsk.id", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_18757
train
v3
Schema: items (alias: lne)(date, value, id, name) products(status, name, type, value) Task: Find value from items where salary exceeds the maximum value from products for the same level. SQL:
SELECT value FROM items AS lne WHERE salary > ( SELECT MAX(value) FROM products AS prod WHERE prod.level = lne.level );
{ "outer_table": "items", "inner_table": "products", "outer_alias": "lne", "inner_alias": "prod", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "lne.level", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_18758
train
v1
Schema: branches (alias: brc)(id, level, salary, type) orders(level, type, salary, date) Task: Retrieve id from branches whose status is found in orders rows where type matches the outer record. SQL:
SELECT id FROM branches AS brc WHERE status IN ( SELECT status FROM orders AS ord WHERE ord.type = brc.type );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "brc", "inner_alias": "ord", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "brc.type", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_18759
train
v3
Schema: items (alias: lne)(code, salary, amount, value) tasks(type, status, amount, code) Task: Find id from items where amount exceeds the total salary from tasks for the same level. SQL:
SELECT id FROM items AS lne WHERE amount > ( SELECT SUM(salary) FROM tasks AS tsk WHERE tsk.level = lne.level );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "lne", "inner_alias": "tsk", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "lne.level", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_18760
train
v2
Schema: tasks (alias: tsk)(salary, status, type, code) products(level, name, value, status) Task: Find name from tasks where a matching record exists in products with the same type. SQL:
SELECT name FROM tasks AS tsk WHERE EXISTS ( SELECT 1 FROM products AS prod WHERE prod.type = tsk.type );
{ "outer_table": "tasks", "inner_table": "products", "outer_alias": "tsk", "inner_alias": "prod", "proj_col": "name", "join_col": "type", "correlated_ref": "tsk.type", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_18761
train
v1
Schema: categories (alias: catg)(code, name, date, type) accounts(value, id, level, code) Task: Retrieve id from categories whose code is found in accounts rows where level matches the outer record. SQL:
SELECT id FROM categories AS catg WHERE code IN ( SELECT code FROM accounts AS acct WHERE acct.level = catg.level );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "catg", "inner_alias": "acct", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "catg.level", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_18762
train
v1
Schema: tasks (alias: tsk)(status, value, id, level) accounts(status, date, id, salary) Task: Retrieve id from tasks whose code is found in accounts rows where code matches the outer record. SQL:
SELECT id FROM tasks AS tsk WHERE code IN ( SELECT code FROM accounts AS acct WHERE acct.code = tsk.code );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "tsk", "inner_alias": "acct", "proj_col": "id", "filter_col": "code", "join_col": "code", "correlated_ref": "tsk.code", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_18763
train
v1
Schema: orders (alias: ord)(type, amount, date, name) accounts(id, name, type, salary) Task: Retrieve name from orders whose status is found in accounts rows where type matches the outer record. SQL:
SELECT name FROM orders AS ord WHERE status IN ( SELECT status FROM accounts AS acct WHERE acct.type = ord.type );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "ord", "inner_alias": "acct", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "ord.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18764
train
v3
Schema: tasks (alias: tsk)(id, date, amount, salary) projects(value, name, id, date) Task: Retrieve name from tasks with amount above the MIN(salary) of projects rows sharing the same level. SQL:
SELECT name FROM tasks AS tsk WHERE amount > ( SELECT MIN(salary) FROM projects AS prj WHERE prj.level = tsk.level );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "tsk", "inner_alias": "prj", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "tsk.level", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_18765
train
v1
Schema: branches (alias: brc)(level, id, code, amount) regions(code, amount, name, date) Task: Select code from branches where type exists in regions for the same status. SQL:
SELECT code FROM branches AS brc WHERE type IN ( SELECT type FROM regions AS rgn WHERE rgn.status = brc.status );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "brc", "inner_alias": "rgn", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "brc.status", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_18766
train
v2
Schema: transactions (alias: txn)(level, id, status, name) regions(status, value, salary, amount) Task: Find code from transactions where a matching record exists in regions with the same type. SQL:
SELECT code FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM regions AS rgn WHERE rgn.type = txn.type );
{ "outer_table": "transactions", "inner_table": "regions", "outer_alias": "txn", "inner_alias": "rgn", "proj_col": "code", "join_col": "type", "correlated_ref": "txn.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18767
train
v3
Schema: projects (alias: prj)(status, date, level, value) accounts(date, salary, id, type) Task: Retrieve amount from projects with value above the MIN(value) of accounts rows sharing the same level. SQL:
SELECT amount FROM projects AS prj WHERE value > ( SELECT MIN(value) FROM accounts AS acct WHERE acct.level = prj.level );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "prj", "inner_alias": "acct", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "prj.level", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_18768
train
v2
Schema: regions (alias: rgn)(value, code, status, amount) employees(salary, type, date, name) Task: Find name from regions where a matching record exists in employees with the same level. SQL:
SELECT name FROM regions AS rgn WHERE EXISTS ( SELECT 1 FROM employees AS emp WHERE emp.level = rgn.level );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "rgn", "inner_alias": "emp", "proj_col": "name", "join_col": "level", "correlated_ref": "rgn.level", "token_group": "T2", "fan_out": 1534 }
T2
cs8_fixed_v4_train_18769
train
v3
Schema: customers (alias: cust)(date, level, code, amount) sales(status, date, name, type) Task: Find name from customers where value exceeds the total salary from sales for the same status. SQL:
SELECT name FROM customers AS cust WHERE value > ( SELECT SUM(salary) FROM sales AS sale WHERE sale.status = cust.status );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "cust", "inner_alias": "sale", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "cust.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18770
train
v2
Schema: schedules (alias: schd)(salary, level, code, date) invoices(type, id, value, status) Task: Find id from schedules where a matching record exists in invoices with the same type. SQL:
SELECT id FROM schedules AS schd WHERE EXISTS ( SELECT 1 FROM invoices AS inv WHERE inv.type = schd.type );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "schd", "inner_alias": "inv", "proj_col": "id", "join_col": "type", "correlated_ref": "schd.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_18771
train
v3
Schema: categories (alias: catg)(date, status, id, amount) shipments(value, status, id, type) Task: Find code from categories where salary exceeds the average value from shipments for the same type. SQL:
SELECT code FROM categories AS catg WHERE salary > ( SELECT AVG(value) FROM shipments AS shp WHERE shp.type = catg.type );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "catg", "inner_alias": "shp", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "catg.type", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_18772
train
v1
Schema: employees (alias: emp)(salary, value, amount, id) staff(type, date, salary, name) Task: Select id from employees where status exists in staff for the same type. SQL:
SELECT id FROM employees AS emp WHERE status IN ( SELECT status FROM staff AS empl WHERE empl.type = emp.type );
{ "outer_table": "employees", "inner_table": "staff", "outer_alias": "emp", "inner_alias": "empl", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "emp.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18773
train
v3
Schema: projects (alias: prj)(status, amount, name, date) shipments(status, date, value, type) Task: Retrieve salary from projects with value above the MIN(salary) of shipments rows sharing the same status. SQL:
SELECT salary FROM projects AS prj WHERE value > ( SELECT MIN(salary) FROM shipments AS shp WHERE shp.status = prj.status );
{ "outer_table": "projects", "inner_table": "shipments", "outer_alias": "prj", "inner_alias": "shp", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "prj.status", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_18774
train
v2
Schema: invoices (alias: inv)(level, name, value, salary) regions(value, id, code, name) Task: Find code from invoices where a matching record exists in regions with the same code. SQL:
SELECT code FROM invoices AS inv WHERE EXISTS ( SELECT 1 FROM regions AS rgn WHERE rgn.code = inv.code );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "inv", "inner_alias": "rgn", "proj_col": "code", "join_col": "code", "correlated_ref": "inv.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18775
train
v3
Schema: accounts (alias: acct)(id, date, value, type) shipments(level, status, date, value) Task: Retrieve name from accounts with salary above the COUNT(salary) of shipments rows sharing the same level. SQL:
SELECT name FROM accounts AS acct WHERE salary > ( SELECT COUNT(salary) FROM shipments AS shp WHERE shp.level = acct.level );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "acct", "inner_alias": "shp", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "acct.level", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18776
train
v2
Schema: customers (alias: cust)(id, status, date, name) categories(id, date, amount, name) Task: Find id from customers where a matching record exists in categories with the same type. SQL:
SELECT id FROM customers AS cust WHERE EXISTS ( SELECT 1 FROM categories AS catg WHERE catg.type = cust.type );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "cust", "inner_alias": "catg", "proj_col": "id", "join_col": "type", "correlated_ref": "cust.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18777
train
v1
Schema: items (alias: lne)(type, level, value, amount) transactions(salary, level, date, status) Task: Select name from items where level exists in transactions for the same code. SQL:
SELECT name FROM items AS lne WHERE level IN ( SELECT level FROM transactions AS txn WHERE txn.code = lne.code );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "lne", "inner_alias": "txn", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "lne.code", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_18778
train
v3
Schema: managers (alias: mgr)(amount, id, level, salary) shipments(code, value, type, amount) Task: Find name from managers where salary exceeds the minimum value from shipments for the same id. SQL:
SELECT name FROM managers AS mgr WHERE salary > ( SELECT MIN(value) FROM shipments AS shp WHERE shp.id = mgr.id );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "mgr", "inner_alias": "shp", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "mgr.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18779
train
v2
Schema: categories (alias: catg)(level, amount, salary, date) customers(name, salary, status, id) Task: Retrieve value from categories that have at least one corresponding entry in customers sharing the same status. SQL:
SELECT value FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM customers AS cust WHERE cust.status = catg.status );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "catg", "inner_alias": "cust", "proj_col": "value", "join_col": "status", "correlated_ref": "catg.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_18780
train
v3
Schema: projects (alias: prj)(name, date, salary, value) accounts(code, date, level, id) Task: Find value from projects where value exceeds the count of amount from accounts for the same type. SQL:
SELECT value FROM projects AS prj WHERE value > ( SELECT COUNT(amount) FROM accounts AS acct WHERE acct.type = prj.type );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "prj", "inner_alias": "acct", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "prj.type", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_18781
train
v3
Schema: tasks (alias: tsk)(level, date, code, value) categories(id, status, name, level) Task: Retrieve code from tasks with salary above the MIN(amount) of categories rows sharing the same id. SQL:
SELECT code FROM tasks AS tsk WHERE salary > ( SELECT MIN(amount) FROM categories AS catg WHERE catg.id = tsk.id );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "tsk", "inner_alias": "catg", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "tsk.id", "token_group": "T2", "fan_out": 1586 }
T2
cs8_fixed_v4_train_18782
train
v3
Schema: branches (alias: brc)(type, status, code, name) items(id, value, date, level) Task: Retrieve code from branches with salary above the COUNT(amount) of items rows sharing the same level. SQL:
SELECT code FROM branches AS brc WHERE salary > ( SELECT COUNT(amount) FROM items AS lne WHERE lne.level = brc.level );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "brc", "inner_alias": "lne", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "brc.level", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_18783
train
v3
Schema: projects (alias: prj)(type, level, salary, date) transactions(amount, level, status, value) Task: Retrieve name from projects with value above the MIN(amount) of transactions rows sharing the same status. SQL:
SELECT name FROM projects AS prj WHERE value > ( SELECT MIN(amount) FROM transactions AS txn WHERE txn.status = prj.status );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "prj", "inner_alias": "txn", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "prj.status", "token_group": "T2", "fan_out": 712 }
T2
cs8_fixed_v4_train_18784
train
v3
Schema: managers (alias: mgr)(amount, date, id, level) products(salary, value, id, date) Task: Retrieve name from managers with amount above the AVG(salary) of products rows sharing the same code. SQL:
SELECT name FROM managers AS mgr WHERE amount > ( SELECT AVG(salary) FROM products AS prod WHERE prod.code = mgr.code );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "mgr", "inner_alias": "prod", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "mgr.code", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18785
train
v1
Schema: invoices (alias: inv)(amount, date, status, salary) requests(status, date, value, id) Task: Find id from invoices where level appears in requests entries with matching type. SQL:
SELECT id FROM invoices AS inv WHERE level IN ( SELECT level FROM requests AS ordr WHERE ordr.type = inv.type );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "inv", "inner_alias": "ordr", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "inv.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18786
train
v1
Schema: sales (alias: sale)(amount, date, code, salary) categories(salary, code, id, date) Task: Find id from sales where status appears in categories entries with matching status. SQL:
SELECT id FROM sales AS sale WHERE status IN ( SELECT status FROM categories AS catg WHERE catg.status = sale.status );
{ "outer_table": "sales", "inner_table": "categories", "outer_alias": "sale", "inner_alias": "catg", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "sale.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18787
train
v1
Schema: customers (alias: cust)(salary, amount, value, code) regions(value, date, level, amount) Task: Retrieve amount from customers whose id is found in regions rows where type matches the outer record. SQL:
SELECT amount FROM customers AS cust WHERE id IN ( SELECT id FROM regions AS rgn WHERE rgn.type = cust.type );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "cust", "inner_alias": "rgn", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "cust.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18788
train
v3
Schema: accounts (alias: acct)(status, name, type, value) sales(id, value, code, name) Task: Find name from accounts where salary exceeds the count of value from sales for the same status. SQL:
SELECT name FROM accounts AS acct WHERE salary > ( SELECT COUNT(value) FROM sales AS sale WHERE sale.status = acct.status );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "acct", "inner_alias": "sale", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "acct.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18789
train
v3
Schema: managers (alias: mgr)(value, type, amount, id) accounts(type, salary, status, code) Task: Retrieve value from managers with salary above the AVG(salary) of accounts rows sharing the same id. SQL:
SELECT value FROM managers AS mgr WHERE salary > ( SELECT AVG(salary) FROM accounts AS acct WHERE acct.id = mgr.id );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "mgr", "inner_alias": "acct", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "mgr.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18790
train
v3
Schema: employees (alias: emp)(id, amount, name, value) accounts(salary, amount, level, name) Task: Retrieve salary from employees with amount above the MIN(value) of accounts rows sharing the same status. SQL:
SELECT salary FROM employees AS emp WHERE amount > ( SELECT MIN(value) FROM accounts AS acct WHERE acct.status = emp.status );
{ "outer_table": "employees", "inner_table": "accounts", "outer_alias": "emp", "inner_alias": "acct", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "emp.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18791
train
v1
Schema: branches (alias: brc)(code, value, level, name) projects(status, value, amount, code) Task: Find amount from branches where id appears in projects entries with matching level. SQL:
SELECT amount FROM branches AS brc WHERE id IN ( SELECT id FROM projects AS prj WHERE prj.level = brc.level );
{ "outer_table": "branches", "inner_table": "projects", "outer_alias": "brc", "inner_alias": "prj", "proj_col": "amount", "filter_col": "id", "join_col": "level", "correlated_ref": "brc.level", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_18792
train
v1
Schema: schedules (alias: schd)(status, level, amount, value) departments(value, name, status, date) Task: Find name from schedules where level appears in departments entries with matching code. SQL:
SELECT name FROM schedules AS schd WHERE level IN ( SELECT level FROM departments AS dept WHERE dept.code = schd.code );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "schd", "inner_alias": "dept", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "schd.code", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_18793
train
v2
Schema: items (alias: lne)(level, amount, id, code) invoices(name, salary, code, id) Task: Find value from items where a matching record exists in invoices with the same type. SQL:
SELECT value 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": "value", "join_col": "type", "correlated_ref": "lne.type", "token_group": "T2", "fan_out": 883 }
T2
cs8_fixed_v4_train_18794
train
v2
Schema: categories (alias: catg)(salary, name, type, code) tasks(amount, id, status, code) Task: Retrieve salary from categories that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT salary FROM categories AS catg WHERE EXISTS ( SELECT 1 FROM tasks AS tsk WHERE tsk.status = catg.status );
{ "outer_table": "categories", "inner_table": "tasks", "outer_alias": "catg", "inner_alias": "tsk", "proj_col": "salary", "join_col": "status", "correlated_ref": "catg.status", "token_group": "T2", "fan_out": 36 }
T2
cs8_fixed_v4_train_18795
train
v3
Schema: branches (alias: brc)(value, code, type, amount) products(status, id, value, date) Task: Find name from branches where salary exceeds the minimum amount from products for the same status. SQL:
SELECT name FROM branches AS brc WHERE salary > ( SELECT MIN(amount) FROM products AS prod WHERE prod.status = brc.status );
{ "outer_table": "branches", "inner_table": "products", "outer_alias": "brc", "inner_alias": "prod", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "brc.status", "token_group": "T2", "fan_out": 1329 }
T2
cs8_fixed_v4_train_18796
train
v2
Schema: sales (alias: sale)(type, status, amount, level) products(level, salary, value, amount) Task: Retrieve amount from sales that have at least one corresponding entry in products sharing the same status. SQL:
SELECT amount FROM sales AS sale WHERE EXISTS ( SELECT 1 FROM products AS prod WHERE prod.status = sale.status );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "sale", "inner_alias": "prod", "proj_col": "amount", "join_col": "status", "correlated_ref": "sale.status", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18797
train
v2
Schema: transactions (alias: txn)(salary, name, level, type) managers(name, date, value, status) Task: Find name from transactions where a matching record exists in managers with the same id. SQL:
SELECT name FROM transactions AS txn WHERE EXISTS ( SELECT 1 FROM managers AS mgr WHERE mgr.id = txn.id );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "txn", "inner_alias": "mgr", "proj_col": "name", "join_col": "id", "correlated_ref": "txn.id", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18798
train
v2
Schema: sales (alias: sale)(value, salary, amount, date) departments(amount, date, value, id) Task: Retrieve name from sales that have at least one corresponding entry in departments sharing the same type. SQL:
SELECT name FROM sales AS sale WHERE EXISTS ( SELECT 1 FROM departments AS dept WHERE dept.type = sale.type );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "sale", "inner_alias": "dept", "proj_col": "name", "join_col": "type", "correlated_ref": "sale.type", "token_group": "T1", "fan_out": 1 }
T1
cs8_fixed_v4_train_18799
train