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
v3
Schema: items (alias: ikob)(amount, name, value, status) invoices(type, id, salary, level) Task: Retrieve amount from items with value above the AVG(value) of invoices rows sharing the same type. SQL:
SELECT amount FROM items AS ikob WHERE value > ( SELECT AVG(value) FROM invoices AS fal WHERE fal.type = ikob.type );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01200
train
v2
Schema: products (alias: nad)(code, amount, value, type) departments(level, name, id, amount) Task: Retrieve code from products that have at least one corresponding entry in departments sharing the same level. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = nad.level );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "code", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01201
train
v3
Schema: projects (alias: uliv)(amount, salary, code, name) products(status, code, level, type) Task: Retrieve salary from projects with salary above the MIN(value) of products rows sharing the same level. SQL:
SELECT salary FROM projects AS uliv WHERE salary > ( SELECT MIN(value) FROM products AS nad WHERE nad.level = uliv.level );
{ "outer_table": "projects", "inner_table": "products", "outer_alias": "uliv", "inner_alias": "nad", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01202
train
v2
Schema: projects (alias: uliv)(level, date, value, id) schedules(value, id, level, salary) Task: Retrieve salary from projects that have at least one corresponding entry in schedules sharing the same level. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "salary", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01203
train
v2
Schema: shipments (alias: vnob)(type, status, date, id) projects(level, date, salary, id) Task: Find code from shipments where a matching record exists in projects with the same level. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "projects", "outer_alias": "vnob", "inner_alias": "uliv", "proj_col": "code", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01204
train
v2
Schema: invoices (alias: fal)(amount, code, level, salary) items(salary, level, type, id) Task: Find salary from invoices where a matching record exists in items with the same level. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = fal.level );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "fal", "inner_alias": "ikob", "proj_col": "salary", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01205
train
v3
Schema: tasks (alias: znob)(id, level, salary, type) sales(value, level, name, status) Task: Retrieve name from tasks with value above the MAX(value) of sales rows sharing the same level. SQL:
SELECT name FROM tasks AS znob WHERE value > ( SELECT MAX(value) FROM sales AS cif WHERE cif.level = znob.level );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "znob", "inner_alias": "cif", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01206
train
v2
Schema: employees (alias: bev)(id, level, type, value) requests(salary, status, id, name) Task: Retrieve id from employees that have at least one corresponding entry in requests sharing the same level. SQL:
SELECT id FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.level = bev.level );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "id", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01207
train
v3
Schema: shipments (alias: vnob)(name, id, date, salary) managers(level, name, amount, type) Task: Find name from shipments where amount exceeds the maximum value from managers for the same id. SQL:
SELECT name FROM shipments AS vnob WHERE amount > ( SELECT MAX(value) FROM managers AS hac WHERE hac.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01208
train
v2
Schema: managers (alias: hac)(name, salary, status, type) sales(code, salary, amount, id) Task: Find salary from managers where a matching record exists in sales with the same type. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = hac.type );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "salary", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01209
train
v1
Schema: projects (alias: uliv)(type, salary, code, level) sales(level, type, salary, id) Task: Select value from projects where code exists in sales for the same status. SQL:
SELECT value FROM projects AS uliv WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.status = uliv.status );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "value", "filter_col": "code", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01210
train
v1
Schema: employees (alias: bev)(code, status, id, date) requests(name, amount, code, type) Task: Select value from employees where code exists in requests for the same level. SQL:
SELECT value FROM employees AS bev WHERE code IN ( SELECT code FROM requests AS ejof WHERE ejof.level = bev.level );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01211
train
v3
Schema: branches (alias: agov)(status, type, id, amount) managers(level, amount, name, code) Task: Find id from branches where amount exceeds the minimum amount from managers for the same level. SQL:
SELECT id FROM branches AS agov WHERE amount > ( SELECT MIN(amount) FROM managers AS hac WHERE hac.level = agov.level );
{ "outer_table": "branches", "inner_table": "managers", "outer_alias": "agov", "inner_alias": "hac", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01212
train
v1
Schema: departments (alias: dov)(salary, status, id, amount) shipments(value, type, name, level) Task: Select name from departments where code exists in shipments for the same status. SQL:
SELECT name FROM departments AS dov WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01213
train
v1
Schema: schedules (alias: vmob)(value, code, date, amount) regions(amount, level, id, value) Task: Select value from schedules where id exists in regions for the same type. SQL:
SELECT value FROM schedules AS vmob WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01214
train
v2
Schema: items (alias: ikob)(salary, type, id, value) customers(amount, name, status, salary) Task: Find name from items where a matching record exists in customers with the same code. SQL:
SELECT name FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = ikob.code );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "name", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01215
train
v2
Schema: employees (alias: bev)(date, id, code, name) tasks(amount, type, id, level) Task: Retrieve salary from employees that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = bev.id );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "salary", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01216
train
v1
Schema: transactions (alias: gev)(amount, type, salary, code) sales(value, date, salary, level) Task: Find salary from transactions where type appears in sales entries with matching code. SQL:
SELECT salary FROM transactions AS gev WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.code = gev.code );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01217
train
v1
Schema: tasks (alias: znob)(id, code, type, name) branches(status, id, amount, salary) Task: Retrieve id from tasks whose level is found in branches rows where code matches the outer record. SQL:
SELECT id FROM tasks AS znob WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.code = znob.code );
{ "outer_table": "tasks", "inner_table": "branches", "outer_alias": "znob", "inner_alias": "agov", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01218
train
v1
Schema: invoices (alias: fal)(code, name, type, salary) staff(code, level, id, status) Task: Find value from invoices where type appears in staff entries with matching level. SQL:
SELECT value FROM invoices AS fal WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.level = fal.level );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "value", "filter_col": "type", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01219
train
v2
Schema: items (alias: ikob)(code, amount, salary, status) invoices(id, type, code, level) Task: Retrieve value from items that have at least one corresponding entry in invoices sharing the same type. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = ikob.type );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "value", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01220
train
v1
Schema: schedules (alias: vmob)(amount, type, id, name) tasks(amount, code, status, value) Task: Find code from schedules where level appears in tasks entries with matching id. SQL:
SELECT code FROM schedules AS vmob WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "code", "filter_col": "level", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01221
train
v1
Schema: accounts (alias: jac)(name, type, amount, code) requests(salary, status, id, level) Task: Select name from accounts where level exists in requests for the same code. SQL:
SELECT name FROM accounts AS jac WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.code = jac.code );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "jac", "inner_alias": "ejof", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01222
train
v2
Schema: projects (alias: uliv)(level, value, salary, id) items(date, salary, type, id) Task: Find amount from projects where a matching record exists in items with the same status. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = uliv.status );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "amount", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01223
train
v1
Schema: shipments (alias: vnob)(name, id, value, type) tasks(status, level, name, id) Task: Retrieve amount from shipments whose level is found in tasks rows where type matches the outer record. SQL:
SELECT amount FROM shipments AS vnob WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "tasks", "outer_alias": "vnob", "inner_alias": "znob", "proj_col": "amount", "filter_col": "level", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01224
train
v1
Schema: staff (alias: xnob)(level, name, amount, date) sales(type, salary, level, amount) Task: Select id from staff where status exists in sales for the same id. SQL:
SELECT id FROM staff AS xnob WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.id = xnob.id );
{ "outer_table": "staff", "inner_table": "sales", "outer_alias": "xnob", "inner_alias": "cif", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_01225
train
v3
Schema: accounts (alias: jac)(name, type, id, date) orders(name, code, salary, level) Task: Retrieve id from accounts with amount above the MIN(salary) of orders rows sharing the same id. SQL:
SELECT id FROM accounts AS jac WHERE amount > ( SELECT MIN(salary) FROM orders AS kab WHERE kab.id = jac.id );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01226
train
v2
Schema: employees (alias: bev)(value, name, level, type) sales(value, name, type, status) Task: Find id from employees where a matching record exists in sales with the same status. SQL:
SELECT id FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = bev.status );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "id", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01227
train
v2
Schema: schedules (alias: vmob)(name, date, id, salary) projects(amount, date, value, status) Task: Retrieve salary from schedules that have at least one corresponding entry in projects sharing the same type. SQL:
SELECT salary 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": "salary", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01228
train
v1
Schema: tasks (alias: znob)(value, level, date, code) products(id, status, code, salary) Task: Select value from tasks where level exists in products for the same type. SQL:
SELECT value FROM tasks AS znob WHERE level IN ( SELECT level FROM products AS nad WHERE nad.type = znob.type );
{ "outer_table": "tasks", "inner_table": "products", "outer_alias": "znob", "inner_alias": "nad", "proj_col": "value", "filter_col": "level", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01229
train
v2
Schema: employees (alias: bev)(status, amount, code, salary) sales(date, status, level, type) Task: Retrieve code from employees that have at least one corresponding entry in sales sharing the same level. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = bev.level );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "code", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01230
train
v1
Schema: categories (alias: egiv)(amount, value, date, code) invoices(date, salary, name, id) Task: Retrieve amount from categories whose type is found in invoices rows where id matches the outer record. SQL:
SELECT amount FROM categories AS egiv WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.id = egiv.id );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01231
train
v2
Schema: invoices (alias: fal)(date, amount, salary, name) transactions(code, type, level, name) Task: Retrieve code from invoices that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT code FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = fal.code );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "code", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01232
train
v2
Schema: invoices (alias: fal)(status, type, code, name) branches(status, type, code, salary) Task: Retrieve id from invoices that have at least one corresponding entry in branches sharing the same type. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.type = fal.type );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "id", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01233
train
v3
Schema: employees (alias: bev)(type, code, salary, name) managers(type, level, name, value) Task: Retrieve name from employees with amount above the MIN(salary) of managers rows sharing the same type. SQL:
SELECT name FROM employees AS bev WHERE amount > ( SELECT MIN(salary) FROM managers AS hac WHERE hac.type = bev.type );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "bev", "inner_alias": "hac", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01234
train
v3
Schema: projects (alias: uliv)(type, value, id, salary) managers(id, level, date, type) Task: Retrieve name from projects with amount above the MIN(value) of managers rows sharing the same status. SQL:
SELECT name FROM projects AS uliv WHERE amount > ( SELECT MIN(value) FROM managers AS hac WHERE hac.status = uliv.status );
{ "outer_table": "projects", "inner_table": "managers", "outer_alias": "uliv", "inner_alias": "hac", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01235
train
v1
Schema: projects (alias: uliv)(status, date, salary, code) managers(date, amount, id, level) Task: Retrieve salary from projects whose code is found in managers rows where id matches the outer record. SQL:
SELECT salary FROM projects AS uliv WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.id = uliv.id );
{ "outer_table": "projects", "inner_table": "managers", "outer_alias": "uliv", "inner_alias": "hac", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01236
train
v2
Schema: shipments (alias: vnob)(id, salary, date, code) customers(status, level, value, type) Task: Retrieve value from shipments that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "value", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01237
train
v1
Schema: employees (alias: bev)(salary, amount, type, value) accounts(name, value, date, status) Task: Select amount from employees where status exists in accounts for the same level. SQL:
SELECT amount FROM employees AS bev WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.level = bev.level );
{ "outer_table": "employees", "inner_table": "accounts", "outer_alias": "bev", "inner_alias": "jac", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01238
train
v2
Schema: invoices (alias: fal)(date, status, id, salary) tasks(code, status, amount, type) Task: Find name from invoices where a matching record exists in tasks with the same type. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "tasks", "outer_alias": "fal", "inner_alias": "znob", "proj_col": "name", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01239
train
v1
Schema: schedules (alias: vmob)(name, id, value, date) shipments(code, salary, amount, name) Task: Retrieve code from schedules whose level is found in shipments rows where code matches the outer record. SQL:
SELECT code FROM schedules AS vmob WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "shipments", "outer_alias": "vmob", "inner_alias": "vnob", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01240
train
v1
Schema: schedules (alias: vmob)(id, name, amount, code) items(date, status, name, id) Task: Select code from schedules where status exists in items for the same code. SQL:
SELECT code FROM schedules AS vmob WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "vmob", "inner_alias": "ikob", "proj_col": "code", "filter_col": "status", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01241
train
v2
Schema: projects (alias: uliv)(salary, status, code, amount) sales(status, level, code, value) Task: Retrieve name from projects that have at least one corresponding entry in sales sharing the same id. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = uliv.id );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "name", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01242
train
v2
Schema: managers (alias: hac)(value, amount, date, salary) shipments(status, value, level, date) Task: Retrieve amount from managers that have at least one corresponding entry in shipments sharing the same status. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.status = hac.status );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "hac", "inner_alias": "vnob", "proj_col": "amount", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01243
train
v3
Schema: accounts (alias: jac)(value, salary, name, code) orders(salary, amount, value, date) Task: Find name from accounts where value exceeds the minimum amount from orders for the same level. SQL:
SELECT name FROM accounts AS jac WHERE value > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.level = jac.level );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01244
train
v3
Schema: products (alias: nad)(status, name, amount, type) invoices(level, code, value, salary) Task: Retrieve amount from products with value above the AVG(salary) of invoices rows sharing the same id. SQL:
SELECT amount FROM products AS nad WHERE value > ( SELECT AVG(salary) FROM invoices AS fal WHERE fal.id = nad.id );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01245
train
v1
Schema: sales (alias: cif)(status, id, date, salary) categories(salary, type, amount, name) Task: Select amount from sales where status exists in categories for the same level. SQL:
SELECT amount FROM sales AS cif WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.level = cif.level );
{ "outer_table": "sales", "inner_table": "categories", "outer_alias": "cif", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01246
train
v1
Schema: tasks (alias: znob)(id, name, date, type) orders(amount, salary, date, id) Task: Select code from tasks where status exists in orders for the same status. SQL:
SELECT code FROM tasks AS znob WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.status = znob.status );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01247
train
v1
Schema: items (alias: ikob)(id, name, type, salary) shipments(salary, date, amount, name) Task: Find name from items where code appears in shipments entries with matching status. SQL:
SELECT name FROM items AS ikob WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.status = ikob.status );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01248
train
v2
Schema: items (alias: ikob)(id, date, name, amount) categories(value, date, level, type) Task: Find salary from items where a matching record exists in categories with the same status. SQL:
SELECT salary FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = ikob.status );
{ "outer_table": "items", "inner_table": "categories", "outer_alias": "ikob", "inner_alias": "egiv", "proj_col": "salary", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01249
train
v1
Schema: transactions (alias: gev)(status, salary, code, date) accounts(type, id, date, name) Task: Find code from transactions where type appears in accounts entries with matching id. SQL:
SELECT code FROM transactions AS gev WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.id = gev.id );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "gev", "inner_alias": "jac", "proj_col": "code", "filter_col": "type", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01250
train
v2
Schema: requests (alias: ejof)(name, value, id, date) categories(level, name, type, status) Task: Find name from requests where a matching record exists in categories with the same type. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = ejof.type );
{ "outer_table": "requests", "inner_table": "categories", "outer_alias": "ejof", "inner_alias": "egiv", "proj_col": "name", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_01251
train
v1
Schema: items (alias: ikob)(amount, code, level, name) staff(status, date, salary, value) Task: Find id from items where status appears in staff entries with matching level. SQL:
SELECT id FROM items AS ikob WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.level = ikob.level );
{ "outer_table": "items", "inner_table": "staff", "outer_alias": "ikob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "status", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01252
train
v2
Schema: orders (alias: kab)(amount, salary, level, value) products(id, salary, status, value) Task: Retrieve salary from orders that have at least one corresponding entry in products sharing the same type. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = kab.type );
{ "outer_table": "orders", "inner_table": "products", "outer_alias": "kab", "inner_alias": "nad", "proj_col": "salary", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01253
train
v3
Schema: items (alias: ikob)(code, type, name, date) projects(id, code, value, name) Task: Retrieve value from items with value above the MIN(value) of projects rows sharing the same status. SQL:
SELECT value FROM items AS ikob WHERE value > ( SELECT MIN(value) FROM projects AS uliv WHERE uliv.status = ikob.status );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01254
train
v3
Schema: managers (alias: hac)(id, status, amount, level) requests(level, code, name, status) Task: Retrieve salary from managers with amount above the AVG(salary) of requests rows sharing the same type. SQL:
SELECT salary FROM managers AS hac WHERE amount > ( SELECT AVG(salary) FROM requests AS ejof WHERE ejof.type = hac.type );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01255
train
v3
Schema: departments (alias: dov)(value, status, type, amount) sales(amount, code, salary, id) Task: Find value from departments where salary exceeds the average amount from sales for the same type. SQL:
SELECT value FROM departments AS dov WHERE salary > ( SELECT AVG(amount) FROM sales AS cif WHERE cif.type = dov.type );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01256
train
v2
Schema: regions (alias: okiv)(value, type, salary, id) employees(status, id, amount, salary) Task: Find salary from regions where a matching record exists in employees with the same status. SQL:
SELECT salary FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = okiv.status );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "okiv", "inner_alias": "bev", "proj_col": "salary", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01257
train
v1
Schema: projects (alias: uliv)(status, code, value, id) branches(code, status, id, name) Task: Retrieve name from projects whose id is found in branches rows where status matches the outer record. SQL:
SELECT name FROM projects AS uliv WHERE id IN ( SELECT id FROM branches AS agov WHERE agov.status = uliv.status );
{ "outer_table": "projects", "inner_table": "branches", "outer_alias": "uliv", "inner_alias": "agov", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01258
train
v2
Schema: orders (alias: kab)(amount, level, code, salary) employees(code, name, status, value) Task: Retrieve code from orders that have at least one corresponding entry in employees sharing the same level. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = kab.level );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "code", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01259
train
v1
Schema: staff (alias: xnob)(id, amount, date, level) invoices(type, id, amount, name) Task: Retrieve value from staff whose level is found in invoices rows where level matches the outer record. SQL:
SELECT value FROM staff AS xnob WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.level = xnob.level );
{ "outer_table": "staff", "inner_table": "invoices", "outer_alias": "xnob", "inner_alias": "fal", "proj_col": "value", "filter_col": "level", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_01260
train
v3
Schema: orders (alias: kab)(type, name, amount, status) schedules(type, name, date, amount) Task: Find name from orders where amount exceeds the average amount from schedules for the same id. SQL:
SELECT name FROM orders AS kab WHERE amount > ( SELECT AVG(amount) FROM schedules AS vmob WHERE vmob.id = kab.id );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01261
train
v2
Schema: sales (alias: cif)(name, type, id, status) departments(date, amount, value, code) Task: Retrieve name from sales that have at least one corresponding entry in departments sharing the same id. SQL:
SELECT name FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = cif.id );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "name", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01262
train
v1
Schema: tasks (alias: znob)(salary, code, level, id) schedules(id, value, salary, level) Task: Select name from tasks where code exists in schedules for the same type. SQL:
SELECT name FROM tasks AS znob WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.type = znob.type );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "name", "filter_col": "code", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01263
train
v1
Schema: schedules (alias: vmob)(id, level, salary, name) staff(code, value, status, date) Task: Find name from schedules where status appears in staff entries with matching code. SQL:
SELECT name FROM schedules AS vmob WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01264
train
v2
Schema: schedules (alias: vmob)(status, level, value, amount) projects(id, amount, name, type) Task: Retrieve amount from schedules that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "amount", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01265
train
v2
Schema: customers (alias: lex)(level, value, status, date) managers(status, salary, id, value) Task: Retrieve code from customers that have at least one corresponding entry in managers sharing the same code. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = lex.code );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "code", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01266
train
v1
Schema: categories (alias: egiv)(status, salary, amount, type) schedules(status, salary, name, id) Task: Retrieve salary from categories whose id is found in schedules rows where status matches the outer record. SQL:
SELECT salary FROM categories AS egiv WHERE id IN ( SELECT id FROM schedules AS vmob WHERE vmob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "egiv", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01267
train
v3
Schema: departments (alias: dov)(status, code, type, salary) products(amount, level, id, date) Task: Retrieve name from departments with value above the COUNT(value) of products rows sharing the same code. SQL:
SELECT name FROM departments AS dov WHERE value > ( SELECT COUNT(value) FROM products AS nad WHERE nad.code = dov.code );
{ "outer_table": "departments", "inner_table": "products", "outer_alias": "dov", "inner_alias": "nad", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01268
train
v3
Schema: regions (alias: okiv)(name, code, date, status) employees(amount, value, salary, level) Task: Find salary from regions where salary exceeds the count of amount from employees for the same type. SQL:
SELECT salary FROM regions AS okiv WHERE salary > ( SELECT COUNT(amount) FROM employees AS bev WHERE bev.type = okiv.type );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "okiv", "inner_alias": "bev", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01269
train
v2
Schema: managers (alias: hac)(code, type, id, status) projects(level, type, id, date) Task: Find amount from managers where a matching record exists in projects with the same level. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.level = hac.level );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "hac", "inner_alias": "uliv", "proj_col": "amount", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01270
train
v1
Schema: employees (alias: bev)(value, salary, amount, id) tasks(value, status, name, amount) Task: Find amount from employees where id appears in tasks entries with matching level. SQL:
SELECT amount FROM employees AS bev WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.level = bev.level );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "amount", "filter_col": "id", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01271
train
v2
Schema: sales (alias: cif)(code, value, name, salary) invoices(code, date, value, id) Task: Find salary from sales where a matching record exists in invoices with the same id. SQL:
SELECT salary 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": "salary", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01272
train
v3
Schema: departments (alias: dov)(date, id, code, type) invoices(value, salary, status, id) Task: Retrieve salary from departments with salary above the MIN(salary) of invoices rows sharing the same type. SQL:
SELECT salary FROM departments AS dov WHERE salary > ( SELECT MIN(salary) FROM invoices AS fal WHERE fal.type = dov.type );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01273
train
v1
Schema: invoices (alias: fal)(name, salary, code, type) requests(status, date, name, salary) Task: Select amount from invoices where level exists in requests for the same code. SQL:
SELECT amount FROM invoices AS fal WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.code = fal.code );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01274
train
v3
Schema: sales (alias: cif)(id, status, type, name) invoices(value, date, code, amount) Task: Retrieve value from sales with amount above the MAX(salary) of invoices rows sharing the same status. SQL:
SELECT value FROM sales AS cif WHERE amount > ( SELECT MAX(salary) FROM invoices AS fal WHERE fal.status = cif.status );
{ "outer_table": "sales", "inner_table": "invoices", "outer_alias": "cif", "inner_alias": "fal", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01275
train
v1
Schema: regions (alias: okiv)(amount, level, code, date) schedules(status, date, salary, amount) Task: Select amount from regions where type exists in schedules for the same type. SQL:
SELECT amount FROM regions AS okiv WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.type = okiv.type );
{ "outer_table": "regions", "inner_table": "schedules", "outer_alias": "okiv", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01276
train
v3
Schema: regions (alias: okiv)(amount, salary, status, date) sales(level, code, name, id) Task: Find code from regions where value exceeds the count of salary from sales for the same type. SQL:
SELECT code FROM regions AS okiv WHERE value > ( SELECT COUNT(salary) FROM sales AS cif WHERE cif.type = okiv.type );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01277
train
v2
Schema: schedules (alias: vmob)(level, name, type, id) products(date, level, code, name) Task: Find amount from schedules where a matching record exists in products with the same status. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "amount", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01278
train
v2
Schema: departments (alias: dov)(id, amount, name, status) transactions(code, name, date, level) Task: Find amount from departments where a matching record exists in transactions with the same status. SQL:
SELECT amount FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = dov.status );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dov", "inner_alias": "gev", "proj_col": "amount", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01279
train
v1
Schema: orders (alias: kab)(level, code, id, date) tasks(amount, salary, name, level) Task: Select name from orders where status exists in tasks for the same code. SQL:
SELECT name FROM orders AS kab WHERE status IN ( SELECT status FROM tasks AS znob WHERE znob.code = kab.code );
{ "outer_table": "orders", "inner_table": "tasks", "outer_alias": "kab", "inner_alias": "znob", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01280
train
v3
Schema: customers (alias: lex)(date, name, status, type) products(id, name, amount, date) Task: Find salary from customers where salary exceeds the total value from products for the same status. SQL:
SELECT salary FROM customers AS lex WHERE salary > ( SELECT SUM(value) FROM products AS nad WHERE nad.status = lex.status );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01281
train
v1
Schema: regions (alias: okiv)(id, amount, salary, level) employees(amount, type, value, id) Task: Find id from regions where code appears in employees entries with matching type. SQL:
SELECT id FROM regions AS okiv WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.type = okiv.type );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "okiv", "inner_alias": "bev", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01282
train
v1
Schema: departments (alias: dov)(salary, status, type, id) requests(status, value, id, amount) Task: Find amount from departments where level appears in requests entries with matching status. SQL:
SELECT amount FROM departments AS dov WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.status = dov.status );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01283
train
v1
Schema: projects (alias: uliv)(type, date, amount, salary) customers(status, id, code, type) Task: Select code from projects where type exists in customers for the same code. SQL:
SELECT code FROM projects AS uliv WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.code = uliv.code );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "uliv", "inner_alias": "lex", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01284
train
v2
Schema: sales (alias: cif)(status, level, name, id) employees(salary, date, level, value) Task: Find id from sales where a matching record exists in employees with the same type. SQL:
SELECT id FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.type = cif.type );
{ "outer_table": "sales", "inner_table": "employees", "outer_alias": "cif", "inner_alias": "bev", "proj_col": "id", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01285
train
v2
Schema: shipments (alias: vnob)(name, id, code, amount) tasks(date, code, value, salary) Task: Retrieve id from shipments that have at least one corresponding entry in tasks sharing the same level. SQL:
SELECT id FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "tasks", "outer_alias": "vnob", "inner_alias": "znob", "proj_col": "id", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01286
train
v1
Schema: orders (alias: kab)(level, value, id, code) tasks(name, date, amount, status) Task: Select name from orders where level exists in tasks for the same type. SQL:
SELECT name FROM orders AS kab WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.type = kab.type );
{ "outer_table": "orders", "inner_table": "tasks", "outer_alias": "kab", "inner_alias": "znob", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01287
train
v2
Schema: requests (alias: ejof)(salary, id, level, type) tasks(type, code, amount, date) Task: Retrieve name from requests that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT name 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": "name", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_01288
train
v3
Schema: requests (alias: ejof)(name, type, id, level) tasks(name, type, salary, amount) Task: Retrieve amount from requests with amount above the MAX(amount) of tasks rows sharing the same code. SQL:
SELECT amount FROM requests AS ejof WHERE amount > ( SELECT MAX(amount) FROM tasks AS znob WHERE znob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_01289
train
v3
Schema: branches (alias: agov)(status, code, salary, type) departments(level, salary, name, code) Task: Find name from branches where salary exceeds the average amount from departments for the same status. SQL:
SELECT name FROM branches AS agov WHERE salary > ( SELECT AVG(amount) FROM departments AS dov WHERE dov.status = agov.status );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01290
train
v1
Schema: accounts (alias: jac)(code, status, type, date) items(code, amount, date, value) Task: Select id from accounts where status exists in items for the same status. SQL:
SELECT id FROM accounts AS jac WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01291
train
v1
Schema: managers (alias: hac)(salary, level, amount, date) accounts(status, level, name, value) Task: Find value from managers where level appears in accounts entries with matching id. SQL:
SELECT value FROM managers AS hac WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.id = hac.id );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "value", "filter_col": "level", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01292
train
v2
Schema: sales (alias: cif)(id, code, amount, level) projects(id, type, date, status) Task: Find name from sales where a matching record exists in projects with the same type. SQL:
SELECT name FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = cif.type );
{ "outer_table": "sales", "inner_table": "projects", "outer_alias": "cif", "inner_alias": "uliv", "proj_col": "name", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01293
train
v3
Schema: tasks (alias: znob)(id, type, status, amount) items(level, status, amount, date) Task: Retrieve id from tasks with salary above the AVG(amount) of items rows sharing the same status. SQL:
SELECT id FROM tasks AS znob WHERE salary > ( SELECT AVG(amount) FROM items AS ikob WHERE ikob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01294
train
v2
Schema: branches (alias: agov)(status, id, name, amount) schedules(level, code, id, status) Task: Retrieve code from branches that have at least one corresponding entry in schedules sharing the same type. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = agov.type );
{ "outer_table": "branches", "inner_table": "schedules", "outer_alias": "agov", "inner_alias": "vmob", "proj_col": "code", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01295
train
v2
Schema: accounts (alias: jac)(status, code, name, id) departments(type, level, value, name) Task: Find amount from accounts where a matching record exists in departments with the same status. SQL:
SELECT amount FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = jac.status );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "amount", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01296
train
v3
Schema: regions (alias: okiv)(name, status, id, date) items(date, salary, code, type) Task: Find name from regions where value exceeds the average salary from items for the same status. SQL:
SELECT name FROM regions AS okiv WHERE value > ( SELECT AVG(salary) FROM items AS ikob WHERE ikob.status = okiv.status );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01297
train
v2
Schema: managers (alias: hac)(date, level, amount, code) regions(name, amount, id, code) Task: Find code from managers where a matching record exists in regions with the same id. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = hac.id );
{ "outer_table": "managers", "inner_table": "regions", "outer_alias": "hac", "inner_alias": "okiv", "proj_col": "code", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01298
train
v1
Schema: customers (alias: lex)(amount, name, level, id) shipments(level, date, id, value) Task: Select value from customers where status exists in shipments for the same level. SQL:
SELECT value FROM customers AS lex WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.level = lex.level );
{ "outer_table": "customers", "inner_table": "shipments", "outer_alias": "lex", "inner_alias": "vnob", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01299
train