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: transactions (alias: gev)(salary, name, level, status) branches(date, amount, name, value) Task: Retrieve value from transactions that have at least one corresponding entry in branches sharing the same status. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = gev.status );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "gev", "inner_alias": "agov", "proj_col": "value", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00300
train
v1
Schema: regions (alias: okiv)(date, id, level, status) customers(salary, status, name, date) Task: Retrieve name from regions whose code is found in customers rows where level matches the outer record. SQL:
SELECT name FROM regions AS okiv WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.level = okiv.level );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "name", "filter_col": "code", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00301
train
v1
Schema: tasks (alias: znob)(type, salary, level, date) requests(salary, status, id, code) Task: Retrieve code from tasks whose status is found in requests rows where level matches the outer record. SQL:
SELECT code FROM tasks AS znob WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.level = znob.level );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "code", "filter_col": "status", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00302
train
v2
Schema: transactions (alias: gev)(salary, code, value, level) schedules(salary, date, level, status) Task: Retrieve salary from transactions that have at least one corresponding entry in schedules sharing the same status. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = gev.status );
{ "outer_table": "transactions", "inner_table": "schedules", "outer_alias": "gev", "inner_alias": "vmob", "proj_col": "salary", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00303
train
v1
Schema: products (alias: nad)(amount, value, date, level) departments(date, name, id, value) Task: Find amount from products where code appears in departments entries with matching status. SQL:
SELECT amount FROM products AS nad WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.status = nad.status );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "amount", "filter_col": "code", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00304
train
v1
Schema: projects (alias: uliv)(type, id, status, date) requests(date, amount, type, name) Task: Find code from projects where status appears in requests entries with matching status. SQL:
SELECT code FROM projects AS uliv WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.status = uliv.status );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_00305
train
v3
Schema: customers (alias: lex)(salary, type, level, value) accounts(name, amount, code, status) Task: Retrieve code from customers with amount above the COUNT(value) of accounts rows sharing the same level. SQL:
SELECT code FROM customers AS lex WHERE amount > ( SELECT COUNT(value) FROM accounts AS jac WHERE jac.level = lex.level );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "lex", "inner_alias": "jac", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00306
train
v1
Schema: shipments (alias: vnob)(name, type, amount, status) invoices(value, id, status, amount) Task: Retrieve name from shipments whose level is found in invoices rows where type matches the outer record. SQL:
SELECT name FROM shipments AS vnob WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "vnob", "inner_alias": "fal", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00307
train
v1
Schema: staff (alias: xnob)(name, value, level, type) shipments(status, name, value, salary) Task: Retrieve code from staff whose code is found in shipments rows where level matches the outer record. SQL:
SELECT code FROM staff AS xnob WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.level = xnob.level );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00308
train
v1
Schema: managers (alias: hac)(level, code, id, date) transactions(name, id, code, date) Task: Find value from managers where level appears in transactions entries with matching code. SQL:
SELECT value FROM managers AS hac WHERE level IN ( SELECT level FROM transactions AS gev WHERE gev.code = hac.code );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00309
train
v2
Schema: products (alias: nad)(type, amount, name, date) sales(name, salary, level, date) Task: Find salary from products where a matching record exists in sales with the same status. SQL:
SELECT salary FROM products AS nad WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = nad.status );
{ "outer_table": "products", "inner_table": "sales", "outer_alias": "nad", "inner_alias": "cif", "proj_col": "salary", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00310
train
v1
Schema: customers (alias: lex)(level, value, code, name) regions(level, status, amount, salary) Task: Select code from customers where id exists in regions for the same type. SQL:
SELECT code FROM customers AS lex WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.type = lex.type );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "code", "filter_col": "id", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00311
train
v2
Schema: transactions (alias: gev)(value, type, amount, date) invoices(status, id, level, code) Task: Retrieve id from transactions that have at least one corresponding entry in invoices sharing the same status. SQL:
SELECT id FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.status = gev.status );
{ "outer_table": "transactions", "inner_table": "invoices", "outer_alias": "gev", "inner_alias": "fal", "proj_col": "id", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00312
train
v2
Schema: requests (alias: ejof)(id, name, amount, date) staff(amount, type, name, status) Task: Retrieve value from requests that have at least one corresponding entry in staff sharing the same code. SQL:
SELECT value FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ejof", "inner_alias": "xnob", "proj_col": "value", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_00313
train
v2
Schema: transactions (alias: gev)(code, name, value, status) orders(code, status, name, id) Task: Find id from transactions where a matching record exists in orders with the same code. SQL:
SELECT id FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.code = gev.code );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "gev", "inner_alias": "kab", "proj_col": "id", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00314
train
v2
Schema: orders (alias: kab)(id, level, code, amount) requests(value, name, code, amount) Task: Find amount from orders where a matching record exists in requests with the same status. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = kab.status );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "amount", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00315
train
v2
Schema: sales (alias: cif)(value, status, code, amount) products(salary, code, value, name) Task: Find salary from sales where a matching record exists in products with the same type. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = cif.type );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "salary", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00316
train
v1
Schema: items (alias: ikob)(amount, id, level, name) schedules(level, status, type, date) Task: Retrieve name from items whose status is found in schedules rows where level matches the outer record. SQL:
SELECT name FROM items AS ikob WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.level = ikob.level );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "ikob", "inner_alias": "vmob", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00317
train
v1
Schema: managers (alias: hac)(type, date, code, id) employees(code, date, id, amount) Task: Select value from managers where id exists in employees for the same code. SQL:
SELECT value FROM managers AS hac WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.code = hac.code );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "value", "filter_col": "id", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00318
train
v1
Schema: regions (alias: okiv)(level, type, id, name) departments(date, id, code, salary) Task: Retrieve salary from regions whose code is found in departments rows where id matches the outer record. SQL:
SELECT salary FROM regions AS okiv WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.id = okiv.id );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "okiv", "inner_alias": "dov", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00319
train
v2
Schema: departments (alias: dov)(code, date, status, name) sales(level, type, amount, salary) Task: Retrieve salary from departments that have at least one corresponding entry in sales sharing the same status. SQL:
SELECT salary FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = dov.status );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "salary", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00320
train
v2
Schema: sales (alias: cif)(name, type, value, code) customers(value, name, type, date) Task: Retrieve id from sales that have at least one corresponding entry in customers sharing the same code. SQL:
SELECT id FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = cif.code );
{ "outer_table": "sales", "inner_table": "customers", "outer_alias": "cif", "inner_alias": "lex", "proj_col": "id", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00321
train
v1
Schema: products (alias: nad)(code, level, status, date) managers(status, code, date, id) Task: Retrieve salary from products whose level is found in managers rows where type matches the outer record. SQL:
SELECT salary FROM products AS nad WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.type = nad.type );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "nad", "inner_alias": "hac", "proj_col": "salary", "filter_col": "level", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00322
train
v1
Schema: regions (alias: okiv)(id, type, status, date) transactions(date, status, level, type) Task: Select code from regions where code exists in transactions for the same status. SQL:
SELECT code FROM regions AS okiv WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.status = okiv.status );
{ "outer_table": "regions", "inner_table": "transactions", "outer_alias": "okiv", "inner_alias": "gev", "proj_col": "code", "filter_col": "code", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00323
train
v1
Schema: staff (alias: xnob)(value, amount, code, salary) shipments(value, date, type, status) Task: Select id from staff where code exists in shipments for the same status. SQL:
SELECT id FROM staff AS xnob WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "id", "filter_col": "code", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00324
train
v2
Schema: tasks (alias: znob)(level, type, code, id) schedules(value, name, code, level) Task: Find name from tasks where a matching record exists in schedules with the same status. SQL:
SELECT name FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "name", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00325
train
v2
Schema: orders (alias: kab)(type, date, code, value) schedules(amount, type, code, salary) Task: Find salary from orders where a matching record exists in schedules with the same status. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = kab.status );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "salary", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00326
train
v2
Schema: employees (alias: bev)(level, name, value, type) accounts(date, name, id, amount) Task: Retrieve amount from employees that have at least one corresponding entry in accounts sharing the same id. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = bev.id );
{ "outer_table": "employees", "inner_table": "accounts", "outer_alias": "bev", "inner_alias": "jac", "proj_col": "amount", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00327
train
v3
Schema: staff (alias: xnob)(amount, type, name, value) shipments(status, code, level, name) Task: Retrieve salary from staff with salary above the COUNT(amount) of shipments rows sharing the same id. SQL:
SELECT salary FROM staff AS xnob WHERE salary > ( SELECT COUNT(amount) FROM shipments AS vnob WHERE vnob.id = xnob.id );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00328
train
v1
Schema: accounts (alias: jac)(level, salary, status, value) employees(value, date, type, level) Task: Retrieve amount from accounts whose status is found in employees rows where code matches the outer record. SQL:
SELECT amount FROM accounts AS jac WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.code = jac.code );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "amount", "filter_col": "status", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00329
train
v3
Schema: departments (alias: dov)(salary, status, type, id) schedules(date, id, level, status) Task: Find salary from departments where salary exceeds the average salary from schedules for the same code. SQL:
SELECT salary FROM departments AS dov WHERE salary > ( SELECT AVG(salary) FROM schedules AS vmob WHERE vmob.code = dov.code );
{ "outer_table": "departments", "inner_table": "schedules", "outer_alias": "dov", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00330
train
v3
Schema: employees (alias: bev)(value, salary, id, level) managers(date, code, type, salary) Task: Find amount from employees where salary exceeds the minimum salary from managers for the same code. SQL:
SELECT amount FROM employees AS bev WHERE salary > ( SELECT MIN(salary) FROM managers AS hac WHERE hac.code = bev.code );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "bev", "inner_alias": "hac", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00331
train
v3
Schema: items (alias: ikob)(salary, type, value, amount) orders(id, value, date, type) Task: Retrieve salary from items with salary above the MIN(salary) of orders rows sharing the same type. SQL:
SELECT salary FROM items AS ikob WHERE salary > ( SELECT MIN(salary) FROM orders AS kab WHERE kab.type = ikob.type );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00332
train
v3
Schema: branches (alias: agov)(amount, value, date, status) tasks(code, amount, name, value) Task: Retrieve amount from branches with amount above the SUM(amount) of tasks rows sharing the same id. SQL:
SELECT amount FROM branches AS agov WHERE amount > ( SELECT SUM(amount) FROM tasks AS znob WHERE znob.id = agov.id );
{ "outer_table": "branches", "inner_table": "tasks", "outer_alias": "agov", "inner_alias": "znob", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_00333
train
v3
Schema: invoices (alias: fal)(level, amount, name, code) employees(type, id, salary, status) Task: Find id from invoices where value exceeds the maximum salary from employees for the same code. SQL:
SELECT id FROM invoices AS fal WHERE value > ( SELECT MAX(salary) FROM employees AS bev WHERE bev.code = fal.code );
{ "outer_table": "invoices", "inner_table": "employees", "outer_alias": "fal", "inner_alias": "bev", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00334
train
v1
Schema: managers (alias: hac)(id, amount, code, name) customers(code, id, salary, level) Task: Select code from managers where id exists in customers for the same id. SQL:
SELECT code FROM managers AS hac WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.id = hac.id );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "code", "filter_col": "id", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00335
train
v1
Schema: schedules (alias: vmob)(type, date, code, status) transactions(code, status, salary, name) Task: Retrieve salary from schedules whose id is found in transactions rows where status matches the outer record. SQL:
SELECT salary 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": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00336
train
v3
Schema: employees (alias: bev)(status, amount, name, date) customers(type, amount, status, level) Task: Retrieve salary from employees with amount above the COUNT(amount) of customers rows sharing the same status. SQL:
SELECT salary FROM employees AS bev WHERE amount > ( SELECT COUNT(amount) FROM customers AS lex WHERE lex.status = bev.status );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "bev", "inner_alias": "lex", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00337
train
v1
Schema: customers (alias: lex)(id, type, value, status) managers(status, id, value, salary) Task: Select salary from customers where level exists in managers for the same code. SQL:
SELECT salary FROM customers AS lex WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.code = lex.code );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "salary", "filter_col": "level", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00338
train
v1
Schema: staff (alias: xnob)(salary, type, date, value) branches(type, salary, status, name) Task: Retrieve name from staff whose id is found in branches rows where code matches the outer record. SQL:
SELECT name FROM staff AS xnob WHERE id IN ( SELECT id FROM branches AS agov WHERE agov.code = xnob.code );
{ "outer_table": "staff", "inner_table": "branches", "outer_alias": "xnob", "inner_alias": "agov", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00339
train
v1
Schema: schedules (alias: vmob)(date, salary, type, level) requests(level, date, amount, type) Task: Retrieve name from schedules whose code is found in requests rows where type matches the outer record. SQL:
SELECT name FROM schedules AS vmob WHERE code IN ( SELECT code FROM requests AS ejof WHERE ejof.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "requests", "outer_alias": "vmob", "inner_alias": "ejof", "proj_col": "name", "filter_col": "code", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00340
train
v3
Schema: requests (alias: ejof)(level, value, date, amount) employees(amount, salary, level, code) Task: Find name from requests where amount exceeds the average value from employees for the same type. SQL:
SELECT name FROM requests AS ejof WHERE amount > ( SELECT AVG(value) FROM employees AS bev WHERE bev.type = ejof.type );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ejof", "inner_alias": "bev", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_00341
train
v2
Schema: regions (alias: okiv)(status, level, type, name) employees(date, amount, salary, id) Task: Retrieve name from regions that have at least one corresponding entry in employees sharing the same type. SQL:
SELECT name FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.type = okiv.type );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "okiv", "inner_alias": "bev", "proj_col": "name", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00342
train
v2
Schema: sales (alias: cif)(date, value, amount, salary) shipments(amount, name, status, id) Task: Retrieve id from sales that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT id FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = cif.code );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "id", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00343
train
v2
Schema: accounts (alias: jac)(salary, value, id, status) tasks(name, type, id, date) Task: Find value from accounts where a matching record exists in tasks with the same status. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "tasks", "outer_alias": "jac", "inner_alias": "znob", "proj_col": "value", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00344
train
v2
Schema: accounts (alias: jac)(status, name, type, code) requests(code, level, value, salary) Task: Find code from accounts where a matching record exists in requests with the same code. SQL:
SELECT code FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = jac.code );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "jac", "inner_alias": "ejof", "proj_col": "code", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00345
train
v1
Schema: orders (alias: kab)(amount, salary, name, date) items(type, code, date, salary) Task: Select id from orders where code exists in items for the same type. SQL:
SELECT id FROM orders AS kab WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.type = kab.type );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "kab", "inner_alias": "ikob", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00346
train
v1
Schema: customers (alias: lex)(amount, code, salary, id) branches(amount, level, name, value) Task: Find name from customers where status appears in branches entries with matching type. SQL:
SELECT name FROM customers AS lex WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.type = lex.type );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00347
train
v2
Schema: employees (alias: bev)(amount, type, salary, value) shipments(salary, level, name, date) Task: Find name from employees where a matching record exists in shipments with the same id. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = bev.id );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "name", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00348
train
v1
Schema: managers (alias: hac)(status, salary, id, date) projects(salary, date, name, code) Task: Find id from managers where status appears in projects entries with matching code. SQL:
SELECT id FROM managers AS hac WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.code = hac.code );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "hac", "inner_alias": "uliv", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00349
train
v1
Schema: orders (alias: kab)(amount, date, name, id) tasks(value, amount, name, code) Task: Retrieve salary from orders whose type is found in tasks rows where status matches the outer record. SQL:
SELECT salary FROM orders AS kab WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.status = kab.status );
{ "outer_table": "orders", "inner_table": "tasks", "outer_alias": "kab", "inner_alias": "znob", "proj_col": "salary", "filter_col": "type", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00350
train
v2
Schema: managers (alias: hac)(salary, id, name, level) sales(status, value, name, level) Task: Retrieve amount from managers that have at least one corresponding entry in sales sharing the same status. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = hac.status );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "amount", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00351
train
v3
Schema: tasks (alias: znob)(salary, status, amount, level) transactions(code, salary, id, amount) Task: Find value from tasks where value exceeds the total amount from transactions for the same code. SQL:
SELECT value FROM tasks AS znob WHERE value > ( SELECT SUM(amount) FROM transactions AS gev WHERE gev.code = znob.code );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00352
train
v2
Schema: projects (alias: uliv)(salary, status, code, amount) staff(value, date, status, id) Task: Retrieve code from projects that have at least one corresponding entry in staff sharing the same type. SQL:
SELECT code FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "code", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_00353
train
v1
Schema: categories (alias: egiv)(level, date, status, id) orders(status, amount, type, salary) Task: Retrieve value from categories whose level is found in orders rows where id matches the outer record. SQL:
SELECT value FROM categories AS egiv WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.id = egiv.id );
{ "outer_table": "categories", "inner_table": "orders", "outer_alias": "egiv", "inner_alias": "kab", "proj_col": "value", "filter_col": "level", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_00354
train
v3
Schema: accounts (alias: jac)(name, amount, type, date) customers(amount, id, type, value) Task: Retrieve name from accounts with amount above the MAX(value) of customers rows sharing the same type. SQL:
SELECT name FROM accounts AS jac WHERE amount > ( SELECT MAX(value) FROM customers AS lex WHERE lex.type = jac.type );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00355
train
v1
Schema: shipments (alias: vnob)(level, type, code, status) categories(name, amount, type, date) Task: Retrieve value from shipments whose id is found in categories rows where level matches the outer record. SQL:
SELECT value FROM shipments AS vnob WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "categories", "outer_alias": "vnob", "inner_alias": "egiv", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00356
train
v1
Schema: requests (alias: ejof)(value, amount, status, date) items(date, amount, salary, type) Task: Find id from requests where code appears in items entries with matching level. SQL:
SELECT id FROM requests AS ejof WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.level = ejof.level );
{ "outer_table": "requests", "inner_table": "items", "outer_alias": "ejof", "inner_alias": "ikob", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_00357
train
v1
Schema: transactions (alias: gev)(status, amount, value, id) branches(name, id, value, salary) Task: Retrieve salary from transactions whose code is found in branches rows where status matches the outer record. SQL:
SELECT salary FROM transactions AS gev WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.status = gev.status );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "gev", "inner_alias": "agov", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00358
train
v3
Schema: shipments (alias: vnob)(name, status, level, amount) departments(value, salary, amount, status) Task: Find salary from shipments where salary exceeds the total amount from departments for the same status. SQL:
SELECT salary FROM shipments AS vnob WHERE salary > ( SELECT SUM(amount) FROM departments AS dov WHERE dov.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00359
train
v2
Schema: orders (alias: kab)(status, type, date, amount) categories(id, type, level, name) Task: Find name from orders where a matching record exists in categories with the same type. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = kab.type );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "name", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00360
train
v2
Schema: employees (alias: bev)(code, type, date, name) managers(name, id, type, code) Task: Find salary from employees where a matching record exists in managers with the same status. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = bev.status );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "bev", "inner_alias": "hac", "proj_col": "salary", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00361
train
v1
Schema: branches (alias: agov)(id, code, date, salary) departments(amount, name, date, level) Task: Select id from branches where level exists in departments for the same code. SQL:
SELECT id FROM branches AS agov WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.code = agov.code );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_00362
train
v1
Schema: customers (alias: lex)(date, status, amount, name) tasks(code, type, date, level) Task: Find name from customers where code appears in tasks entries with matching level. SQL:
SELECT name FROM customers AS lex WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.level = lex.level );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "name", "filter_col": "code", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00363
train
v1
Schema: departments (alias: dov)(name, date, type, level) accounts(name, type, date, amount) Task: Retrieve code from departments whose status is found in accounts rows where code matches the outer record. SQL:
SELECT code FROM departments AS dov WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.code = dov.code );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "code", "filter_col": "status", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00364
train
v3
Schema: staff (alias: xnob)(value, amount, status, id) employees(date, value, status, name) Task: Retrieve salary from staff with salary above the MAX(value) of employees rows sharing the same status. SQL:
SELECT salary FROM staff AS xnob WHERE salary > ( SELECT MAX(value) FROM employees AS bev WHERE bev.status = xnob.status );
{ "outer_table": "staff", "inner_table": "employees", "outer_alias": "xnob", "inner_alias": "bev", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00365
train
v3
Schema: categories (alias: egiv)(level, code, type, value) tasks(level, code, value, type) Task: Find value from categories where amount exceeds the maximum value from tasks for the same code. SQL:
SELECT value FROM categories AS egiv WHERE amount > ( SELECT MAX(value) FROM tasks AS znob WHERE znob.code = egiv.code );
{ "outer_table": "categories", "inner_table": "tasks", "outer_alias": "egiv", "inner_alias": "znob", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_00366
train
v3
Schema: regions (alias: okiv)(salary, date, code, status) products(date, id, salary, name) Task: Retrieve salary from regions with amount above the MAX(value) of products rows sharing the same status. SQL:
SELECT salary FROM regions AS okiv WHERE amount > ( SELECT MAX(value) FROM products AS nad WHERE nad.status = okiv.status );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00367
train
v2
Schema: branches (alias: agov)(type, status, date, id) customers(level, code, date, amount) Task: Find value from branches where a matching record exists in customers with the same code. SQL:
SELECT value FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = agov.code );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "value", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_00368
train
v2
Schema: employees (alias: bev)(code, name, value, salary) orders(amount, code, value, name) Task: Find name from employees where a matching record exists in orders with the same code. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.code = bev.code );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "name", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00369
train
v1
Schema: employees (alias: bev)(id, level, code, salary) sales(amount, id, value, salary) Task: Select id from employees where level exists in sales for the same type. SQL:
SELECT id FROM employees AS bev WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.type = bev.type );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00370
train
v1
Schema: items (alias: ikob)(date, type, level, code) requests(type, id, value, date) Task: Retrieve code from items whose level is found in requests rows where level matches the outer record. SQL:
SELECT code FROM items AS ikob WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.level = ikob.level );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "ikob", "inner_alias": "ejof", "proj_col": "code", "filter_col": "level", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00371
train
v1
Schema: requests (alias: ejof)(id, level, name, date) tasks(amount, type, value, date) Task: Find value from requests where level appears in tasks entries with matching id. SQL:
SELECT value FROM requests AS ejof WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "value", "filter_col": "level", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_00372
train
v2
Schema: tasks (alias: znob)(date, name, code, level) employees(type, value, code, level) Task: Retrieve amount from tasks that have at least one corresponding entry in employees sharing the same status. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = znob.status );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "amount", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00373
train
v1
Schema: products (alias: nad)(level, id, amount, status) departments(value, status, id, salary) Task: Select amount from products where type exists in departments for the same id. SQL:
SELECT amount FROM products AS nad WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.id = nad.id );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00374
train
v1
Schema: customers (alias: lex)(date, amount, code, status) tasks(date, value, type, code) Task: Find name from customers where code appears in tasks entries with matching type. SQL:
SELECT name FROM customers AS lex WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.type = lex.type );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "name", "filter_col": "code", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00375
train
v2
Schema: shipments (alias: vnob)(level, amount, value, type) customers(salary, code, date, level) Task: Find amount from shipments where a matching record exists in customers with the same status. SQL:
SELECT amount FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "amount", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00376
train
v2
Schema: customers (alias: lex)(type, value, level, salary) schedules(code, amount, date, value) Task: Retrieve amount from customers that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = lex.code );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "amount", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00377
train
v3
Schema: staff (alias: xnob)(date, status, amount, code) branches(amount, name, salary, code) Task: Retrieve salary from staff with salary above the MAX(amount) of branches rows sharing the same status. SQL:
SELECT salary FROM staff AS xnob WHERE salary > ( SELECT MAX(amount) FROM branches AS agov WHERE agov.status = xnob.status );
{ "outer_table": "staff", "inner_table": "branches", "outer_alias": "xnob", "inner_alias": "agov", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00378
train
v3
Schema: invoices (alias: fal)(value, name, id, amount) managers(date, salary, code, name) Task: Retrieve id from invoices with value above the AVG(salary) of managers rows sharing the same level. SQL:
SELECT id FROM invoices AS fal WHERE value > ( SELECT AVG(salary) FROM managers AS hac WHERE hac.level = fal.level );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00379
train
v3
Schema: items (alias: ikob)(name, id, salary, level) sales(amount, id, level, name) Task: Retrieve amount from items with salary above the COUNT(salary) of sales rows sharing the same status. SQL:
SELECT amount FROM items AS ikob WHERE salary > ( SELECT COUNT(salary) FROM sales AS cif WHERE cif.status = ikob.status );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00380
train
v3
Schema: invoices (alias: fal)(value, date, id, salary) customers(salary, value, amount, type) Task: Retrieve code from invoices with amount above the AVG(value) of customers rows sharing the same level. SQL:
SELECT code FROM invoices AS fal WHERE amount > ( SELECT AVG(value) FROM customers AS lex WHERE lex.level = fal.level );
{ "outer_table": "invoices", "inner_table": "customers", "outer_alias": "fal", "inner_alias": "lex", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00381
train
v2
Schema: schedules (alias: vmob)(date, id, level, status) regions(date, salary, amount, id) Task: Find id from schedules where a matching record exists in regions with the same status. SQL:
SELECT id FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "id", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00382
train
v1
Schema: requests (alias: ejof)(type, name, level, date) employees(code, value, name, salary) Task: Find value from requests where status appears in employees entries with matching id. SQL:
SELECT value FROM requests AS ejof WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.id = ejof.id );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ejof", "inner_alias": "bev", "proj_col": "value", "filter_col": "status", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_00383
train
v3
Schema: projects (alias: uliv)(salary, value, level, id) employees(type, name, level, id) Task: Find name from projects where salary exceeds the maximum salary from employees for the same id. SQL:
SELECT name FROM projects AS uliv WHERE salary > ( SELECT MAX(salary) FROM employees AS bev WHERE bev.id = uliv.id );
{ "outer_table": "projects", "inner_table": "employees", "outer_alias": "uliv", "inner_alias": "bev", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_00384
train
v1
Schema: items (alias: ikob)(name, salary, type, id) sales(id, code, status, amount) Task: Select code from items where level exists in sales for the same level. SQL:
SELECT code FROM items AS ikob WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.level = ikob.level );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "code", "filter_col": "level", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00385
train
v1
Schema: customers (alias: lex)(salary, status, amount, date) requests(level, status, id, type) Task: Select id from customers where id exists in requests for the same type. SQL:
SELECT id FROM customers AS lex WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.type = lex.type );
{ "outer_table": "customers", "inner_table": "requests", "outer_alias": "lex", "inner_alias": "ejof", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00386
train
v3
Schema: branches (alias: agov)(id, salary, value, name) orders(status, code, id, type) Task: Find value from branches where amount exceeds the minimum amount from orders for the same id. SQL:
SELECT value FROM branches AS agov WHERE amount > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.id = agov.id );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_00387
train
v2
Schema: products (alias: nad)(value, code, status, name) projects(amount, name, salary, status) Task: Find amount from products where a matching record exists in projects with the same status. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = nad.status );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "amount", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00388
train
v1
Schema: categories (alias: egiv)(date, level, type, status) sales(type, level, code, value) Task: Retrieve name from categories whose type is found in sales rows where code matches the outer record. SQL:
SELECT name FROM categories AS egiv WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.code = egiv.code );
{ "outer_table": "categories", "inner_table": "sales", "outer_alias": "egiv", "inner_alias": "cif", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_00389
train
v2
Schema: departments (alias: dov)(type, date, value, salary) invoices(name, code, id, status) Task: Retrieve code from departments that have at least one corresponding entry in invoices sharing the same code. SQL:
SELECT code FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = dov.code );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "code", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00390
train
v3
Schema: sales (alias: cif)(date, status, name, amount) shipments(amount, type, name, status) Task: Find code from sales where amount exceeds the count of amount from shipments for the same type. SQL:
SELECT code FROM sales AS cif WHERE amount > ( SELECT COUNT(amount) FROM shipments AS vnob WHERE vnob.type = cif.type );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00391
train
v1
Schema: orders (alias: kab)(salary, amount, status, code) projects(amount, name, date, status) Task: Find code from orders where status appears in projects entries with matching type. SQL:
SELECT code FROM orders AS kab WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.type = kab.type );
{ "outer_table": "orders", "inner_table": "projects", "outer_alias": "kab", "inner_alias": "uliv", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00392
train
v2
Schema: invoices (alias: fal)(date, salary, status, code) categories(id, date, type, status) Task: Find salary from invoices where a matching record exists in categories with the same level. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = fal.level );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "salary", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00393
train
v3
Schema: orders (alias: kab)(amount, date, code, type) categories(status, name, date, type) Task: Find code from orders where value exceeds the total salary from categories for the same level. SQL:
SELECT code FROM orders AS kab WHERE value > ( SELECT SUM(salary) FROM categories AS egiv WHERE egiv.level = kab.level );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00394
train
v3
Schema: projects (alias: uliv)(id, code, type, level) orders(code, level, date, amount) Task: Find code from projects where amount exceeds the maximum value from orders for the same level. SQL:
SELECT code FROM projects AS uliv WHERE amount > ( SELECT MAX(value) FROM orders AS kab WHERE kab.level = uliv.level );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_00395
train
v1
Schema: departments (alias: dov)(name, status, id, date) items(salary, date, type, value) Task: Retrieve id from departments whose code is found in items rows where status matches the outer record. SQL:
SELECT id FROM departments AS dov WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.status = dov.status );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "id", "filter_col": "code", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00396
train
v2
Schema: schedules (alias: vmob)(name, id, salary, level) regions(type, value, id, name) Task: Find amount from schedules where a matching record exists in regions with the same status. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "amount", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00397
train
v3
Schema: projects (alias: uliv)(id, date, level, name) products(date, status, name, type) Task: Retrieve salary from projects with amount above the SUM(amount) of products rows sharing the same level. SQL:
SELECT salary FROM projects AS uliv WHERE amount > ( SELECT SUM(amount) 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": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_00398
train
v3
Schema: regions (alias: okiv)(status, id, amount, date) products(amount, date, value, status) Task: Find salary from regions where salary exceeds the maximum value from products for the same type. SQL:
SELECT salary FROM regions AS okiv WHERE salary > ( SELECT MAX(value) FROM products AS nad WHERE nad.type = okiv.type );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00399
train