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: schedules (alias: vmob)(level, date, name, status) categories(status, name, level, code) Task: Find id from schedules where salary exceeds the count of salary from categories for the same status. SQL:
SELECT id FROM schedules AS vmob WHERE salary > ( SELECT COUNT(salary) FROM categories AS egiv WHERE egiv.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04200
train
v3
Schema: products (alias: nad)(id, amount, date, status) sales(value, name, type, salary) Task: Retrieve id from products with amount above the MIN(salary) of sales rows sharing the same code. SQL:
SELECT id FROM products AS nad WHERE amount > ( SELECT MIN(salary) FROM sales AS cif WHERE cif.code = nad.code );
{ "outer_table": "products", "inner_table": "sales", "outer_alias": "nad", "inner_alias": "cif", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04201
train
v1
Schema: customers (alias: lex)(type, date, salary, amount) accounts(name, salary, status, type) Task: Retrieve code from customers whose type is found in accounts rows where status matches the outer record. SQL:
SELECT code FROM customers AS lex WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.status = lex.status );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "lex", "inner_alias": "jac", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04202
train
v2
Schema: managers (alias: hac)(status, salary, code, name) shipments(status, id, amount, name) Task: Retrieve id from managers that have at least one corresponding entry in shipments sharing the same level. SQL:
SELECT id FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.level = hac.level );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "hac", "inner_alias": "vnob", "proj_col": "id", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04203
train
v2
Schema: orders (alias: kab)(id, status, date, value) categories(date, status, value, type) Task: Retrieve name from orders that have at least one corresponding entry in categories sharing the same status. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = kab.status );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "name", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04204
train
v3
Schema: products (alias: nad)(salary, code, type, amount) staff(id, salary, status, name) Task: Retrieve amount from products with value above the MIN(salary) of staff rows sharing the same level. SQL:
SELECT amount FROM products AS nad WHERE value > ( SELECT MIN(salary) FROM staff AS xnob WHERE xnob.level = nad.level );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04205
train
v1
Schema: regions (alias: okiv)(level, status, amount, type) orders(status, value, level, code) Task: Retrieve amount from regions whose level is found in orders rows where id matches the outer record. SQL:
SELECT amount FROM regions AS okiv WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.id = okiv.id );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04206
train
v3
Schema: employees (alias: bev)(name, id, date, value) staff(date, level, id, value) Task: Find value from employees where amount exceeds the maximum value from staff for the same status. SQL:
SELECT value FROM employees AS bev WHERE amount > ( SELECT MAX(value) FROM staff AS xnob WHERE xnob.status = bev.status );
{ "outer_table": "employees", "inner_table": "staff", "outer_alias": "bev", "inner_alias": "xnob", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04207
train
v2
Schema: branches (alias: agov)(type, level, date, id) regions(code, date, type, value) Task: Retrieve id from branches that have at least one corresponding entry in regions sharing the same id. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = agov.id );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "id", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04208
train
v3
Schema: items (alias: ikob)(type, date, level, code) employees(id, code, status, amount) Task: Find id from items where amount exceeds the minimum value from employees for the same type. SQL:
SELECT id FROM items AS ikob WHERE amount > ( SELECT MIN(value) FROM employees AS bev WHERE bev.type = ikob.type );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04209
train
v2
Schema: sales (alias: cif)(salary, value, id, status) products(level, date, type, value) Task: Retrieve code from sales that have at least one corresponding entry in products sharing the same level. SQL:
SELECT code FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = cif.level );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "code", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04210
train
v3
Schema: projects (alias: uliv)(status, id, date, name) invoices(level, type, id, status) Task: Retrieve code from projects with salary above the MAX(amount) of invoices rows sharing the same status. SQL:
SELECT code FROM projects AS uliv WHERE salary > ( SELECT MAX(amount) FROM invoices AS fal WHERE fal.status = uliv.status );
{ "outer_table": "projects", "inner_table": "invoices", "outer_alias": "uliv", "inner_alias": "fal", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04211
train
v3
Schema: items (alias: ikob)(id, name, level, value) regions(type, salary, code, date) Task: Find salary from items where value exceeds the maximum value from regions for the same level. SQL:
SELECT salary FROM items AS ikob WHERE value > ( SELECT MAX(value) FROM regions AS okiv WHERE okiv.level = ikob.level );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04212
train
v1
Schema: employees (alias: bev)(name, value, type, status) accounts(code, type, level, amount) Task: Find code from employees where level appears in accounts entries with matching type. SQL:
SELECT code FROM employees AS bev WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.type = bev.type );
{ "outer_table": "employees", "inner_table": "accounts", "outer_alias": "bev", "inner_alias": "jac", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04213
train
v2
Schema: regions (alias: okiv)(salary, level, code, amount) invoices(name, date, value, type) Task: Retrieve id from regions that have at least one corresponding entry in invoices sharing the same level. SQL:
SELECT id FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = okiv.level );
{ "outer_table": "regions", "inner_table": "invoices", "outer_alias": "okiv", "inner_alias": "fal", "proj_col": "id", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04214
train
v2
Schema: sales (alias: cif)(amount, id, salary, value) staff(code, name, id, status) Task: Find code from sales where a matching record exists in staff with the same status. SQL:
SELECT code FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = cif.status );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "code", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04215
train
v2
Schema: invoices (alias: fal)(name, code, amount, salary) projects(status, date, salary, value) Task: Find id from invoices where a matching record exists in projects with the same status. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = fal.status );
{ "outer_table": "invoices", "inner_table": "projects", "outer_alias": "fal", "inner_alias": "uliv", "proj_col": "id", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04216
train
v2
Schema: items (alias: ikob)(salary, level, id, date) invoices(amount, status, salary, type) Task: Retrieve value from items that have at least one corresponding entry in invoices sharing the same code. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = ikob.code );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "value", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04217
train
v2
Schema: requests (alias: ejof)(type, status, salary, id) schedules(amount, name, id, salary) Task: Retrieve name from requests that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "schedules", "outer_alias": "ejof", "inner_alias": "vmob", "proj_col": "name", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_04218
train
v2
Schema: branches (alias: agov)(salary, id, name, type) customers(date, salary, value, status) Task: Retrieve id from branches that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = agov.type );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "id", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04219
train
v1
Schema: accounts (alias: jac)(level, value, code, type) shipments(name, value, salary, status) Task: Find salary from accounts where level appears in shipments entries with matching type. SQL:
SELECT salary FROM accounts AS jac WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "level", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04220
train
v2
Schema: orders (alias: kab)(date, type, code, level) transactions(status, type, salary, value) Task: Find name from orders where a matching record exists in transactions with the same type. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = kab.type );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "name", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04221
train
v3
Schema: accounts (alias: jac)(type, id, code, amount) tasks(date, name, value, level) Task: Find amount from accounts where value exceeds the average salary from tasks for the same code. SQL:
SELECT amount FROM accounts AS jac WHERE value > ( SELECT AVG(salary) FROM tasks AS znob WHERE znob.code = jac.code );
{ "outer_table": "accounts", "inner_table": "tasks", "outer_alias": "jac", "inner_alias": "znob", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04222
train
v3
Schema: departments (alias: dov)(status, amount, salary, level) sales(type, status, value, level) Task: Find id from departments where salary exceeds the minimum amount from sales for the same code. SQL:
SELECT id FROM departments AS dov WHERE salary > ( SELECT MIN(amount) FROM sales AS cif WHERE cif.code = dov.code );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04223
train
v1
Schema: sales (alias: cif)(level, amount, name, salary) departments(level, id, status, amount) Task: Select code from sales where code exists in departments for the same type. SQL:
SELECT code FROM sales AS cif WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.type = cif.type );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "code", "filter_col": "code", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04224
train
v3
Schema: regions (alias: okiv)(date, status, type, value) shipments(name, date, level, code) Task: Find amount from regions where value exceeds the total amount from shipments for the same code. SQL:
SELECT amount FROM regions AS okiv WHERE value > ( SELECT SUM(amount) FROM shipments AS vnob WHERE vnob.code = okiv.code );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "okiv", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04225
train
v2
Schema: accounts (alias: jac)(id, status, salary, level) schedules(date, name, type, salary) Task: Retrieve salary from accounts that have at least one corresponding entry in schedules sharing the same status. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "salary", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04226
train
v1
Schema: regions (alias: okiv)(type, code, date, level) managers(name, level, type, code) Task: Select amount from regions where level exists in managers for the same code. SQL:
SELECT amount FROM regions AS okiv WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.code = okiv.code );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "okiv", "inner_alias": "hac", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04227
train
v3
Schema: tasks (alias: znob)(value, code, date, status) customers(amount, status, id, date) Task: Find amount from tasks where salary exceeds the total value from customers for the same code. SQL:
SELECT amount FROM tasks AS znob WHERE salary > ( SELECT SUM(value) FROM customers AS lex WHERE lex.code = znob.code );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "znob", "inner_alias": "lex", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04228
train
v1
Schema: shipments (alias: vnob)(date, id, salary, name) invoices(level, type, date, id) Task: Find amount from shipments where type appears in invoices entries with matching id. SQL:
SELECT amount FROM shipments AS vnob WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "vnob", "inner_alias": "fal", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_04229
train
v2
Schema: customers (alias: lex)(date, amount, salary, id) tasks(name, date, status, value) Task: Find amount from customers where a matching record exists in tasks with the same id. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = lex.id );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "amount", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04230
train
v1
Schema: employees (alias: bev)(level, code, date, value) schedules(type, amount, level, date) Task: Select code from employees where level exists in schedules for the same type. SQL:
SELECT code FROM employees AS bev WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.type = bev.type );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04231
train
v3
Schema: transactions (alias: gev)(code, date, name, id) requests(level, amount, code, id) Task: Find code from transactions where salary exceeds the maximum amount from requests for the same code. SQL:
SELECT code FROM transactions AS gev WHERE salary > ( SELECT MAX(amount) FROM requests AS ejof WHERE ejof.code = gev.code );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04232
train
v2
Schema: customers (alias: lex)(name, status, value, type) orders(date, status, name, type) Task: Find value from customers where a matching record exists in orders with the same level. SQL:
SELECT value FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = lex.level );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "lex", "inner_alias": "kab", "proj_col": "value", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04233
train
v3
Schema: requests (alias: ejof)(code, type, value, name) sales(id, code, date, type) Task: Retrieve name from requests with value above the MAX(value) of sales rows sharing the same code. SQL:
SELECT name FROM requests AS ejof WHERE value > ( SELECT MAX(value) FROM sales AS cif WHERE cif.code = ejof.code );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_04234
train
v3
Schema: managers (alias: hac)(status, date, level, salary) transactions(type, salary, id, code) Task: Find id from managers where amount exceeds the average salary from transactions for the same level. SQL:
SELECT id FROM managers AS hac WHERE amount > ( SELECT AVG(salary) FROM transactions AS gev WHERE gev.level = hac.level );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04235
train
v1
Schema: tasks (alias: znob)(level, amount, code, id) departments(date, amount, id, salary) Task: Find salary from tasks where type appears in departments entries with matching type. SQL:
SELECT salary FROM tasks AS znob WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.type = znob.type );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04236
train
v1
Schema: items (alias: ikob)(status, id, salary, level) requests(salary, date, amount, id) Task: Retrieve code from items whose code is found in requests rows where code matches the outer record. SQL:
SELECT code FROM items AS ikob WHERE code IN ( SELECT code FROM requests AS ejof WHERE ejof.code = ikob.code );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "ikob", "inner_alias": "ejof", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04237
train
v3
Schema: sales (alias: cif)(amount, code, id, status) requests(amount, date, code, status) Task: Find id from sales where value exceeds the count of salary from requests for the same level. SQL:
SELECT id FROM sales AS cif WHERE value > ( SELECT COUNT(salary) FROM requests AS ejof WHERE ejof.level = cif.level );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04238
train
v3
Schema: projects (alias: uliv)(level, status, id, value) customers(status, id, salary, date) Task: Retrieve salary from projects with value above the MAX(salary) of customers rows sharing the same type. SQL:
SELECT salary FROM projects AS uliv WHERE value > ( SELECT MAX(salary) FROM customers AS lex WHERE lex.type = uliv.type );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "uliv", "inner_alias": "lex", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04239
train
v3
Schema: requests (alias: ejof)(value, salary, type, amount) categories(name, status, id, date) Task: Retrieve salary from requests with amount above the COUNT(value) of categories rows sharing the same status. SQL:
SELECT salary FROM requests AS ejof WHERE amount > ( SELECT COUNT(value) FROM categories AS egiv WHERE egiv.status = ejof.status );
{ "outer_table": "requests", "inner_table": "categories", "outer_alias": "ejof", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_04240
train
v2
Schema: invoices (alias: fal)(type, amount, id, level) departments(status, id, salary, type) Task: Find code from invoices where a matching record exists in departments with the same code. SQL:
SELECT code FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = fal.code );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "code", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04241
train
v1
Schema: tasks (alias: znob)(type, date, salary, level) customers(level, value, code, type) Task: Retrieve amount from tasks whose type is found in customers rows where status matches the outer record. SQL:
SELECT amount FROM tasks AS znob WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.status = znob.status );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "znob", "inner_alias": "lex", "proj_col": "amount", "filter_col": "type", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04242
train
v1
Schema: managers (alias: hac)(type, id, status, salary) staff(salary, type, name, level) Task: Find salary from managers where status appears in staff entries with matching id. SQL:
SELECT salary FROM managers AS hac WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.id = hac.id );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "hac", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04243
train
v1
Schema: customers (alias: lex)(status, value, date, id) items(name, code, status, type) Task: Retrieve id from customers whose level is found in items rows where type matches the outer record. SQL:
SELECT id FROM customers AS lex WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.type = lex.type );
{ "outer_table": "customers", "inner_table": "items", "outer_alias": "lex", "inner_alias": "ikob", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04244
train
v2
Schema: customers (alias: lex)(date, name, salary, level) transactions(code, status, name, salary) Task: Find value from customers where a matching record exists in transactions with the same code. SQL:
SELECT value FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = lex.code );
{ "outer_table": "customers", "inner_table": "transactions", "outer_alias": "lex", "inner_alias": "gev", "proj_col": "value", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04245
train
v2
Schema: projects (alias: uliv)(salary, type, value, amount) items(date, name, value, code) Task: Find amount from projects where a matching record exists in items with the same type. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "amount", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04246
train
v1
Schema: tasks (alias: znob)(status, type, code, name) employees(status, amount, name, level) Task: Retrieve code from tasks whose level is found in employees rows where code matches the outer record. SQL:
SELECT code FROM tasks AS znob WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.code = znob.code );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04247
train
v3
Schema: branches (alias: agov)(date, level, amount, status) sales(code, id, salary, amount) Task: Retrieve name from branches with amount above the MAX(salary) of sales rows sharing the same code. SQL:
SELECT name FROM branches AS agov WHERE amount > ( SELECT MAX(salary) FROM sales AS cif WHERE cif.code = agov.code );
{ "outer_table": "branches", "inner_table": "sales", "outer_alias": "agov", "inner_alias": "cif", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04248
train
v3
Schema: invoices (alias: fal)(name, salary, status, date) employees(date, id, code, type) Task: Retrieve name from invoices with salary above the AVG(salary) of employees rows sharing the same code. SQL:
SELECT name FROM invoices AS fal WHERE salary > ( SELECT AVG(salary) FROM employees AS bev WHERE bev.code = fal.code );
{ "outer_table": "invoices", "inner_table": "employees", "outer_alias": "fal", "inner_alias": "bev", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04249
train
v1
Schema: projects (alias: uliv)(name, status, value, salary) tasks(code, salary, status, id) Task: Select value from projects where id exists in tasks for the same type. SQL:
SELECT value FROM projects AS uliv WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "uliv", "inner_alias": "znob", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04250
train
v2
Schema: projects (alias: uliv)(code, level, amount, name) shipments(status, code, salary, type) Task: Find code from projects where a matching record exists in shipments with the same id. SQL:
SELECT code FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = uliv.id );
{ "outer_table": "projects", "inner_table": "shipments", "outer_alias": "uliv", "inner_alias": "vnob", "proj_col": "code", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04251
train
v1
Schema: employees (alias: bev)(name, date, code, id) sales(value, type, status, name) Task: Select salary from employees where status exists in sales for the same type. SQL:
SELECT salary FROM employees AS bev WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.type = bev.type );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "salary", "filter_col": "status", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04252
train
v1
Schema: customers (alias: lex)(status, code, level, id) employees(level, name, amount, salary) Task: Retrieve amount from customers whose type is found in employees rows where code matches the outer record. SQL:
SELECT amount FROM customers AS lex WHERE type IN ( SELECT type FROM employees AS bev WHERE bev.code = lex.code );
{ "outer_table": "customers", "inner_table": "employees", "outer_alias": "lex", "inner_alias": "bev", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04253
train
v3
Schema: invoices (alias: fal)(name, status, value, type) staff(status, value, date, type) Task: Retrieve name from invoices with salary above the SUM(amount) of staff rows sharing the same id. SQL:
SELECT name FROM invoices AS fal WHERE salary > ( SELECT SUM(amount) FROM staff AS xnob WHERE xnob.id = fal.id );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04254
train
v1
Schema: orders (alias: kab)(type, salary, code, amount) employees(status, name, code, value) Task: Retrieve id from orders whose status is found in employees rows where id matches the outer record. SQL:
SELECT id FROM orders AS kab WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.id = kab.id );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04255
train
v1
Schema: tasks (alias: znob)(value, type, salary, status) orders(salary, type, name, status) Task: Retrieve salary from tasks whose status is found in orders rows where level matches the outer record. SQL:
SELECT salary FROM tasks AS znob WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.level = znob.level );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04256
train
v1
Schema: items (alias: ikob)(salary, status, name, level) staff(date, level, name, id) Task: Retrieve id from items whose level is found in staff rows where id matches the outer record. SQL:
SELECT id FROM items AS ikob WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.id = ikob.id );
{ "outer_table": "items", "inner_table": "staff", "outer_alias": "ikob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "level", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04257
train
v3
Schema: customers (alias: lex)(status, value, level, date) requests(date, name, level, status) Task: Retrieve name from customers with amount above the MIN(amount) of requests rows sharing the same status. SQL:
SELECT name FROM customers AS lex WHERE amount > ( SELECT MIN(amount) FROM requests AS ejof WHERE ejof.status = lex.status );
{ "outer_table": "customers", "inner_table": "requests", "outer_alias": "lex", "inner_alias": "ejof", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04258
train
v2
Schema: projects (alias: uliv)(value, type, code, level) items(code, value, status, name) Task: Find id from projects where a matching record exists in items with the same level. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "id", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04259
train
v3
Schema: departments (alias: dov)(value, name, code, status) invoices(level, type, name, value) Task: Find amount from departments where salary exceeds the count of salary from invoices for the same status. SQL:
SELECT amount FROM departments AS dov WHERE salary > ( SELECT COUNT(salary) FROM invoices AS fal WHERE fal.status = dov.status );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04260
train
v3
Schema: items (alias: ikob)(name, amount, level, salary) accounts(id, salary, level, value) Task: Find value from items where amount exceeds the maximum salary from accounts for the same code. SQL:
SELECT value FROM items AS ikob WHERE amount > ( SELECT MAX(salary) FROM accounts AS jac WHERE jac.code = ikob.code );
{ "outer_table": "items", "inner_table": "accounts", "outer_alias": "ikob", "inner_alias": "jac", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04261
train
v2
Schema: items (alias: ikob)(status, value, date, type) departments(level, date, status, amount) Task: Retrieve id from items that have at least one corresponding entry in departments sharing the same id. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = ikob.id );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "ikob", "inner_alias": "dov", "proj_col": "id", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04262
train
v2
Schema: managers (alias: hac)(amount, level, value, name) tasks(date, salary, id, name) Task: Find name from managers where a matching record exists in tasks with the same level. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.level = hac.level );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "name", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04263
train
v1
Schema: requests (alias: ejof)(status, code, salary, level) customers(amount, name, status, type) Task: Retrieve code from requests whose type is found in customers rows where level matches the outer record. SQL:
SELECT code FROM requests AS ejof WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.level = ejof.level );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_04264
train
v1
Schema: employees (alias: bev)(code, id, date, value) staff(salary, status, date, name) Task: Select id from employees where type exists in staff for the same level. SQL:
SELECT id FROM employees AS bev WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.level = bev.level );
{ "outer_table": "employees", "inner_table": "staff", "outer_alias": "bev", "inner_alias": "xnob", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04265
train
v2
Schema: staff (alias: xnob)(code, id, status, salary) customers(name, amount, value, date) Task: Find code from staff where a matching record exists in customers with the same level. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = xnob.level );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "code", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_04266
train
v1
Schema: accounts (alias: jac)(date, value, name, code) departments(date, status, code, name) Task: Find amount from accounts where code appears in departments entries with matching status. SQL:
SELECT amount FROM accounts AS jac WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.status = jac.status );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "amount", "filter_col": "code", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04267
train
v3
Schema: transactions (alias: gev)(salary, name, value, code) invoices(date, type, name, amount) Task: Find code from transactions where value exceeds the maximum salary from invoices for the same status. SQL:
SELECT code FROM transactions AS gev WHERE value > ( SELECT MAX(salary) FROM invoices AS fal WHERE fal.status = gev.status );
{ "outer_table": "transactions", "inner_table": "invoices", "outer_alias": "gev", "inner_alias": "fal", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04268
train
v1
Schema: shipments (alias: vnob)(name, id, code, type) products(type, value, name, level) Task: Select salary from shipments where code exists in products for the same id. SQL:
SELECT salary FROM shipments AS vnob WHERE code IN ( SELECT code FROM products AS nad WHERE nad.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_04269
train
v3
Schema: accounts (alias: jac)(date, id, value, status) regions(amount, date, value, salary) Task: Retrieve value from accounts with amount above the COUNT(salary) of regions rows sharing the same level. SQL:
SELECT value FROM accounts AS jac WHERE amount > ( SELECT COUNT(salary) FROM regions AS okiv WHERE okiv.level = jac.level );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04270
train
v2
Schema: shipments (alias: vnob)(salary, level, date, status) managers(type, date, code, value) Task: Retrieve id from shipments that have at least one corresponding entry in managers sharing the same id. SQL:
SELECT id FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "id", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_04271
train
v3
Schema: departments (alias: dov)(level, date, salary, value) managers(level, salary, value, amount) Task: Find amount from departments where salary exceeds the count of salary from managers for the same status. SQL:
SELECT amount FROM departments AS dov WHERE salary > ( SELECT COUNT(salary) FROM managers AS hac WHERE hac.status = dov.status );
{ "outer_table": "departments", "inner_table": "managers", "outer_alias": "dov", "inner_alias": "hac", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04272
train
v3
Schema: schedules (alias: vmob)(amount, value, status, level) products(name, id, type, value) Task: Retrieve code from schedules with amount above the AVG(value) of products rows sharing the same type. SQL:
SELECT code FROM schedules AS vmob WHERE amount > ( SELECT AVG(value) FROM products AS nad WHERE nad.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04273
train
v2
Schema: products (alias: nad)(type, code, status, salary) branches(name, date, amount, type) Task: Retrieve amount from products that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = nad.code );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "amount", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04274
train
v1
Schema: projects (alias: uliv)(salary, amount, date, type) requests(id, value, code, salary) Task: Retrieve value from projects whose id is found in requests rows where code matches the outer record. SQL:
SELECT value FROM projects AS uliv WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.code = uliv.code );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "value", "filter_col": "id", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04275
train
v3
Schema: products (alias: nad)(status, salary, name, amount) requests(amount, salary, id, value) Task: Retrieve id from products with amount above the SUM(amount) of requests rows sharing the same id. SQL:
SELECT id FROM products AS nad WHERE amount > ( SELECT SUM(amount) FROM requests AS ejof WHERE ejof.id = nad.id );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04276
train
v2
Schema: transactions (alias: gev)(level, type, code, status) invoices(value, status, name, amount) Task: Find amount from transactions where a matching record exists in invoices with the same id. SQL:
SELECT amount FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = gev.id );
{ "outer_table": "transactions", "inner_table": "invoices", "outer_alias": "gev", "inner_alias": "fal", "proj_col": "amount", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04277
train
v3
Schema: projects (alias: uliv)(amount, date, value, status) departments(type, code, status, salary) Task: Find id from projects where amount exceeds the maximum salary from departments for the same status. SQL:
SELECT id FROM projects AS uliv WHERE amount > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.status = uliv.status );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "uliv", "inner_alias": "dov", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04278
train
v3
Schema: staff (alias: xnob)(type, status, value, name) regions(salary, level, date, code) Task: Find id from staff where amount exceeds the total salary from regions for the same level. SQL:
SELECT id FROM staff AS xnob WHERE amount > ( SELECT SUM(salary) FROM regions AS okiv WHERE okiv.level = xnob.level );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_04279
train
v1
Schema: items (alias: ikob)(level, code, status, value) regions(name, id, level, status) Task: Retrieve amount from items whose id is found in regions rows where type matches the outer record. SQL:
SELECT amount FROM items AS ikob WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.type = ikob.type );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04280
train
v3
Schema: products (alias: nad)(amount, code, status, level) requests(level, type, date, id) Task: Retrieve id from products with value above the MIN(amount) of requests rows sharing the same type. SQL:
SELECT id FROM products AS nad WHERE value > ( SELECT MIN(amount) FROM requests AS ejof WHERE ejof.type = nad.type );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04281
train
v3
Schema: sales (alias: cif)(id, type, status, code) employees(code, level, date, name) Task: Retrieve value from sales with salary above the MIN(amount) of employees rows sharing the same status. SQL:
SELECT value FROM sales AS cif WHERE salary > ( SELECT MIN(amount) FROM employees AS bev WHERE bev.status = cif.status );
{ "outer_table": "sales", "inner_table": "employees", "outer_alias": "cif", "inner_alias": "bev", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04282
train
v1
Schema: products (alias: nad)(id, value, salary, type) employees(date, type, id, code) Task: Retrieve code from products whose code is found in employees rows where status matches the outer record. SQL:
SELECT code FROM products AS nad WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.status = nad.status );
{ "outer_table": "products", "inner_table": "employees", "outer_alias": "nad", "inner_alias": "bev", "proj_col": "code", "filter_col": "code", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04283
train
v2
Schema: managers (alias: hac)(name, code, level, salary) transactions(value, level, type, name) Task: Find salary from managers where a matching record exists in transactions with the same type. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = hac.type );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "salary", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04284
train
v2
Schema: transactions (alias: gev)(status, name, type, salary) departments(salary, amount, type, level) Task: Retrieve id from transactions that have at least one corresponding entry in departments sharing the same id. SQL:
SELECT id FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = gev.id );
{ "outer_table": "transactions", "inner_table": "departments", "outer_alias": "gev", "inner_alias": "dov", "proj_col": "id", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04285
train
v3
Schema: employees (alias: bev)(code, date, value, id) sales(salary, status, date, name) Task: Find name from employees where value exceeds the minimum amount from sales for the same status. SQL:
SELECT name FROM employees AS bev WHERE value > ( SELECT MIN(amount) FROM sales AS cif WHERE cif.status = bev.status );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04286
train
v3
Schema: regions (alias: okiv)(date, salary, id, status) staff(amount, name, code, id) Task: Retrieve id from regions with salary above the SUM(amount) of staff rows sharing the same type. SQL:
SELECT id FROM regions AS okiv WHERE salary > ( SELECT SUM(amount) FROM staff AS xnob WHERE xnob.type = okiv.type );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "okiv", "inner_alias": "xnob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04287
train
v3
Schema: staff (alias: xnob)(date, amount, id, status) regions(code, status, amount, salary) Task: Find code from staff where amount exceeds the average amount from regions for the same code. SQL:
SELECT code FROM staff AS xnob WHERE amount > ( SELECT AVG(amount) FROM regions AS okiv WHERE okiv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_04288
train
v3
Schema: departments (alias: dov)(name, status, amount, code) requests(type, salary, date, amount) Task: Find code from departments where value exceeds the total salary from requests for the same level. SQL:
SELECT code FROM departments AS dov WHERE value > ( SELECT SUM(salary) FROM requests AS ejof WHERE ejof.level = dov.level );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04289
train
v2
Schema: requests (alias: ejof)(status, salary, type, id) orders(level, name, value, date) Task: Retrieve name from requests that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = ejof.type );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "name", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_04290
train
v2
Schema: regions (alias: okiv)(level, status, value, code) departments(id, value, salary, amount) Task: Find name from regions where a matching record exists in departments with the same level. SQL:
SELECT name FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = okiv.level );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "okiv", "inner_alias": "dov", "proj_col": "name", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04291
train
v3
Schema: categories (alias: egiv)(code, level, id, date) transactions(level, name, status, code) Task: Retrieve id from categories with salary above the AVG(amount) of transactions rows sharing the same type. SQL:
SELECT id FROM categories AS egiv WHERE salary > ( SELECT AVG(amount) FROM transactions AS gev WHERE gev.type = egiv.type );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "egiv", "inner_alias": "gev", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_04292
train
v3
Schema: items (alias: ikob)(value, name, status, id) branches(level, amount, value, name) Task: Retrieve name from items with value above the MAX(amount) of branches rows sharing the same code. SQL:
SELECT name FROM items AS ikob WHERE value > ( SELECT MAX(amount) FROM branches AS agov WHERE agov.code = ikob.code );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04293
train
v1
Schema: shipments (alias: vnob)(type, value, name, salary) branches(amount, id, value, status) Task: Select value from shipments where type exists in branches for the same code. SQL:
SELECT value FROM shipments AS vnob WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "branches", "outer_alias": "vnob", "inner_alias": "agov", "proj_col": "value", "filter_col": "type", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_04294
train
v2
Schema: customers (alias: lex)(type, amount, salary, id) departments(code, name, date, level) Task: Retrieve code from customers that have at least one corresponding entry in departments sharing the same type. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = lex.type );
{ "outer_table": "customers", "inner_table": "departments", "outer_alias": "lex", "inner_alias": "dov", "proj_col": "code", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04295
train
v1
Schema: invoices (alias: fal)(name, type, value, id) departments(value, salary, date, name) Task: Find salary from invoices where status appears in departments entries with matching status. SQL:
SELECT salary FROM invoices AS fal WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.status = fal.status );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "salary", "filter_col": "status", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04296
train
v1
Schema: schedules (alias: vmob)(id, name, value, amount) customers(amount, salary, type, status) Task: Find amount from schedules where type appears in customers entries with matching status. SQL:
SELECT amount FROM schedules AS vmob WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "vmob", "inner_alias": "lex", "proj_col": "amount", "filter_col": "type", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04297
train
v3
Schema: accounts (alias: jac)(type, status, salary, name) tasks(status, value, code, date) Task: Retrieve value from accounts with amount above the SUM(salary) of tasks rows sharing the same type. SQL:
SELECT value FROM accounts AS jac WHERE amount > ( SELECT SUM(salary) FROM tasks AS znob WHERE znob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "tasks", "outer_alias": "jac", "inner_alias": "znob", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04298
train
v3
Schema: invoices (alias: fal)(type, salary, level, value) transactions(salary, type, code, date) Task: Retrieve value from invoices with salary above the MIN(value) of transactions rows sharing the same level. SQL:
SELECT value FROM invoices AS fal WHERE salary > ( SELECT MIN(value) FROM transactions AS gev WHERE gev.level = fal.level );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04299
train