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)(date, type, value, amount) transactions(code, name, date, value) Task: Retrieve salary from employees whose id is found in transactions rows where type matches the outer record. SQL:
SELECT salary FROM employees AS bev WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.type = bev.type );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "bev", "inner_alias": "gev", "proj_col": "salary", "filter_col": "id", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09300
train
v1
Schema: departments (alias: dov)(amount, date, type, value) items(name, code, id, amount) Task: Retrieve salary from departments whose status is found in items rows where type matches the outer record. SQL:
SELECT salary FROM departments AS dov WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.type = dov.type );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "status", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09301
train
v1
Schema: projects (alias: uliv)(salary, code, amount, date) schedules(id, salary, date, status) Task: Select code from projects where type exists in schedules for the same level. SQL:
SELECT code FROM projects AS uliv WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09302
train
v2
Schema: managers (alias: hac)(status, value, type, salary) requests(level, amount, value, date) Task: Find name from managers where a matching record exists in requests with the same level. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.level = hac.level );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "name", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09303
train
v3
Schema: orders (alias: kab)(value, code, status, date) branches(level, amount, name, code) Task: Retrieve id from orders with value above the COUNT(value) of branches rows sharing the same id. SQL:
SELECT id FROM orders AS kab WHERE value > ( SELECT COUNT(value) FROM branches AS agov WHERE agov.id = kab.id );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09304
train
v3
Schema: tasks (alias: znob)(value, type, name, status) shipments(amount, level, value, code) Task: Retrieve name from tasks with amount above the AVG(value) of shipments rows sharing the same id. SQL:
SELECT name FROM tasks AS znob WHERE amount > ( SELECT AVG(value) FROM shipments AS vnob WHERE vnob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09305
train
v3
Schema: managers (alias: hac)(salary, id, value, name) requests(value, salary, code, name) Task: Retrieve amount from managers with value above the MIN(salary) of requests rows sharing the same code. SQL:
SELECT amount FROM managers AS hac WHERE value > ( SELECT MIN(salary) FROM requests AS ejof WHERE ejof.code = hac.code );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09306
train
v2
Schema: schedules (alias: vmob)(name, level, salary, type) branches(status, amount, level, value) Task: Retrieve value from schedules that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT value FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "branches", "outer_alias": "vmob", "inner_alias": "agov", "proj_col": "value", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09307
train
v1
Schema: transactions (alias: gev)(value, date, code, id) categories(value, amount, code, name) Task: Find value from transactions where code appears in categories entries with matching status. SQL:
SELECT value FROM transactions AS gev WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.status = gev.status );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "value", "filter_col": "code", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09308
train
v1
Schema: shipments (alias: vnob)(date, name, status, level) managers(amount, type, level, status) Task: Find amount from shipments where id appears in managers entries with matching level. SQL:
SELECT amount FROM shipments AS vnob WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "amount", "filter_col": "id", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09309
train
v3
Schema: schedules (alias: vmob)(id, level, name, amount) managers(name, status, type, salary) Task: Retrieve salary from schedules with salary above the SUM(amount) of managers rows sharing the same status. SQL:
SELECT salary FROM schedules AS vmob WHERE salary > ( SELECT SUM(amount) FROM managers AS hac WHERE hac.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09310
train
v2
Schema: transactions (alias: gev)(id, amount, name, type) branches(amount, salary, id, value) Task: Find name from transactions where a matching record exists in branches with the same code. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = gev.code );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "gev", "inner_alias": "agov", "proj_col": "name", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09311
train
v3
Schema: managers (alias: hac)(salary, type, value, amount) items(name, salary, code, amount) Task: Retrieve id from managers with amount above the COUNT(salary) of items rows sharing the same level. SQL:
SELECT id FROM managers AS hac WHERE amount > ( SELECT COUNT(salary) FROM items AS ikob WHERE ikob.level = hac.level );
{ "outer_table": "managers", "inner_table": "items", "outer_alias": "hac", "inner_alias": "ikob", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09312
train
v1
Schema: regions (alias: okiv)(type, status, value, date) tasks(id, type, value, salary) Task: Retrieve code from regions whose id is found in tasks rows where type matches the outer record. SQL:
SELECT code FROM regions AS okiv WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.type = okiv.type );
{ "outer_table": "regions", "inner_table": "tasks", "outer_alias": "okiv", "inner_alias": "znob", "proj_col": "code", "filter_col": "id", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09313
train
v2
Schema: tasks (alias: znob)(value, id, salary, status) shipments(level, amount, status, value) Task: Retrieve value from tasks that have at least one corresponding entry in shipments sharing the same level. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.level = znob.level );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "value", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09314
train
v2
Schema: shipments (alias: vnob)(amount, level, date, value) branches(value, salary, date, amount) Task: Find value from shipments where a matching record exists in branches with the same status. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "branches", "outer_alias": "vnob", "inner_alias": "agov", "proj_col": "value", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09315
train
v2
Schema: orders (alias: kab)(value, id, name, salary) invoices(date, id, value, type) Task: Find amount from orders where a matching record exists in invoices with the same id. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = kab.id );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "kab", "inner_alias": "fal", "proj_col": "amount", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09316
train
v1
Schema: requests (alias: ejof)(id, status, code, type) shipments(date, code, status, level) Task: Select code from requests where status exists in shipments for the same type. SQL:
SELECT code FROM requests AS ejof WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.type = ejof.type );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ejof", "inner_alias": "vnob", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09317
train
v2
Schema: tasks (alias: znob)(date, value, code, level) transactions(type, id, salary, name) Task: Retrieve amount from tasks that have at least one corresponding entry in transactions sharing the same id. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = znob.id );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "amount", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09318
train
v2
Schema: departments (alias: dov)(amount, salary, date, id) requests(name, level, type, salary) Task: Retrieve value from departments that have at least one corresponding entry in requests sharing the same status. SQL:
SELECT value FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = dov.status );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "value", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09319
train
v1
Schema: branches (alias: agov)(status, level, name, salary) orders(date, code, value, status) Task: Find code from branches where status appears in orders entries with matching id. SQL:
SELECT code FROM branches AS agov WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.id = agov.id );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "code", "filter_col": "status", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09320
train
v1
Schema: items (alias: ikob)(amount, salary, date, name) customers(amount, level, name, type) Task: Retrieve salary from items whose type is found in customers rows where id matches the outer record. SQL:
SELECT salary FROM items AS ikob WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.id = ikob.id );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "salary", "filter_col": "type", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09321
train
v2
Schema: sales (alias: cif)(amount, date, type, code) invoices(salary, level, code, type) Task: Retrieve code from sales that have at least one corresponding entry in invoices sharing the same id. SQL:
SELECT code FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = cif.id );
{ "outer_table": "sales", "inner_table": "invoices", "outer_alias": "cif", "inner_alias": "fal", "proj_col": "code", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09322
train
v1
Schema: managers (alias: hac)(name, status, level, amount) departments(date, name, code, amount) Task: Retrieve name from managers whose id is found in departments rows where id matches the outer record. SQL:
SELECT name FROM managers AS hac WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.id = hac.id );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09323
train
v1
Schema: sales (alias: cif)(type, value, id, amount) products(code, date, level, salary) Task: Find name from sales where code appears in products entries with matching status. SQL:
SELECT name FROM sales AS cif WHERE code IN ( SELECT code FROM products AS nad WHERE nad.status = cif.status );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09324
train
v2
Schema: branches (alias: agov)(salary, amount, level, value) regions(value, date, id, code) Task: Retrieve id from branches that have at least one corresponding entry in regions sharing the same status. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = agov.status );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "id", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09325
train
v1
Schema: tasks (alias: znob)(code, type, status, date) categories(date, value, type, amount) Task: Retrieve value from tasks whose code is found in categories rows where type matches the outer record. SQL:
SELECT value FROM tasks AS znob WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.type = znob.type );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09326
train
v3
Schema: departments (alias: dov)(value, id, date, amount) accounts(code, name, date, value) Task: Retrieve code from departments with value above the MIN(amount) of accounts rows sharing the same level. SQL:
SELECT code FROM departments AS dov WHERE value > ( SELECT MIN(amount) FROM accounts AS jac WHERE jac.level = dov.level );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09327
train
v2
Schema: branches (alias: agov)(status, level, name, id) schedules(type, status, code, date) Task: Find id from branches where a matching record exists in schedules with the same status. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = agov.status );
{ "outer_table": "branches", "inner_table": "schedules", "outer_alias": "agov", "inner_alias": "vmob", "proj_col": "id", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09328
train
v3
Schema: transactions (alias: gev)(code, status, value, amount) managers(name, amount, value, id) Task: Retrieve value from transactions with salary above the SUM(value) of managers rows sharing the same level. SQL:
SELECT value FROM transactions AS gev WHERE salary > ( SELECT SUM(value) FROM managers AS hac WHERE hac.level = gev.level );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "gev", "inner_alias": "hac", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09329
train
v3
Schema: customers (alias: lex)(amount, code, date, status) schedules(date, level, value, amount) Task: Retrieve salary from customers with amount above the MAX(salary) of schedules rows sharing the same id. SQL:
SELECT salary FROM customers AS lex WHERE amount > ( SELECT MAX(salary) 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": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09330
train
v2
Schema: regions (alias: okiv)(code, value, salary, name) transactions(value, id, amount, name) Task: Find value from regions where a matching record exists in transactions with the same level. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = okiv.level );
{ "outer_table": "regions", "inner_table": "transactions", "outer_alias": "okiv", "inner_alias": "gev", "proj_col": "value", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09331
train
v2
Schema: staff (alias: xnob)(level, status, date, id) accounts(code, id, name, type) Task: Find value from staff where a matching record exists in accounts with the same code. SQL:
SELECT value FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = xnob.code );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "value", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09332
train
v2
Schema: tasks (alias: znob)(value, id, name, date) regions(salary, date, id, status) Task: Retrieve id from tasks that have at least one corresponding entry in regions sharing the same type. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = znob.type );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "id", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09333
train
v1
Schema: transactions (alias: gev)(salary, name, amount, type) shipments(name, amount, date, level) Task: Select id from transactions where type exists in shipments for the same type. SQL:
SELECT id FROM transactions AS gev WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.type = gev.type );
{ "outer_table": "transactions", "inner_table": "shipments", "outer_alias": "gev", "inner_alias": "vnob", "proj_col": "id", "filter_col": "type", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09334
train
v2
Schema: transactions (alias: gev)(salary, date, id, level) items(status, type, date, amount) Task: Find code from transactions where a matching record exists in items with the same status. SQL:
SELECT code FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = gev.status );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "gev", "inner_alias": "ikob", "proj_col": "code", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09335
train
v1
Schema: customers (alias: lex)(name, level, value, id) sales(amount, salary, level, code) Task: Find code from customers where type appears in sales entries with matching level. SQL:
SELECT code FROM customers AS lex WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.level = lex.level );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09336
train
v1
Schema: sales (alias: cif)(salary, id, name, level) orders(name, level, salary, id) Task: Select amount from sales where type exists in orders for the same id. SQL:
SELECT amount FROM sales AS cif WHERE type IN ( SELECT type FROM orders AS kab WHERE kab.id = cif.id );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09337
train
v1
Schema: employees (alias: bev)(type, level, name, salary) staff(code, value, date, type) Task: Find id from employees where level appears in staff entries with matching type. SQL:
SELECT id FROM employees AS bev WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.type = bev.type );
{ "outer_table": "employees", "inner_table": "staff", "outer_alias": "bev", "inner_alias": "xnob", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09338
train
v2
Schema: items (alias: ikob)(date, value, amount, name) departments(salary, id, amount, level) Task: Find id from items where a matching record exists in departments with the same status. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = ikob.status );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "ikob", "inner_alias": "dov", "proj_col": "id", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09339
train
v1
Schema: tasks (alias: znob)(value, code, status, level) regions(date, name, status, code) Task: Retrieve name from tasks whose status is found in regions rows where type matches the outer record. SQL:
SELECT name FROM tasks AS znob WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.type = znob.type );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09340
train
v1
Schema: shipments (alias: vnob)(type, date, amount, status) projects(date, amount, salary, level) Task: Find name from shipments where level appears in projects entries with matching id. SQL:
SELECT name FROM shipments AS vnob WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "projects", "outer_alias": "vnob", "inner_alias": "uliv", "proj_col": "name", "filter_col": "level", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09341
train
v1
Schema: employees (alias: bev)(level, amount, id, date) transactions(code, date, status, level) Task: Find name from employees where id appears in transactions entries with matching level. SQL:
SELECT name FROM employees AS bev WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.level = bev.level );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "bev", "inner_alias": "gev", "proj_col": "name", "filter_col": "id", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09342
train
v3
Schema: regions (alias: okiv)(status, amount, value, level) orders(level, status, amount, salary) Task: Find salary from regions where salary exceeds the maximum value from orders for the same id. SQL:
SELECT salary FROM regions AS okiv WHERE salary > ( SELECT MAX(value) FROM orders AS kab WHERE kab.id = okiv.id );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09343
train
v3
Schema: orders (alias: kab)(value, level, name, status) invoices(status, level, amount, date) Task: Find name from orders where amount exceeds the average salary from invoices for the same type. SQL:
SELECT name FROM orders AS kab WHERE amount > ( SELECT AVG(salary) FROM invoices AS fal WHERE fal.type = kab.type );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "kab", "inner_alias": "fal", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09344
train
v2
Schema: products (alias: nad)(status, level, id, value) categories(type, salary, code, amount) Task: Retrieve code from products that have at least one corresponding entry in categories sharing the same code. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = nad.code );
{ "outer_table": "products", "inner_table": "categories", "outer_alias": "nad", "inner_alias": "egiv", "proj_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09345
train
v1
Schema: orders (alias: kab)(status, name, salary, type) departments(type, date, amount, code) Task: Select id from orders where level exists in departments for the same status. SQL:
SELECT id FROM orders AS kab WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.status = kab.status );
{ "outer_table": "orders", "inner_table": "departments", "outer_alias": "kab", "inner_alias": "dov", "proj_col": "id", "filter_col": "level", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09346
train
v1
Schema: products (alias: nad)(name, type, level, value) staff(amount, status, date, id) Task: Retrieve value from products whose status is found in staff rows where type matches the outer record. SQL:
SELECT value FROM products AS nad WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.type = nad.type );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "value", "filter_col": "status", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09347
train
v3
Schema: schedules (alias: vmob)(id, date, name, code) products(status, amount, id, date) Task: Find salary from schedules where salary exceeds the count of amount from products for the same code. SQL:
SELECT salary FROM schedules AS vmob WHERE salary > ( SELECT COUNT(amount) FROM products AS nad WHERE nad.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09348
train
v3
Schema: products (alias: nad)(salary, amount, status, level) invoices(id, type, value, amount) Task: Find id from products where amount exceeds the average amount from invoices for the same level. SQL:
SELECT id FROM products AS nad WHERE amount > ( SELECT AVG(amount) FROM invoices AS fal WHERE fal.level = nad.level );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09349
train
v1
Schema: products (alias: nad)(status, salary, amount, name) shipments(code, type, status, salary) Task: Retrieve id from products whose type is found in shipments rows where id matches the outer record. SQL:
SELECT id FROM products AS nad WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.id = nad.id );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "id", "filter_col": "type", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09350
train
v2
Schema: accounts (alias: jac)(code, salary, level, amount) transactions(type, value, date, id) Task: Retrieve salary from accounts that have at least one corresponding entry in transactions sharing the same type. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = jac.type );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "jac", "inner_alias": "gev", "proj_col": "salary", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09351
train
v1
Schema: categories (alias: egiv)(date, level, status, salary) branches(code, amount, level, status) Task: Retrieve name from categories whose type is found in branches rows where status matches the outer record. SQL:
SELECT name FROM categories AS egiv WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.status = egiv.status );
{ "outer_table": "categories", "inner_table": "branches", "outer_alias": "egiv", "inner_alias": "agov", "proj_col": "name", "filter_col": "type", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09352
train
v2
Schema: invoices (alias: fal)(id, amount, status, code) requests(date, id, type, code) Task: Find id from invoices where a matching record exists in requests with the same code. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = fal.code );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "id", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09353
train
v2
Schema: schedules (alias: vmob)(salary, id, date, level) projects(level, amount, value, code) Task: Retrieve value from schedules that have at least one corresponding entry in projects sharing the same type. SQL:
SELECT value FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "value", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09354
train
v2
Schema: sales (alias: cif)(amount, salary, name, type) shipments(id, name, code, status) Task: Find code from sales where a matching record exists in shipments with the same type. SQL:
SELECT code FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = cif.type );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "code", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09355
train
v2
Schema: categories (alias: egiv)(amount, level, code, id) departments(status, type, code, salary) Task: Retrieve value from categories that have at least one corresponding entry in departments sharing the same status. SQL:
SELECT value FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = egiv.status );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "value", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09356
train
v3
Schema: accounts (alias: jac)(amount, date, name, status) customers(code, level, date, id) Task: Find value from accounts where amount exceeds the average amount from customers for the same type. SQL:
SELECT value FROM accounts AS jac WHERE amount > ( 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": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09357
train
v2
Schema: staff (alias: xnob)(level, amount, salary, code) transactions(status, id, amount, level) Task: Retrieve name from staff that have at least one corresponding entry in transactions sharing the same type. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = xnob.type );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "xnob", "inner_alias": "gev", "proj_col": "name", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09358
train
v1
Schema: projects (alias: uliv)(level, amount, date, value) categories(value, id, type, salary) Task: Retrieve code from projects whose code is found in categories rows where type matches the outer record. SQL:
SELECT code FROM projects AS uliv WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.type = uliv.type );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "code", "filter_col": "code", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09359
train
v1
Schema: departments (alias: dov)(status, name, amount, code) regions(id, status, date, value) Task: Find name from departments where status appears in regions entries with matching id. SQL:
SELECT name FROM departments AS dov WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.id = dov.id );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dov", "inner_alias": "okiv", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09360
train
v2
Schema: products (alias: nad)(salary, type, id, name) customers(id, level, date, amount) Task: Retrieve name from products that have at least one corresponding entry in customers sharing the same id. SQL:
SELECT name FROM products AS nad WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = nad.id );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "name", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09361
train
v1
Schema: shipments (alias: vnob)(type, date, value, amount) products(date, amount, salary, status) Task: Select salary from shipments where code exists in products for the same type. SQL:
SELECT salary FROM shipments AS vnob WHERE code IN ( SELECT code FROM products AS nad WHERE nad.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "salary", "filter_col": "code", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09362
train
v3
Schema: shipments (alias: vnob)(level, value, name, id) sales(id, date, status, amount) Task: Find name from shipments where amount exceeds the average value from sales for the same type. SQL:
SELECT name FROM shipments AS vnob WHERE amount > ( SELECT AVG(value) FROM sales AS cif WHERE cif.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09363
train
v2
Schema: products (alias: nad)(status, salary, name, id) projects(id, amount, value, status) Task: Retrieve name from products that have at least one corresponding entry in projects sharing the same type. SQL:
SELECT name FROM products AS nad WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = nad.type );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "name", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09364
train
v2
Schema: transactions (alias: gev)(code, date, value, id) employees(value, amount, id, name) Task: Find id from transactions where a matching record exists in employees with the same id. SQL:
SELECT id FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = gev.id );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "gev", "inner_alias": "bev", "proj_col": "id", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09365
train
v3
Schema: shipments (alias: vnob)(date, code, name, id) branches(salary, value, status, id) Task: Retrieve code from shipments with value above the SUM(value) of branches rows sharing the same type. SQL:
SELECT code FROM shipments AS vnob WHERE value > ( SELECT SUM(value) FROM branches AS agov WHERE agov.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "branches", "outer_alias": "vnob", "inner_alias": "agov", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09366
train
v3
Schema: invoices (alias: fal)(amount, code, value, id) customers(id, value, type, salary) Task: Find id from invoices where salary exceeds the maximum value from customers for the same level. SQL:
SELECT id FROM invoices AS fal WHERE salary > ( SELECT MAX(value) FROM customers AS lex WHERE lex.level = fal.level );
{ "outer_table": "invoices", "inner_table": "customers", "outer_alias": "fal", "inner_alias": "lex", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09367
train
v3
Schema: accounts (alias: jac)(value, code, level, amount) categories(type, value, id, salary) Task: Find code from accounts where salary exceeds the maximum salary from categories for the same status. SQL:
SELECT code FROM accounts AS jac WHERE salary > ( SELECT MAX(salary) FROM categories AS egiv WHERE egiv.status = jac.status );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "jac", "inner_alias": "egiv", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09368
train
v2
Schema: branches (alias: agov)(salary, amount, value, level) tasks(salary, status, level, value) Task: Find code from branches where a matching record exists in tasks with the same id. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = agov.id );
{ "outer_table": "branches", "inner_table": "tasks", "outer_alias": "agov", "inner_alias": "znob", "proj_col": "code", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09369
train
v1
Schema: customers (alias: lex)(name, id, salary, code) employees(date, id, type, code) Task: Select code from customers where id exists in employees for the same code. SQL:
SELECT code FROM customers AS lex WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.code = lex.code );
{ "outer_table": "customers", "inner_table": "employees", "outer_alias": "lex", "inner_alias": "bev", "proj_col": "code", "filter_col": "id", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09370
train
v3
Schema: regions (alias: okiv)(amount, type, status, code) customers(value, date, name, amount) Task: Retrieve code from regions with value above the COUNT(amount) of customers rows sharing the same id. SQL:
SELECT code FROM regions AS okiv WHERE value > ( SELECT COUNT(amount) FROM customers AS lex WHERE lex.id = okiv.id );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09371
train
v3
Schema: accounts (alias: jac)(status, amount, type, name) employees(amount, type, status, date) Task: Retrieve value from accounts with value above the MAX(amount) of employees rows sharing the same id. SQL:
SELECT value FROM accounts AS jac WHERE value > ( SELECT MAX(amount) FROM employees AS bev WHERE bev.id = jac.id );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09372
train
v2
Schema: products (alias: nad)(type, date, name, level) managers(salary, code, status, name) Task: Find name from products where a matching record exists in managers with the same id. SQL:
SELECT name FROM products AS nad WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = nad.id );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "nad", "inner_alias": "hac", "proj_col": "name", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09373
train
v3
Schema: orders (alias: kab)(value, name, code, amount) items(id, level, status, salary) Task: Find code from orders where value exceeds the count of salary from items for the same code. SQL:
SELECT code FROM orders AS kab WHERE value > ( SELECT COUNT(salary) FROM items AS ikob WHERE ikob.code = kab.code );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "kab", "inner_alias": "ikob", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09374
train
v2
Schema: tasks (alias: znob)(value, type, amount, name) accounts(code, salary, name, amount) Task: Retrieve id from tasks that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = znob.code );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "id", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09375
train
v1
Schema: sales (alias: cif)(date, id, level, status) transactions(name, code, status, type) Task: Find salary from sales where type appears in transactions entries with matching code. SQL:
SELECT salary FROM sales AS cif WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.code = cif.code );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09376
train
v3
Schema: categories (alias: egiv)(value, level, name, id) departments(status, level, value, name) Task: Find code from categories where value exceeds the average amount from departments for the same code. SQL:
SELECT code FROM categories AS egiv WHERE value > ( SELECT AVG(amount) FROM departments AS dov WHERE dov.code = egiv.code );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09377
train
v3
Schema: sales (alias: cif)(salary, code, date, level) customers(level, value, amount, date) Task: Retrieve salary from sales with amount above the SUM(value) of customers rows sharing the same code. SQL:
SELECT salary FROM sales AS cif WHERE amount > ( SELECT SUM(value) FROM customers AS lex WHERE lex.code = cif.code );
{ "outer_table": "sales", "inner_table": "customers", "outer_alias": "cif", "inner_alias": "lex", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09378
train
v2
Schema: accounts (alias: jac)(type, code, name, value) items(level, code, status, amount) Task: Retrieve salary from accounts that have at least one corresponding entry in items sharing the same level. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "salary", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09379
train
v2
Schema: customers (alias: lex)(type, amount, level, status) managers(id, level, value, amount) Task: Retrieve salary from customers that have at least one corresponding entry in managers sharing the same type. SQL:
SELECT salary FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = lex.type );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "salary", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09380
train
v3
Schema: customers (alias: lex)(id, date, name, code) schedules(salary, type, name, date) Task: Find value from customers where salary exceeds the average value from schedules for the same status. SQL:
SELECT value FROM customers AS lex WHERE salary > ( SELECT AVG(value) FROM schedules AS vmob WHERE vmob.status = lex.status );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09381
train
v2
Schema: customers (alias: lex)(date, salary, code, id) requests(salary, level, type, status) Task: Retrieve code from customers that have at least one corresponding entry in requests sharing the same status. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = lex.status );
{ "outer_table": "customers", "inner_table": "requests", "outer_alias": "lex", "inner_alias": "ejof", "proj_col": "code", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09382
train
v1
Schema: transactions (alias: gev)(value, amount, date, status) accounts(level, type, id, value) Task: Select salary from transactions where level exists in accounts for the same status. SQL:
SELECT salary FROM transactions AS gev WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.status = gev.status );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "gev", "inner_alias": "jac", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09383
train
v1
Schema: transactions (alias: gev)(level, id, code, amount) regions(salary, level, code, status) Task: Retrieve amount from transactions whose type is found in regions rows where type matches the outer record. SQL:
SELECT amount FROM transactions AS gev WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.type = gev.type );
{ "outer_table": "transactions", "inner_table": "regions", "outer_alias": "gev", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09384
train
v2
Schema: invoices (alias: fal)(code, date, id, value) regions(date, name, id, value) Task: Find name from invoices where a matching record exists in regions with the same type. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = fal.type );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "name", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09385
train
v1
Schema: staff (alias: xnob)(name, date, id, value) projects(amount, salary, type, id) Task: Retrieve salary from staff whose type is found in projects rows where level matches the outer record. SQL:
SELECT salary FROM staff AS xnob WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.level = xnob.level );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "xnob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "type", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09386
train
v1
Schema: departments (alias: dov)(code, type, value, name) employees(type, status, level, name) Task: Find value from departments where type appears in employees entries with matching id. SQL:
SELECT value FROM departments AS dov WHERE type IN ( SELECT type FROM employees AS bev WHERE bev.id = dov.id );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "value", "filter_col": "type", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09387
train
v3
Schema: categories (alias: egiv)(value, level, type, status) customers(id, amount, name, code) Task: Find salary from categories where value exceeds the average value from customers for the same level. SQL:
SELECT salary FROM categories AS egiv WHERE value > ( SELECT AVG(value) FROM customers AS lex WHERE lex.level = egiv.level );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09388
train
v1
Schema: categories (alias: egiv)(type, salary, value, id) schedules(value, level, type, name) Task: Find salary from categories where status appears in schedules entries with matching level. SQL:
SELECT salary FROM categories AS egiv WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.level = egiv.level );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "egiv", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09389
train
v2
Schema: managers (alias: hac)(code, name, id, value) sales(id, code, status, type) Task: Retrieve name from managers that have at least one corresponding entry in sales sharing the same level. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = hac.level );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "name", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09390
train
v1
Schema: orders (alias: kab)(salary, id, level, name) items(level, id, name, value) Task: Select value from orders where code exists in items for the same level. SQL:
SELECT value FROM orders AS kab WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.level = kab.level );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "kab", "inner_alias": "ikob", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09391
train
v2
Schema: departments (alias: dov)(level, date, name, value) schedules(name, id, code, level) Task: Find name from departments where a matching record exists in schedules with the same type. SQL:
SELECT name FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = dov.type );
{ "outer_table": "departments", "inner_table": "schedules", "outer_alias": "dov", "inner_alias": "vmob", "proj_col": "name", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09392
train
v2
Schema: managers (alias: hac)(status, level, name, amount) employees(code, date, type, name) Task: Find code from managers where a matching record exists in employees with the same status. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = hac.status );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "code", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09393
train
v2
Schema: items (alias: ikob)(status, code, type, value) branches(value, date, level, name) Task: Retrieve value from items that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = ikob.code );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "value", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09394
train
v3
Schema: branches (alias: agov)(amount, name, salary, code) invoices(amount, name, id, salary) Task: Retrieve name from branches with value above the AVG(amount) of invoices rows sharing the same level. SQL:
SELECT name FROM branches AS agov WHERE value > ( SELECT AVG(amount) FROM invoices AS fal WHERE fal.level = agov.level );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09395
train
v3
Schema: branches (alias: agov)(amount, status, code, level) requests(id, amount, name, salary) Task: Find salary from branches where value exceeds the average salary from requests for the same type. SQL:
SELECT salary FROM branches AS agov WHERE value > ( SELECT AVG(salary) FROM requests AS ejof WHERE ejof.type = agov.type );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "salary", "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_09396
train
v3
Schema: schedules (alias: vmob)(level, salary, name, id) customers(type, value, name, date) Task: Find salary from schedules where salary exceeds the count of value from customers for the same id. SQL:
SELECT salary FROM schedules AS vmob WHERE salary > ( SELECT COUNT(value) FROM customers AS lex WHERE lex.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "vmob", "inner_alias": "lex", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09397
train
v2
Schema: employees (alias: bev)(id, salary, code, amount) requests(date, salary, amount, code) Task: Retrieve amount from employees that have at least one corresponding entry in requests sharing the same id. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = bev.id );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "amount", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09398
train
v1
Schema: invoices (alias: fal)(id, type, level, code) employees(level, name, amount, id) Task: Select code from invoices where level exists in employees for the same status. SQL:
SELECT code FROM invoices AS fal WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.status = fal.status );
{ "outer_table": "invoices", "inner_table": "employees", "outer_alias": "fal", "inner_alias": "bev", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09399
train