variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v1
Schema: employees (alias: bev)(name, code, id, level) tasks(name, status, code, level) Task: Select id from employees where level exists in tasks for the same type. SQL:
SELECT id FROM employees AS bev WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.type = bev.type );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10200
train
v1
Schema: departments (alias: dov)(id, value, type, name) categories(salary, type, code, status) Task: Select code from departments where status exists in categories for the same level. SQL:
SELECT code FROM departments AS dov WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.level = dov.level );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dov", "inner_alias": "egiv", "proj_col": "code", "filter_col": "status", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10201
train
v2
Schema: orders (alias: kab)(amount, value, date, name) customers(salary, name, date, id) Task: Find value from orders where a matching record exists in customers with the same status. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = kab.status );
{ "outer_table": "orders", "inner_table": "customers", "outer_alias": "kab", "inner_alias": "lex", "proj_col": "value", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10202
train
v1
Schema: invoices (alias: fal)(date, id, amount, type) shipments(value, name, type, date) Task: Select amount from invoices where id exists in shipments for the same id. SQL:
SELECT amount FROM invoices AS fal WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.id = fal.id );
{ "outer_table": "invoices", "inner_table": "shipments", "outer_alias": "fal", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "id", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10203
train
v2
Schema: items (alias: ikob)(code, level, id, value) tasks(value, date, id, code) Task: Retrieve id from items that have at least one corresponding entry in tasks sharing the same type. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = ikob.type );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "id", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10204
train
v3
Schema: regions (alias: okiv)(value, level, code, name) departments(level, date, amount, value) Task: Retrieve amount from regions with value above the MIN(value) of departments rows sharing the same type. SQL:
SELECT amount FROM regions AS okiv WHERE value > ( SELECT MIN(value) FROM departments AS dov WHERE dov.type = okiv.type );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "okiv", "inner_alias": "dov", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10205
train
v2
Schema: requests (alias: ejof)(id, code, type, name) sales(code, date, status, name) Task: Find id from requests where a matching record exists in sales with the same level. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = ejof.level );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "id", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10206
train
v3
Schema: schedules (alias: vmob)(salary, name, amount, status) tasks(date, value, salary, level) Task: Retrieve amount from schedules with salary above the MAX(value) of tasks rows sharing the same code. SQL:
SELECT amount FROM schedules AS vmob WHERE salary > ( SELECT MAX(value) FROM tasks AS znob WHERE znob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10207
train
v1
Schema: projects (alias: uliv)(status, value, salary, name) managers(date, type, name, code) Task: Select value from projects where status exists in managers for the same level. SQL:
SELECT value FROM projects AS uliv WHERE status IN ( SELECT status FROM managers AS hac WHERE hac.level = uliv.level );
{ "outer_table": "projects", "inner_table": "managers", "outer_alias": "uliv", "inner_alias": "hac", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10208
train
v1
Schema: branches (alias: agov)(date, amount, salary, name) products(code, type, salary, amount) Task: Retrieve code from branches whose level is found in products rows where type matches the outer record. SQL:
SELECT code FROM branches AS agov WHERE level IN ( SELECT level FROM products AS nad WHERE nad.type = agov.type );
{ "outer_table": "branches", "inner_table": "products", "outer_alias": "agov", "inner_alias": "nad", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10209
train
v2
Schema: projects (alias: uliv)(value, code, id, name) regions(id, name, level, salary) Task: Retrieve name from projects that have at least one corresponding entry in regions sharing the same code. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = uliv.code );
{ "outer_table": "projects", "inner_table": "regions", "outer_alias": "uliv", "inner_alias": "okiv", "proj_col": "name", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10210
train
v1
Schema: accounts (alias: jac)(salary, level, amount, name) staff(status, level, value, id) Task: Select amount from accounts where status exists in staff for the same type. SQL:
SELECT amount FROM accounts AS jac WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "jac", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10211
train
v1
Schema: sales (alias: cif)(value, level, status, type) requests(level, value, type, id) Task: Find amount from sales where id appears in requests entries with matching code. SQL:
SELECT amount FROM sales AS cif WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.code = cif.code );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10212
train
v2
Schema: customers (alias: lex)(salary, id, code, level) orders(level, id, value, date) Task: Retrieve value from customers that have at least one corresponding entry in orders sharing the same status. SQL:
SELECT value FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = lex.status );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "lex", "inner_alias": "kab", "proj_col": "value", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10213
train
v2
Schema: transactions (alias: gev)(code, date, status, name) employees(amount, date, status, type) Task: Retrieve id from transactions that have at least one corresponding entry in employees sharing the same level. SQL:
SELECT id FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = gev.level );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "gev", "inner_alias": "bev", "proj_col": "id", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10214
train
v2
Schema: items (alias: ikob)(value, salary, date, name) tasks(code, name, amount, id) Task: Retrieve id from items that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = ikob.status );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "id", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10215
train
v3
Schema: sales (alias: cif)(date, type, name, status) transactions(status, date, salary, amount) Task: Retrieve name from sales with salary above the MIN(value) of transactions rows sharing the same id. SQL:
SELECT name FROM sales AS cif WHERE salary > ( SELECT MIN(value) FROM transactions AS gev WHERE gev.id = cif.id );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10216
train
v1
Schema: projects (alias: uliv)(date, status, id, type) employees(name, amount, code, type) Task: Find name from projects where status appears in employees entries with matching id. SQL:
SELECT name FROM projects AS uliv WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.id = uliv.id );
{ "outer_table": "projects", "inner_table": "employees", "outer_alias": "uliv", "inner_alias": "bev", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10217
train
v3
Schema: staff (alias: xnob)(code, value, status, id) shipments(type, name, amount, level) Task: Retrieve amount from staff with amount above the COUNT(amount) of shipments rows sharing the same level. SQL:
SELECT amount FROM staff AS xnob WHERE amount > ( SELECT COUNT(amount) FROM shipments AS vnob WHERE vnob.level = xnob.level );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10218
train
v3
Schema: items (alias: ikob)(date, type, value, name) projects(name, salary, code, date) Task: Find value from items where value exceeds the total amount from projects for the same status. SQL:
SELECT value FROM items AS ikob WHERE value > ( SELECT SUM(amount) FROM projects AS uliv WHERE uliv.status = ikob.status );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10219
train
v1
Schema: customers (alias: lex)(id, level, status, value) schedules(date, salary, name, type) Task: Select salary from customers where code exists in schedules for the same id. SQL:
SELECT salary FROM customers AS lex WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.id = lex.id );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10220
train
v3
Schema: regions (alias: okiv)(status, id, salary, type) orders(salary, level, value, code) Task: Retrieve id from regions with salary above the SUM(amount) of orders rows sharing the same code. SQL:
SELECT id FROM regions AS okiv WHERE salary > ( SELECT SUM(amount) FROM orders AS kab WHERE kab.code = okiv.code );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10221
train
v2
Schema: sales (alias: cif)(type, salary, amount, value) requests(value, code, amount, name) Task: Retrieve salary from sales that have at least one corresponding entry in requests sharing the same status. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = cif.status );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "salary", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10222
train
v3
Schema: transactions (alias: gev)(code, id, type, level) staff(status, name, type, date) Task: Find salary from transactions where salary exceeds the total amount from staff for the same code. SQL:
SELECT salary FROM transactions AS gev WHERE salary > ( SELECT SUM(amount) FROM staff AS xnob WHERE xnob.code = gev.code );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10223
train
v2
Schema: employees (alias: bev)(value, status, name, date) invoices(salary, amount, name, level) Task: Retrieve code from employees that have at least one corresponding entry in invoices sharing the same type. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = bev.type );
{ "outer_table": "employees", "inner_table": "invoices", "outer_alias": "bev", "inner_alias": "fal", "proj_col": "code", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10224
train
v2
Schema: shipments (alias: vnob)(level, status, type, code) schedules(name, code, level, status) Task: Find value from shipments where a matching record exists in schedules with the same level. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "value", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10225
train
v2
Schema: managers (alias: hac)(date, name, type, id) projects(type, status, amount, value) Task: Find value from managers where a matching record exists in projects with the same id. SQL:
SELECT value FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.id = hac.id );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "hac", "inner_alias": "uliv", "proj_col": "value", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10226
train
v2
Schema: tasks (alias: znob)(code, name, level, value) staff(date, level, name, salary) Task: Retrieve salary from tasks that have at least one corresponding entry in staff sharing the same type. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.type = znob.type );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "salary", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10227
train
v3
Schema: tasks (alias: znob)(id, value, name, code) items(name, level, status, value) Task: Find amount from tasks where salary exceeds the minimum value from items for the same level. SQL:
SELECT amount FROM tasks AS znob WHERE salary > ( SELECT MIN(value) FROM items AS ikob WHERE ikob.level = znob.level );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10228
train
v2
Schema: invoices (alias: fal)(id, date, level, code) products(type, status, name, amount) Task: Find name from invoices where a matching record exists in products with the same type. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = fal.type );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "name", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10229
train
v1
Schema: schedules (alias: vmob)(type, level, status, date) categories(type, level, id, date) Task: Retrieve id from schedules whose code is found in categories rows where type matches the outer record. SQL:
SELECT id FROM schedules AS vmob WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10230
train
v1
Schema: transactions (alias: gev)(amount, date, level, type) products(id, date, level, status) Task: Select amount from transactions where id exists in products for the same code. SQL:
SELECT amount FROM transactions AS gev WHERE id IN ( SELECT id FROM products AS nad WHERE nad.code = gev.code );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10231
train
v3
Schema: branches (alias: agov)(id, amount, code, type) transactions(id, salary, name, amount) Task: Find value from branches where value exceeds the average salary from transactions for the same type. SQL:
SELECT value FROM branches AS agov WHERE value > ( SELECT AVG(salary) FROM transactions AS gev WHERE gev.type = agov.type );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10232
train
v1
Schema: managers (alias: hac)(status, code, name, type) departments(type, id, amount, salary) Task: Select amount from managers where status exists in departments for the same level. SQL:
SELECT amount FROM managers AS hac WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.level = hac.level );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10233
train
v2
Schema: transactions (alias: gev)(date, code, id, value) projects(code, type, amount, name) Task: Retrieve id from transactions that have at least one corresponding entry in projects sharing the same level. SQL:
SELECT id FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.level = gev.level );
{ "outer_table": "transactions", "inner_table": "projects", "outer_alias": "gev", "inner_alias": "uliv", "proj_col": "id", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10234
train
v3
Schema: schedules (alias: vmob)(date, code, type, name) departments(level, date, amount, id) Task: Retrieve code from schedules with salary above the AVG(value) of departments rows sharing the same status. SQL:
SELECT code FROM schedules AS vmob WHERE salary > ( SELECT AVG(value) FROM departments AS dov WHERE dov.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "vmob", "inner_alias": "dov", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10235
train
v1
Schema: employees (alias: bev)(level, value, id, name) categories(level, name, id, amount) Task: Select name from employees where status exists in categories for the same id. SQL:
SELECT name FROM employees AS bev WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.id = bev.id );
{ "outer_table": "employees", "inner_table": "categories", "outer_alias": "bev", "inner_alias": "egiv", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10236
train
v2
Schema: accounts (alias: jac)(type, salary, value, date) schedules(id, level, date, name) Task: Find value from accounts where a matching record exists in schedules with the same status. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "value", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10237
train
v2
Schema: orders (alias: kab)(type, name, date, salary) items(value, salary, name, code) Task: Find amount from orders where a matching record exists in items with the same type. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = kab.type );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "kab", "inner_alias": "ikob", "proj_col": "amount", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10238
train
v1
Schema: transactions (alias: gev)(value, id, date, code) sales(code, name, id, amount) Task: Retrieve value from transactions whose id is found in sales rows where id matches the outer record. SQL:
SELECT value FROM transactions AS gev WHERE id IN ( SELECT id FROM sales AS cif WHERE cif.id = gev.id );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "value", "filter_col": "id", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10239
train
v3
Schema: staff (alias: xnob)(value, level, code, type) departments(type, status, salary, level) Task: Retrieve amount from staff with amount above the SUM(amount) of departments rows sharing the same id. SQL:
SELECT amount FROM staff AS xnob WHERE amount > ( SELECT SUM(amount) FROM departments AS dov WHERE dov.id = xnob.id );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10240
train
v3
Schema: shipments (alias: vnob)(id, salary, type, value) staff(date, id, level, amount) Task: Retrieve name from shipments with value above the MAX(value) of staff rows sharing the same type. SQL:
SELECT name FROM shipments AS vnob WHERE value > ( SELECT MAX(value) FROM staff AS xnob WHERE xnob.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10241
train
v1
Schema: accounts (alias: jac)(amount, status, name, date) staff(level, code, name, value) Task: Find id from accounts where type appears in staff entries with matching level. SQL:
SELECT id FROM accounts AS jac WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "jac", "inner_alias": "xnob", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10242
train
v3
Schema: schedules (alias: vmob)(status, salary, name, amount) requests(id, code, date, value) Task: Retrieve id from schedules with amount above the AVG(salary) of requests rows sharing the same code. SQL:
SELECT id FROM schedules AS vmob WHERE amount > ( SELECT AVG(salary) FROM requests AS ejof WHERE ejof.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "requests", "outer_alias": "vmob", "inner_alias": "ejof", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10243
train
v1
Schema: projects (alias: uliv)(level, amount, type, status) customers(salary, name, level, amount) Task: Select amount from projects where status exists in customers for the same status. SQL:
SELECT amount FROM projects AS uliv WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.status = uliv.status );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "uliv", "inner_alias": "lex", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10244
train
v2
Schema: products (alias: nad)(salary, code, type, name) invoices(amount, id, date, salary) Task: Retrieve id from products that have at least one corresponding entry in invoices sharing the same status. SQL:
SELECT id FROM products AS nad WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.status = nad.status );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "id", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10245
train
v1
Schema: transactions (alias: gev)(code, value, level, amount) managers(type, level, id, code) Task: Find salary from transactions where type appears in managers entries with matching id. SQL:
SELECT salary FROM transactions AS gev WHERE type IN ( SELECT type FROM managers AS hac WHERE hac.id = gev.id );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "gev", "inner_alias": "hac", "proj_col": "salary", "filter_col": "type", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10246
train
v1
Schema: transactions (alias: gev)(value, date, name, type) items(salary, name, date, code) Task: Select code from transactions where level exists in items for the same status. SQL:
SELECT code FROM transactions AS gev WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.status = gev.status );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "gev", "inner_alias": "ikob", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10247
train
v3
Schema: employees (alias: bev)(salary, code, status, date) regions(value, code, name, salary) Task: Find code from employees where salary exceeds the minimum amount from regions for the same code. SQL:
SELECT code FROM employees AS bev WHERE salary > ( SELECT MIN(amount) FROM regions AS okiv WHERE okiv.code = bev.code );
{ "outer_table": "employees", "inner_table": "regions", "outer_alias": "bev", "inner_alias": "okiv", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10248
train
v2
Schema: employees (alias: bev)(amount, status, level, value) transactions(amount, value, type, date) Task: Retrieve name from employees that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = bev.code );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "bev", "inner_alias": "gev", "proj_col": "name", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10249
train
v2
Schema: branches (alias: agov)(date, type, amount, level) products(value, amount, date, level) Task: Retrieve name from branches that have at least one corresponding entry in products sharing the same id. SQL:
SELECT name FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.id = agov.id );
{ "outer_table": "branches", "inner_table": "products", "outer_alias": "agov", "inner_alias": "nad", "proj_col": "name", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10250
train
v2
Schema: shipments (alias: vnob)(amount, salary, status, code) regions(type, level, salary, code) Task: Find code from shipments where a matching record exists in regions with the same id. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "code", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10251
train
v1
Schema: managers (alias: hac)(status, amount, type, id) sales(date, code, amount, type) Task: Select salary from managers where code exists in sales for the same status. SQL:
SELECT salary FROM managers AS hac WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.status = hac.status );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10252
train
v2
Schema: tasks (alias: znob)(date, type, code, level) schedules(value, amount, status, id) Task: Find code from tasks where a matching record exists in schedules with the same type. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = znob.type );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "code", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10253
train
v3
Schema: branches (alias: agov)(date, salary, level, type) orders(type, name, date, value) Task: Find id from branches where salary exceeds the maximum value from orders for the same code. SQL:
SELECT id FROM branches AS agov WHERE salary > ( SELECT MAX(value) FROM orders AS kab WHERE kab.code = agov.code );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10254
train
v1
Schema: tasks (alias: znob)(salary, date, status, amount) transactions(id, amount, status, salary) Task: Retrieve id from tasks whose status is found in transactions rows where level matches the outer record. SQL:
SELECT id FROM tasks AS znob WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.level = znob.level );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "id", "filter_col": "status", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10255
train
v3
Schema: categories (alias: egiv)(date, status, id, value) schedules(name, value, type, level) Task: Retrieve code from categories with amount above the COUNT(salary) of schedules rows sharing the same status. SQL:
SELECT code FROM categories AS egiv WHERE amount > ( SELECT COUNT(salary) FROM schedules AS vmob WHERE vmob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "egiv", "inner_alias": "vmob", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10256
train
v1
Schema: staff (alias: xnob)(amount, status, date, type) schedules(id, date, level, type) Task: Find id from staff where status appears in schedules entries with matching code. SQL:
SELECT id FROM staff AS xnob WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.code = xnob.code );
{ "outer_table": "staff", "inner_table": "schedules", "outer_alias": "xnob", "inner_alias": "vmob", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10257
train
v1
Schema: transactions (alias: gev)(value, amount, date, code) staff(type, code, amount, date) Task: Find value from transactions where id appears in staff entries with matching id. SQL:
SELECT value FROM transactions AS gev WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "value", "filter_col": "id", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10258
train
v1
Schema: requests (alias: ejof)(date, code, value, level) tasks(status, value, amount, date) Task: Retrieve amount from requests whose id is found in tasks rows where id matches the outer record. SQL:
SELECT amount FROM requests AS ejof WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "amount", "filter_col": "id", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10259
train
v3
Schema: projects (alias: uliv)(name, amount, id, value) accounts(name, type, date, value) Task: Retrieve code from projects with amount above the SUM(salary) of accounts rows sharing the same status. SQL:
SELECT code FROM projects AS uliv WHERE amount > ( SELECT SUM(salary) FROM accounts AS jac WHERE jac.status = uliv.status );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10260
train
v3
Schema: regions (alias: okiv)(status, value, date, name) departments(value, date, amount, code) Task: Find name from regions where salary exceeds the count of salary from departments for the same code. SQL:
SELECT name FROM regions AS okiv WHERE salary > ( SELECT COUNT(salary) FROM departments AS dov WHERE dov.code = okiv.code );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "okiv", "inner_alias": "dov", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10261
train
v3
Schema: branches (alias: agov)(date, code, level, amount) requests(salary, amount, status, type) Task: Find amount from branches where value exceeds the average amount from requests for the same type. SQL:
SELECT amount FROM branches AS agov WHERE value > ( SELECT AVG(amount) FROM requests AS ejof WHERE ejof.type = agov.type );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10262
train
v2
Schema: items (alias: ikob)(type, name, value, id) orders(level, name, salary, id) Task: Retrieve id from items that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = ikob.type );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "id", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10263
train
v2
Schema: accounts (alias: jac)(salary, amount, date, value) schedules(date, value, type, level) Task: Retrieve value from accounts that have at least one corresponding entry in schedules sharing the same id. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.id = jac.id );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "value", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10264
train
v2
Schema: shipments (alias: vnob)(type, status, name, salary) orders(name, status, date, level) Task: Retrieve name from shipments that have at least one corresponding entry in orders sharing the same code. SQL:
SELECT name FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "name", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10265
train
v2
Schema: customers (alias: lex)(amount, name, code, date) shipments(date, level, salary, code) Task: Find name from customers where a matching record exists in shipments with the same status. SQL:
SELECT name FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.status = lex.status );
{ "outer_table": "customers", "inner_table": "shipments", "outer_alias": "lex", "inner_alias": "vnob", "proj_col": "name", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10266
train
v1
Schema: items (alias: ikob)(salary, id, name, status) shipments(name, id, status, value) Task: Select id from items where status exists in shipments for the same id. SQL:
SELECT id FROM items AS ikob WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.id = ikob.id );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10267
train
v1
Schema: branches (alias: agov)(value, id, level, name) employees(id, status, salary, date) Task: Retrieve salary from branches whose status is found in employees rows where level matches the outer record. SQL:
SELECT salary FROM branches AS agov WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.level = agov.level );
{ "outer_table": "branches", "inner_table": "employees", "outer_alias": "agov", "inner_alias": "bev", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10268
train
v3
Schema: items (alias: ikob)(status, level, salary, type) transactions(id, value, name, type) Task: Retrieve code from items with value above the MAX(salary) of transactions rows sharing the same id. SQL:
SELECT code FROM items AS ikob WHERE value > ( SELECT MAX(salary) FROM transactions AS gev WHERE gev.id = ikob.id );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "ikob", "inner_alias": "gev", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10269
train
v3
Schema: accounts (alias: jac)(code, amount, salary, date) customers(level, type, salary, name) Task: Retrieve id from accounts with salary above the AVG(amount) of customers rows sharing the same type. SQL:
SELECT id FROM accounts AS jac WHERE salary > ( SELECT AVG(amount) FROM customers AS lex WHERE lex.type = jac.type );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10270
train
v2
Schema: orders (alias: kab)(id, date, level, code) shipments(salary, type, name, id) Task: Retrieve id from orders that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT id FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = kab.code );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "id", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10271
train
v3
Schema: shipments (alias: vnob)(id, amount, type, code) staff(level, salary, date, id) Task: Find value from shipments where amount exceeds the total amount from staff for the same type. SQL:
SELECT value FROM shipments AS vnob WHERE amount > ( SELECT SUM(amount) FROM staff AS xnob WHERE xnob.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10272
train
v3
Schema: branches (alias: agov)(amount, type, date, level) requests(type, status, name, level) Task: Retrieve value from branches with salary above the SUM(salary) of requests rows sharing the same id. SQL:
SELECT value FROM branches AS agov WHERE salary > ( SELECT SUM(salary) FROM requests AS ejof WHERE ejof.id = agov.id );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10273
train
v3
Schema: departments (alias: dov)(code, value, type, level) regions(status, name, salary, date) Task: Retrieve code from departments with amount above the MIN(amount) of regions rows sharing the same level. SQL:
SELECT code FROM departments AS dov WHERE amount > ( SELECT MIN(amount) FROM regions AS okiv WHERE okiv.level = dov.level );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dov", "inner_alias": "okiv", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10274
train
v3
Schema: sales (alias: cif)(salary, level, value, id) invoices(amount, type, salary, value) Task: Find id from sales where amount exceeds the maximum amount from invoices for the same id. SQL:
SELECT id FROM sales AS cif WHERE amount > ( SELECT MAX(amount) FROM invoices AS fal WHERE fal.id = cif.id );
{ "outer_table": "sales", "inner_table": "invoices", "outer_alias": "cif", "inner_alias": "fal", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10275
train
v2
Schema: departments (alias: dov)(id, date, salary, status) projects(value, name, amount, salary) Task: Retrieve amount from departments that have at least one corresponding entry in projects sharing the same level. SQL:
SELECT amount FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.level = dov.level );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "amount", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10276
train
v2
Schema: categories (alias: egiv)(code, status, name, salary) customers(amount, type, level, date) Task: Retrieve amount from categories that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = egiv.type );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "amount", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10277
train
v1
Schema: orders (alias: kab)(date, salary, level, value) branches(code, value, status, level) Task: Select amount from orders where id exists in branches for the same type. SQL:
SELECT amount FROM orders AS kab WHERE id IN ( SELECT id FROM branches AS agov WHERE agov.type = kab.type );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10278
train
v1
Schema: transactions (alias: gev)(amount, value, salary, type) schedules(amount, date, type, value) Task: Select amount from transactions where type exists in schedules for the same id. SQL:
SELECT amount FROM transactions AS gev WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "schedules", "outer_alias": "gev", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10279
train
v2
Schema: accounts (alias: jac)(id, code, date, type) invoices(status, code, salary, id) Task: Retrieve id from accounts that have at least one corresponding entry in invoices sharing the same type. SQL:
SELECT id FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = jac.type );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "id", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10280
train
v3
Schema: products (alias: nad)(code, value, type, id) schedules(id, type, name, code) Task: Retrieve salary from products with amount above the MAX(salary) of schedules rows sharing the same type. SQL:
SELECT salary FROM products AS nad WHERE amount > ( SELECT MAX(salary) FROM schedules AS vmob WHERE vmob.type = nad.type );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10281
train
v1
Schema: regions (alias: okiv)(level, value, name, salary) shipments(type, id, status, date) Task: Retrieve salary from regions whose code is found in shipments rows where id matches the outer record. SQL:
SELECT salary FROM regions AS okiv WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.id = okiv.id );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "okiv", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10282
train
v1
Schema: shipments (alias: vnob)(salary, name, code, type) requests(id, level, date, salary) Task: Retrieve amount from shipments whose type is found in requests rows where type matches the outer record. SQL:
SELECT amount FROM shipments AS vnob WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "requests", "outer_alias": "vnob", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10283
train
v1
Schema: departments (alias: dov)(value, name, amount, level) orders(code, date, amount, level) Task: Select name from departments where level exists in orders for the same code. SQL:
SELECT name FROM departments AS dov WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.code = dov.code );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dov", "inner_alias": "kab", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10284
train
v2
Schema: regions (alias: okiv)(level, date, status, amount) branches(value, level, date, amount) Task: Find salary from regions where a matching record exists in branches with the same id. SQL:
SELECT salary FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = okiv.id );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "okiv", "inner_alias": "agov", "proj_col": "salary", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10285
train
v1
Schema: transactions (alias: gev)(date, status, amount, name) categories(level, type, date, code) Task: Select name from transactions where level exists in categories for the same status. SQL:
SELECT name FROM transactions AS gev WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.status = gev.status );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10286
train
v3
Schema: staff (alias: xnob)(value, status, amount, name) projects(salary, code, id, status) Task: Find value from staff where value exceeds the total amount from projects for the same type. SQL:
SELECT value FROM staff AS xnob WHERE value > ( SELECT SUM(amount) FROM projects AS uliv WHERE uliv.type = xnob.type );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "xnob", "inner_alias": "uliv", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10287
train
v3
Schema: schedules (alias: vmob)(status, salary, name, value) requests(code, id, level, name) Task: Retrieve value from schedules with salary above the SUM(amount) of requests rows sharing the same code. SQL:
SELECT value FROM schedules AS vmob WHERE salary > ( SELECT SUM(amount) FROM requests AS ejof WHERE ejof.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "requests", "outer_alias": "vmob", "inner_alias": "ejof", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10288
train
v1
Schema: transactions (alias: gev)(id, name, level, date) accounts(value, amount, id, date) Task: Select amount from transactions where level exists in accounts for the same id. SQL:
SELECT amount FROM transactions AS gev WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.id = gev.id );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "gev", "inner_alias": "jac", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10289
train
v1
Schema: requests (alias: ejof)(amount, date, level, status) staff(status, name, code, level) Task: Retrieve salary from requests whose type is found in staff rows where code matches the outer record. SQL:
SELECT salary FROM requests AS ejof WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ejof", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10290
train
v1
Schema: staff (alias: xnob)(value, date, salary, type) tasks(type, status, id, amount) Task: Find name from staff where type appears in tasks entries with matching status. SQL:
SELECT name FROM staff AS xnob WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "tasks", "outer_alias": "xnob", "inner_alias": "znob", "proj_col": "name", "filter_col": "type", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10291
train
v3
Schema: customers (alias: lex)(date, id, code, amount) projects(code, name, date, level) Task: Find code from customers where salary exceeds the average salary from projects for the same code. SQL:
SELECT code FROM customers AS lex WHERE salary > ( SELECT AVG(salary) FROM projects AS uliv WHERE uliv.code = lex.code );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10292
train
v1
Schema: departments (alias: dov)(name, status, amount, value) projects(date, id, code, amount) Task: Find code from departments where type appears in projects entries with matching status. SQL:
SELECT code FROM departments AS dov WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.status = dov.status );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10293
train
v2
Schema: customers (alias: lex)(type, date, name, id) orders(level, code, type, value) Task: Find id from customers where a matching record exists in orders with the same id. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = lex.id );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "lex", "inner_alias": "kab", "proj_col": "id", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10294
train
v2
Schema: requests (alias: ejof)(code, amount, level, date) shipments(date, level, value, status) Task: Find name from requests where a matching record exists in shipments with the same status. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ejof", "inner_alias": "vnob", "proj_col": "name", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10295
train
v3
Schema: sales (alias: cif)(salary, amount, type, name) products(id, salary, level, name) Task: Find code from sales where amount exceeds the minimum amount from products for the same status. SQL:
SELECT code FROM sales AS cif WHERE amount > ( SELECT MIN(amount) FROM products AS nad WHERE nad.status = cif.status );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10296
train
v1
Schema: transactions (alias: gev)(code, status, level, amount) departments(id, status, name, amount) Task: Select salary from transactions where level exists in departments for the same id. SQL:
SELECT salary FROM transactions AS gev WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.id = gev.id );
{ "outer_table": "transactions", "inner_table": "departments", "outer_alias": "gev", "inner_alias": "dov", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10297
train
v2
Schema: departments (alias: dov)(level, value, salary, id) accounts(date, code, value, status) Task: Find amount from departments where a matching record exists in accounts with the same type. SQL:
SELECT amount FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = dov.type );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "amount", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10298
train
v3
Schema: accounts (alias: jac)(date, amount, level, name) regions(status, salary, amount, type) Task: Find name from accounts where value exceeds the maximum value from regions for the same code. SQL:
SELECT name FROM accounts AS jac WHERE value > ( SELECT MAX(value) FROM regions AS okiv WHERE okiv.code = jac.code );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10299
train