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
v2
Schema: tasks (alias: znob)(date, type, id, status) shipments(type, name, date, code) Task: Retrieve id from tasks that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = znob.code );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "id", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02200
train
v3
Schema: schedules (alias: vmob)(salary, date, value, level) projects(code, salary, id, amount) Task: Retrieve id from schedules with value above the AVG(amount) of projects rows sharing the same level. SQL:
SELECT id FROM schedules AS vmob WHERE value > ( SELECT AVG(amount) FROM projects AS uliv WHERE uliv.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02201
train
v1
Schema: sales (alias: cif)(name, code, id, status) transactions(date, name, id, status) Task: Select code from sales where level exists in transactions for the same type. SQL:
SELECT code FROM sales AS cif WHERE level IN ( SELECT level FROM transactions AS gev WHERE gev.type = cif.type );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02202
train
v2
Schema: invoices (alias: fal)(value, amount, status, id) requests(value, amount, level, date) Task: Retrieve salary from invoices that have at least one corresponding entry in requests sharing the same id. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = fal.id );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "salary", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02203
train
v3
Schema: departments (alias: dov)(level, code, id, status) projects(level, type, id, date) Task: Find salary from departments where value exceeds the minimum value from projects for the same id. SQL:
SELECT salary FROM departments AS dov WHERE value > ( SELECT MIN(value) FROM projects AS uliv WHERE uliv.id = dov.id );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02204
train
v3
Schema: invoices (alias: fal)(amount, type, name, id) accounts(date, value, name, id) Task: Find code from invoices where salary exceeds the count of salary from accounts for the same code. SQL:
SELECT code FROM invoices AS fal WHERE salary > ( SELECT COUNT(salary) FROM accounts AS jac WHERE jac.code = fal.code );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02205
train
v2
Schema: tasks (alias: znob)(type, code, status, value) employees(id, level, salary, value) Task: Retrieve code from tasks that have at least one corresponding entry in employees sharing the same level. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = znob.level );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "code", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02206
train
v1
Schema: products (alias: nad)(date, id, salary, code) schedules(date, id, level, amount) Task: Find code from products where status appears in schedules entries with matching status. SQL:
SELECT code FROM products AS nad WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.status = nad.status );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02207
train
v1
Schema: shipments (alias: vnob)(id, value, level, name) customers(id, level, code, name) Task: Find name from shipments where type appears in customers entries with matching type. SQL:
SELECT name FROM shipments AS vnob WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "name", "filter_col": "type", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02208
train
v1
Schema: tasks (alias: znob)(type, value, level, code) sales(date, id, value, status) Task: Retrieve name from tasks whose type is found in sales rows where code matches the outer record. SQL:
SELECT name FROM tasks AS znob WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.code = znob.code );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "znob", "inner_alias": "cif", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02209
train
v2
Schema: managers (alias: hac)(name, status, code, date) shipments(name, amount, code, salary) Task: Find code from managers where a matching record exists in shipments with the same level. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.level = hac.level );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "hac", "inner_alias": "vnob", "proj_col": "code", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02210
train
v3
Schema: employees (alias: bev)(code, date, status, name) schedules(id, level, type, status) Task: Retrieve code from employees with amount above the AVG(amount) of schedules rows sharing the same type. SQL:
SELECT code FROM employees AS bev WHERE amount > ( SELECT AVG(amount) FROM schedules AS vmob WHERE vmob.type = bev.type );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02211
train
v3
Schema: branches (alias: agov)(level, date, value, name) tasks(salary, date, value, code) Task: Find name from branches where amount exceeds the maximum value from tasks for the same type. SQL:
SELECT name FROM branches AS agov WHERE amount > ( SELECT MAX(value) FROM tasks AS znob WHERE znob.type = agov.type );
{ "outer_table": "branches", "inner_table": "tasks", "outer_alias": "agov", "inner_alias": "znob", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02212
train
v1
Schema: categories (alias: egiv)(value, salary, amount, level) departments(salary, id, level, status) Task: Find name from categories where id appears in departments entries with matching type. SQL:
SELECT name FROM categories AS egiv WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.type = egiv.type );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "name", "filter_col": "id", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02213
train
v2
Schema: requests (alias: ejof)(id, salary, status, level) orders(date, status, value, level) Task: Retrieve name from requests that have at least one corresponding entry in orders sharing the same code. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.code = ejof.code );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "name", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02214
train
v2
Schema: shipments (alias: vnob)(salary, amount, name, status) invoices(id, salary, name, value) Task: Find amount from shipments where a matching record exists in invoices with the same level. SQL:
SELECT amount FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "vnob", "inner_alias": "fal", "proj_col": "amount", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02215
train
v3
Schema: staff (alias: xnob)(status, name, code, type) departments(id, amount, level, date) Task: Find amount from staff where value exceeds the maximum salary from departments for the same level. SQL:
SELECT amount FROM staff AS xnob WHERE value > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.level = xnob.level );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02216
train
v2
Schema: transactions (alias: gev)(name, amount, code, id) tasks(date, value, amount, status) Task: Retrieve salary from transactions that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "salary", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02217
train
v1
Schema: managers (alias: hac)(date, status, value, id) sales(status, type, date, name) Task: Find value from managers where type appears in sales entries with matching level. SQL:
SELECT value FROM managers AS hac WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.level = hac.level );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "value", "filter_col": "type", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02218
train
v2
Schema: requests (alias: ejof)(id, status, code, type) projects(name, level, status, value) Task: Retrieve value from requests that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT value FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "value", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02219
train
v3
Schema: shipments (alias: vnob)(id, date, status, salary) requests(type, id, salary, level) Task: Find id from shipments where value exceeds the maximum amount from requests for the same code. SQL:
SELECT id FROM shipments AS vnob WHERE value > ( SELECT MAX(amount) FROM requests AS ejof WHERE ejof.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "requests", "outer_alias": "vnob", "inner_alias": "ejof", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02220
train
v3
Schema: employees (alias: bev)(value, id, code, amount) orders(value, amount, code, level) Task: Find name from employees where value exceeds the minimum salary from orders for the same status. SQL:
SELECT name FROM employees AS bev WHERE value > ( SELECT MIN(salary) FROM orders AS kab WHERE kab.status = bev.status );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02221
train
v2
Schema: schedules (alias: vmob)(level, type, name, date) customers(value, level, salary, code) Task: Retrieve amount from schedules that have at least one corresponding entry in customers sharing the same code. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "vmob", "inner_alias": "lex", "proj_col": "amount", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02222
train
v1
Schema: items (alias: ikob)(level, salary, amount, name) transactions(date, salary, name, type) Task: Retrieve value from items whose code is found in transactions rows where status matches the outer record. SQL:
SELECT value FROM items AS ikob WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.status = ikob.status );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "ikob", "inner_alias": "gev", "proj_col": "value", "filter_col": "code", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02223
train
v2
Schema: products (alias: nad)(salary, amount, type, level) categories(salary, code, status, value) Task: Retrieve amount from products that have at least one corresponding entry in categories sharing the same code. SQL:
SELECT amount 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": "amount", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02224
train
v3
Schema: transactions (alias: gev)(type, salary, code, name) categories(status, type, id, date) Task: Retrieve value from transactions with salary above the AVG(amount) of categories rows sharing the same type. SQL:
SELECT value FROM transactions AS gev WHERE salary > ( SELECT AVG(amount) FROM categories AS egiv WHERE egiv.type = gev.type );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02225
train
v3
Schema: projects (alias: uliv)(code, value, name, salary) staff(value, salary, date, status) Task: Find salary from projects where salary exceeds the count of amount from staff for the same status. SQL:
SELECT salary FROM projects AS uliv WHERE salary > ( SELECT COUNT(amount) FROM staff AS xnob WHERE xnob.status = uliv.status );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02226
train
v2
Schema: regions (alias: okiv)(name, date, type, status) managers(status, level, value, amount) Task: Retrieve amount from regions that have at least one corresponding entry in managers sharing the same status. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = okiv.status );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "okiv", "inner_alias": "hac", "proj_col": "amount", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02227
train
v3
Schema: sales (alias: cif)(status, type, amount, code) orders(id, amount, level, value) Task: Find id from sales where amount exceeds the maximum value from orders for the same id. SQL:
SELECT id FROM sales AS cif WHERE amount > ( SELECT MAX(value) FROM orders AS kab WHERE kab.id = cif.id );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02228
train
v2
Schema: accounts (alias: jac)(date, id, salary, level) schedules(date, id, code, value) Task: Find id from accounts where a matching record exists in schedules with the same code. SQL:
SELECT id FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = jac.code );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "id", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02229
train
v1
Schema: shipments (alias: vnob)(salary, amount, name, level) employees(level, date, amount, value) Task: Retrieve code from shipments whose code is found in employees rows where id matches the outer record. SQL:
SELECT code FROM shipments AS vnob WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "code", "filter_col": "code", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02230
train
v1
Schema: products (alias: nad)(type, code, name, salary) schedules(id, code, status, type) Task: Retrieve salary from products whose status is found in schedules rows where type matches the outer record. SQL:
SELECT salary FROM products AS nad WHERE status IN ( SELECT status 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": "status", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02231
train
v2
Schema: transactions (alias: gev)(type, salary, value, id) schedules(id, date, value, type) Task: Find code from transactions where a matching record exists in schedules with the same level. SQL:
SELECT code FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "schedules", "outer_alias": "gev", "inner_alias": "vmob", "proj_col": "code", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02232
train
v3
Schema: staff (alias: xnob)(code, salary, name, level) projects(amount, date, salary, level) Task: Find amount from staff where value exceeds the maximum salary from projects for the same type. SQL:
SELECT amount FROM staff AS xnob WHERE value > ( SELECT MAX(salary) FROM projects AS uliv WHERE uliv.type = xnob.type );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "xnob", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02233
train
v2
Schema: categories (alias: egiv)(level, salary, id, name) sales(code, status, id, salary) Task: Retrieve code from categories that have at least one corresponding entry in sales sharing the same id. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = egiv.id );
{ "outer_table": "categories", "inner_table": "sales", "outer_alias": "egiv", "inner_alias": "cif", "proj_col": "code", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02234
train
v1
Schema: transactions (alias: gev)(level, salary, amount, value) schedules(type, value, date, amount) Task: Retrieve code from transactions whose code is found in schedules rows where id matches the outer record. SQL:
SELECT code FROM transactions AS gev WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "schedules", "outer_alias": "gev", "inner_alias": "vmob", "proj_col": "code", "filter_col": "code", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02235
train
v2
Schema: customers (alias: lex)(amount, name, salary, type) categories(salary, code, date, id) Task: Find id from customers where a matching record exists in categories with the same type. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = lex.type );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "id", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02236
train
v2
Schema: tasks (alias: znob)(name, type, amount, value) requests(type, id, code, salary) Task: Retrieve amount from tasks that have at least one corresponding entry in requests sharing the same id. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = znob.id );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "amount", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02237
train
v2
Schema: items (alias: ikob)(date, type, status, code) employees(date, name, code, salary) Task: Find salary from items where a matching record exists in employees with the same level. SQL:
SELECT salary FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = ikob.level );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "salary", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02238
train
v1
Schema: items (alias: ikob)(value, level, date, salary) projects(status, name, date, salary) Task: Select code from items where status exists in projects for the same status. SQL:
SELECT code FROM items AS ikob WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.status = ikob.status );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02239
train
v2
Schema: staff (alias: xnob)(value, status, level, code) transactions(date, level, value, code) Task: Retrieve salary from staff that have at least one corresponding entry in transactions sharing the same level. SQL:
SELECT salary FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = xnob.level );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "xnob", "inner_alias": "gev", "proj_col": "salary", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02240
train
v2
Schema: departments (alias: dov)(status, id, code, value) items(code, id, name, type) Task: Find id from departments where a matching record exists in items with the same type. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = dov.type );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "id", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02241
train
v2
Schema: sales (alias: cif)(level, code, salary, amount) managers(date, name, id, type) Task: Retrieve salary from sales that have at least one corresponding entry in managers sharing the same status. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = cif.status );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "cif", "inner_alias": "hac", "proj_col": "salary", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02242
train
v3
Schema: invoices (alias: fal)(date, code, amount, name) products(id, amount, level, status) Task: Find code from invoices where salary exceeds the total value from products for the same type. SQL:
SELECT code FROM invoices AS fal WHERE salary > ( SELECT SUM(value) FROM products AS nad WHERE nad.type = fal.type );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02243
train
v1
Schema: regions (alias: okiv)(status, salary, type, date) tasks(id, type, date, amount) Task: Select code from regions where id exists in tasks for the same status. SQL:
SELECT code FROM regions AS okiv WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.status = okiv.status );
{ "outer_table": "regions", "inner_table": "tasks", "outer_alias": "okiv", "inner_alias": "znob", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02244
train
v1
Schema: staff (alias: xnob)(salary, value, type, id) projects(name, type, id, code) Task: Find value from staff where level appears in projects entries with matching level. SQL:
SELECT value FROM staff AS xnob WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.level = xnob.level );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "xnob", "inner_alias": "uliv", "proj_col": "value", "filter_col": "level", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02245
train
v1
Schema: departments (alias: dov)(code, id, level, type) regions(status, value, amount, type) Task: Find code from departments where status appears in regions entries with matching id. SQL:
SELECT code 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": "code", "filter_col": "status", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02246
train
v1
Schema: staff (alias: xnob)(type, level, value, salary) accounts(level, amount, name, salary) Task: Retrieve id from staff whose type is found in accounts rows where status matches the outer record. SQL:
SELECT id FROM staff AS xnob WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.status = xnob.status );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02247
train
v2
Schema: tasks (alias: znob)(code, amount, value, name) requests(status, amount, code, id) Task: Find amount from tasks where a matching record exists in requests with the same level. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.level = znob.level );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "amount", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02248
train
v3
Schema: employees (alias: bev)(type, date, code, value) transactions(name, status, code, date) Task: Retrieve id from employees with salary above the MIN(value) of transactions rows sharing the same type. SQL:
SELECT id FROM employees AS bev WHERE salary > ( SELECT MIN(value) FROM transactions AS gev WHERE gev.type = bev.type );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "bev", "inner_alias": "gev", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02249
train
v1
Schema: transactions (alias: gev)(level, status, value, date) branches(amount, code, salary, value) Task: Select value from transactions where level exists in branches for the same type. SQL:
SELECT value FROM transactions AS gev WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.type = gev.type );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "gev", "inner_alias": "agov", "proj_col": "value", "filter_col": "level", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02250
train
v1
Schema: items (alias: ikob)(value, code, name, date) schedules(status, date, salary, id) Task: Find amount from items where code appears in schedules entries with matching level. SQL:
SELECT amount FROM items AS ikob WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.level = ikob.level );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "ikob", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "code", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02251
train
v2
Schema: items (alias: ikob)(level, amount, status, value) sales(amount, date, id, name) Task: Find name from items where a matching record exists in sales with the same status. SQL:
SELECT name FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = ikob.status );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "name", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02252
train
v3
Schema: projects (alias: uliv)(value, status, amount, level) accounts(type, code, salary, id) Task: Retrieve salary from projects with value above the MAX(value) of accounts rows sharing the same level. SQL:
SELECT salary FROM projects AS uliv WHERE value > ( SELECT MAX(value) FROM accounts AS jac WHERE jac.level = uliv.level );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02253
train
v1
Schema: schedules (alias: vmob)(status, level, salary, type) transactions(status, name, value, code) Task: Find name from schedules where id appears in transactions entries with matching status. SQL:
SELECT name FROM schedules AS vmob WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "transactions", "outer_alias": "vmob", "inner_alias": "gev", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02254
train
v3
Schema: accounts (alias: jac)(id, status, salary, date) schedules(id, amount, code, salary) Task: Find value from accounts where amount exceeds the average salary from schedules for the same type. SQL:
SELECT value FROM accounts AS jac WHERE amount > ( SELECT AVG(salary) FROM schedules AS vmob WHERE vmob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02255
train
v1
Schema: items (alias: ikob)(date, amount, salary, status) products(date, value, id, salary) Task: Retrieve name from items whose id is found in products rows where code matches the outer record. SQL:
SELECT name FROM items AS ikob WHERE id IN ( SELECT id FROM products AS nad WHERE nad.code = ikob.code );
{ "outer_table": "items", "inner_table": "products", "outer_alias": "ikob", "inner_alias": "nad", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02256
train
v2
Schema: customers (alias: lex)(level, id, amount, salary) sales(level, name, status, id) Task: Find name from customers where a matching record exists in sales with the same id. SQL:
SELECT name FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = lex.id );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "name", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02257
train
v2
Schema: orders (alias: kab)(id, value, status, name) branches(salary, amount, date, level) Task: Retrieve code from orders that have at least one corresponding entry in branches sharing the same id. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = kab.id );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "code", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02258
train
v3
Schema: customers (alias: lex)(id, salary, amount, code) products(id, salary, code, level) Task: Retrieve name from customers with salary above the SUM(salary) of products rows sharing the same type. SQL:
SELECT name FROM customers AS lex WHERE salary > ( SELECT SUM(salary) FROM products AS nad WHERE nad.type = lex.type );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02259
train
v2
Schema: schedules (alias: vmob)(value, id, code, salary) items(salary, code, name, amount) Task: Find name from schedules where a matching record exists in items with the same code. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "vmob", "inner_alias": "ikob", "proj_col": "name", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02260
train
v2
Schema: items (alias: ikob)(status, level, amount, salary) sales(date, amount, value, code) Task: Retrieve id from items that have at least one corresponding entry in sales sharing the same level. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = ikob.level );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "id", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02261
train
v3
Schema: accounts (alias: jac)(date, salary, value, level) products(name, salary, date, code) Task: Retrieve amount from accounts with salary above the COUNT(value) of products rows sharing the same type. SQL:
SELECT amount FROM accounts AS jac WHERE salary > ( SELECT COUNT(value) FROM products AS nad WHERE nad.type = jac.type );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "jac", "inner_alias": "nad", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02262
train
v1
Schema: accounts (alias: jac)(salary, type, value, date) shipments(level, status, name, amount) Task: Select amount from accounts where type exists in shipments for the same type. SQL:
SELECT amount FROM accounts AS jac WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02263
train
v1
Schema: departments (alias: dov)(status, type, name, value) branches(status, salary, value, level) Task: Find value from departments where status appears in branches entries with matching level. SQL:
SELECT value FROM departments AS dov WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.level = dov.level );
{ "outer_table": "departments", "inner_table": "branches", "outer_alias": "dov", "inner_alias": "agov", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02264
train
v3
Schema: invoices (alias: fal)(code, id, amount, level) branches(type, salary, name, value) Task: Find name from invoices where amount exceeds the minimum value from branches for the same status. SQL:
SELECT name FROM invoices AS fal WHERE amount > ( SELECT MIN(value) FROM branches AS agov WHERE agov.status = fal.status );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02265
train
v1
Schema: departments (alias: dov)(id, type, amount, name) sales(date, type, id, level) Task: Select value from departments where id exists in sales for the same level. SQL:
SELECT value FROM departments AS dov WHERE id IN ( SELECT id FROM sales AS cif WHERE cif.level = dov.level );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02266
train
v2
Schema: employees (alias: bev)(date, id, amount, name) regions(id, code, status, date) Task: Find code from employees where a matching record exists in regions with the same level. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = bev.level );
{ "outer_table": "employees", "inner_table": "regions", "outer_alias": "bev", "inner_alias": "okiv", "proj_col": "code", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02267
train
v3
Schema: shipments (alias: vnob)(id, salary, amount, type) branches(status, type, id, level) Task: Retrieve value from shipments with value above the MAX(value) of branches rows sharing the same code. SQL:
SELECT value FROM shipments AS vnob WHERE value > ( SELECT MAX(value) FROM branches AS agov WHERE agov.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "branches", "outer_alias": "vnob", "inner_alias": "agov", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02268
train
v3
Schema: sales (alias: cif)(type, status, name, code) managers(level, amount, date, value) Task: Retrieve amount from sales with value above the SUM(value) of managers rows sharing the same code. SQL:
SELECT amount FROM sales AS cif WHERE value > ( SELECT SUM(value) FROM managers AS hac WHERE hac.code = cif.code );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "cif", "inner_alias": "hac", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02269
train
v2
Schema: regions (alias: okiv)(id, date, code, salary) departments(level, salary, name, id) Task: Retrieve code from regions that have at least one corresponding entry in departments sharing the same level. SQL:
SELECT code FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = okiv.level );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "okiv", "inner_alias": "dov", "proj_col": "code", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02270
train
v2
Schema: branches (alias: agov)(salary, code, id, name) managers(code, salary, type, name) Task: Retrieve code from branches that have at least one corresponding entry in managers sharing the same id. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = agov.id );
{ "outer_table": "branches", "inner_table": "managers", "outer_alias": "agov", "inner_alias": "hac", "proj_col": "code", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02271
train
v3
Schema: invoices (alias: fal)(value, amount, code, type) products(value, type, date, code) Task: Find code from invoices where salary exceeds the count of value from products for the same type. SQL:
SELECT code FROM invoices AS fal WHERE salary > ( SELECT COUNT(value) FROM products AS nad WHERE nad.type = fal.type );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02272
train
v1
Schema: customers (alias: lex)(code, date, salary, type) invoices(level, salary, date, amount) Task: Retrieve amount from customers whose status is found in invoices rows where id matches the outer record. SQL:
SELECT amount FROM customers AS lex WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.id = lex.id );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "lex", "inner_alias": "fal", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02273
train
v2
Schema: regions (alias: okiv)(status, value, amount, code) sales(salary, code, id, value) Task: Find salary from regions where a matching record exists in sales with the same status. SQL:
SELECT salary FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = okiv.status );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "salary", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02274
train
v3
Schema: requests (alias: ejof)(salary, date, id, code) tasks(value, level, date, salary) Task: Find id from requests where value exceeds the minimum amount from tasks for the same level. SQL:
SELECT id FROM requests AS ejof WHERE value > ( SELECT MIN(amount) FROM tasks AS znob WHERE znob.level = ejof.level );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02275
train
v1
Schema: shipments (alias: vnob)(salary, id, code, amount) managers(status, name, date, id) Task: Select id from shipments where id exists in managers for the same id. SQL:
SELECT id FROM shipments AS vnob WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "id", "filter_col": "id", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02276
train
v1
Schema: invoices (alias: fal)(name, code, date, level) shipments(salary, code, date, name) Task: Find name from invoices where type appears in shipments entries with matching type. SQL:
SELECT name FROM invoices AS fal WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "shipments", "outer_alias": "fal", "inner_alias": "vnob", "proj_col": "name", "filter_col": "type", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02277
train
v3
Schema: employees (alias: bev)(date, type, status, level) tasks(level, name, salary, id) Task: Retrieve salary from employees with amount above the MAX(salary) of tasks rows sharing the same code. SQL:
SELECT salary FROM employees AS bev WHERE amount > ( SELECT MAX(salary) FROM tasks AS znob WHERE znob.code = bev.code );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02278
train
v2
Schema: staff (alias: xnob)(date, id, salary, name) accounts(status, salary, date, type) Task: Find code from staff where a matching record exists in accounts with the same status. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = xnob.status );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "code", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02279
train
v1
Schema: categories (alias: egiv)(name, status, code, value) customers(code, name, status, salary) Task: Retrieve amount from categories whose type is found in customers rows where id matches the outer record. SQL:
SELECT amount FROM categories AS egiv WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.id = egiv.id );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02280
train
v1
Schema: managers (alias: hac)(amount, name, status, type) transactions(name, value, level, salary) Task: Find id from managers where status appears in transactions entries with matching code. SQL:
SELECT id FROM managers AS hac WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.code = hac.code );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02281
train
v1
Schema: invoices (alias: fal)(status, type, name, value) managers(date, status, amount, type) Task: Find salary from invoices where level appears in managers entries with matching type. SQL:
SELECT salary FROM invoices AS fal WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.type = fal.type );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "salary", "filter_col": "level", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02282
train
v2
Schema: requests (alias: ejof)(type, id, value, date) tasks(id, code, salary, value) Task: Find amount from requests where a matching record exists in tasks with the same id. SQL:
SELECT amount FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "amount", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02283
train
v2
Schema: tasks (alias: znob)(name, status, amount, id) projects(level, amount, status, name) Task: Retrieve id from tasks that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = znob.code );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "id", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02284
train
v2
Schema: tasks (alias: znob)(value, salary, name, level) transactions(type, amount, level, code) Task: Retrieve value from tasks that have at least one corresponding entry in transactions sharing the same level. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = znob.level );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "value", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02285
train
v3
Schema: invoices (alias: fal)(name, code, level, amount) departments(type, name, salary, status) Task: Retrieve id from invoices with value above the AVG(amount) of departments rows sharing the same level. SQL:
SELECT id FROM invoices AS fal WHERE value > ( SELECT AVG(amount) FROM departments AS dov WHERE dov.level = fal.level );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02286
train
v2
Schema: tasks (alias: znob)(salary, id, code, status) sales(salary, value, id, code) Task: Find amount from tasks where a matching record exists in sales with the same status. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = znob.status );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "znob", "inner_alias": "cif", "proj_col": "amount", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02287
train
v1
Schema: departments (alias: dov)(date, type, name, status) customers(value, date, status, level) Task: Retrieve code from departments whose status is found in customers rows where status matches the outer record. SQL:
SELECT code FROM departments AS dov WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.status = dov.status );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02288
train
v1
Schema: employees (alias: bev)(amount, status, code, salary) sales(status, code, amount, type) Task: Retrieve code from employees whose level is found in sales rows where id matches the outer record. SQL:
SELECT code FROM employees AS bev WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.id = bev.id );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "code", "filter_col": "level", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02289
train
v2
Schema: departments (alias: dov)(name, id, amount, date) tasks(name, salary, amount, type) Task: Find amount from departments where a matching record exists in tasks with the same code. SQL:
SELECT amount FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.code = dov.code );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dov", "inner_alias": "znob", "proj_col": "amount", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02290
train
v3
Schema: shipments (alias: vnob)(id, date, value, level) projects(salary, value, date, name) Task: Find id from shipments where value exceeds the minimum amount from projects for the same status. SQL:
SELECT id FROM shipments AS vnob WHERE value > ( SELECT MIN(amount) FROM projects AS uliv WHERE uliv.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "projects", "outer_alias": "vnob", "inner_alias": "uliv", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02291
train
v1
Schema: staff (alias: xnob)(id, amount, code, level) sales(id, date, code, level) Task: Find amount from staff where code appears in sales entries with matching code. SQL:
SELECT amount FROM staff AS xnob WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.code = xnob.code );
{ "outer_table": "staff", "inner_table": "sales", "outer_alias": "xnob", "inner_alias": "cif", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02292
train
v3
Schema: employees (alias: bev)(salary, level, name, date) tasks(date, type, amount, name) Task: Retrieve code from employees with amount above the MAX(amount) of tasks rows sharing the same status. SQL:
SELECT code FROM employees AS bev WHERE amount > ( SELECT MAX(amount) FROM tasks AS znob WHERE znob.status = bev.status );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02293
train
v3
Schema: orders (alias: kab)(level, code, date, amount) shipments(type, date, name, level) Task: Retrieve id from orders with value above the MIN(salary) of shipments rows sharing the same id. SQL:
SELECT id FROM orders AS kab WHERE value > ( SELECT MIN(salary) FROM shipments AS vnob WHERE vnob.id = kab.id );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02294
train
v1
Schema: products (alias: nad)(level, id, amount, value) projects(status, value, salary, name) Task: Select amount from products where type exists in projects for the same level. SQL:
SELECT amount FROM products AS nad WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.level = nad.level );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "type", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02295
train
v1
Schema: requests (alias: ejof)(name, status, value, salary) schedules(value, date, type, code) Task: Select name from requests where id exists in schedules for the same id. SQL:
SELECT name FROM requests AS ejof WHERE id IN ( SELECT id FROM schedules AS vmob WHERE vmob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "schedules", "outer_alias": "ejof", "inner_alias": "vmob", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02296
train
v1
Schema: invoices (alias: fal)(name, type, level, status) managers(salary, code, id, type) Task: Select id from invoices where level exists in managers for the same id. SQL:
SELECT id FROM invoices AS fal WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.id = fal.id );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "id", "filter_col": "level", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02297
train
v2
Schema: orders (alias: kab)(date, status, level, amount) staff(date, name, level, code) Task: Find amount from orders where a matching record exists in staff with the same id. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = kab.id );
{ "outer_table": "orders", "inner_table": "staff", "outer_alias": "kab", "inner_alias": "xnob", "proj_col": "amount", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02298
train
v2
Schema: sales (alias: cif)(date, amount, code, value) tasks(salary, status, code, type) Task: Retrieve name from sales that have at least one corresponding entry in tasks sharing the same type. SQL:
SELECT name FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = cif.type );
{ "outer_table": "sales", "inner_table": "tasks", "outer_alias": "cif", "inner_alias": "znob", "proj_col": "name", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02299
train