variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v1
Schema: accounts (alias: jac)(date, name, id, type) regions(id, code, level, date) Task: Retrieve id from accounts whose type is found in regions rows where status matches the outer record. SQL:
SELECT id FROM accounts AS jac WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.status = jac.status );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08200
train
v2
Schema: orders (alias: kab)(type, id, code, status) sales(code, amount, salary, level) Task: Retrieve id from orders that have at least one corresponding entry in sales sharing the same status. SQL:
SELECT id FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = kab.status );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "id", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08201
train
v1
Schema: requests (alias: ejof)(status, code, type, salary) orders(status, name, code, type) Task: Retrieve name from requests whose id is found in orders rows where status matches the outer record. SQL:
SELECT name FROM requests AS ejof WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.status = ejof.status );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08202
train
v1
Schema: tasks (alias: znob)(id, date, salary, status) managers(level, date, salary, type) Task: Select id from tasks where type exists in managers for the same code. SQL:
SELECT id FROM tasks AS znob WHERE type IN ( SELECT type FROM managers AS hac WHERE hac.code = znob.code );
{ "outer_table": "tasks", "inner_table": "managers", "outer_alias": "znob", "inner_alias": "hac", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08203
train
v2
Schema: items (alias: ikob)(date, value, level, code) schedules(value, date, type, level) Task: Find amount from items where a matching record exists in schedules with the same level. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.level = ikob.level );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "ikob", "inner_alias": "vmob", "proj_col": "amount", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08204
train
v2
Schema: projects (alias: uliv)(code, value, name, type) schedules(level, amount, type, date) Task: Retrieve value from projects that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT value FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "value", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08205
train
v2
Schema: accounts (alias: jac)(code, value, status, amount) transactions(salary, code, level, type) Task: Retrieve amount from accounts that have at least one corresponding entry in transactions sharing the same type. SQL:
SELECT amount FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = jac.type );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "jac", "inner_alias": "gev", "proj_col": "amount", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08206
train
v3
Schema: departments (alias: dov)(salary, date, amount, level) shipments(code, id, amount, salary) Task: Retrieve name from departments with amount above the SUM(amount) of shipments rows sharing the same level. SQL:
SELECT name FROM departments AS dov WHERE amount > ( SELECT SUM(amount) FROM shipments AS vnob WHERE vnob.level = dov.level );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08207
train
v1
Schema: products (alias: nad)(amount, value, code, date) branches(status, date, type, id) Task: Find salary from products where id appears in branches entries with matching status. SQL:
SELECT salary FROM products AS nad WHERE id IN ( SELECT id FROM branches AS agov WHERE agov.status = nad.status );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08208
train
v3
Schema: products (alias: nad)(type, id, level, value) staff(code, value, date, level) Task: Find id from products where value exceeds the total amount from staff for the same type. SQL:
SELECT id FROM products AS nad WHERE value > ( SELECT SUM(amount) FROM staff AS xnob WHERE xnob.type = nad.type );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08209
train
v2
Schema: tasks (alias: znob)(status, name, date, code) sales(date, status, salary, id) Task: Find id from tasks where a matching record exists in sales with the same code. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = znob.code );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "znob", "inner_alias": "cif", "proj_col": "id", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08210
train
v1
Schema: schedules (alias: vmob)(amount, status, value, code) projects(id, value, salary, status) Task: Select code from schedules where code exists in projects for the same type. SQL:
SELECT code FROM schedules AS vmob WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "code", "filter_col": "code", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08211
train
v1
Schema: departments (alias: dov)(level, salary, id, status) invoices(status, level, type, date) Task: Retrieve code from departments whose status is found in invoices rows where type matches the outer record. SQL:
SELECT code FROM departments AS dov WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.type = dov.type );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08212
train
v2
Schema: employees (alias: bev)(level, value, amount, code) orders(level, status, code, date) Task: Retrieve name from employees that have at least one corresponding entry in orders sharing the same id. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = bev.id );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "name", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08213
train
v1
Schema: staff (alias: xnob)(id, amount, code, value) managers(name, type, level, date) Task: Find value from staff where code appears in managers entries with matching type. SQL:
SELECT value FROM staff AS xnob WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.type = xnob.type );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "xnob", "inner_alias": "hac", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08214
train
v3
Schema: accounts (alias: jac)(amount, id, date, type) branches(salary, code, level, type) Task: Find value from accounts where amount exceeds the average value from branches for the same type. SQL:
SELECT value FROM accounts AS jac WHERE amount > ( SELECT AVG(value) FROM branches AS agov WHERE agov.type = jac.type );
{ "outer_table": "accounts", "inner_table": "branches", "outer_alias": "jac", "inner_alias": "agov", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08215
train
v3
Schema: schedules (alias: vmob)(amount, date, value, code) branches(code, amount, id, name) Task: Find amount from schedules where value exceeds the count of value from branches for the same status. SQL:
SELECT amount FROM schedules AS vmob WHERE value > ( SELECT COUNT(value) FROM branches AS agov WHERE agov.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "branches", "outer_alias": "vmob", "inner_alias": "agov", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08216
train
v2
Schema: tasks (alias: znob)(code, date, level, type) orders(date, code, status, id) Task: Retrieve amount from tasks that have at least one corresponding entry in orders sharing the same code. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.code = znob.code );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "amount", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08217
train
v3
Schema: managers (alias: hac)(salary, type, name, value) requests(level, amount, value, id) Task: Retrieve name from managers with amount above the MIN(salary) of requests rows sharing the same id. SQL:
SELECT name FROM managers AS hac WHERE amount > ( SELECT MIN(salary) FROM requests AS ejof WHERE ejof.id = hac.id );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08218
train
v2
Schema: branches (alias: agov)(level, value, date, name) staff(type, date, salary, name) Task: Find id from branches where a matching record exists in staff with the same code. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = agov.code );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "id", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08219
train
v3
Schema: categories (alias: egiv)(value, salary, type, status) regions(status, type, amount, name) Task: Retrieve value from categories with amount above the MIN(salary) of regions rows sharing the same code. SQL:
SELECT value FROM categories AS egiv WHERE amount > ( SELECT MIN(salary) FROM regions AS okiv WHERE okiv.code = egiv.code );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08220
train
v1
Schema: invoices (alias: fal)(salary, value, date, amount) managers(amount, date, type, level) Task: Select code from invoices where level exists in managers for the same type. SQL:
SELECT code FROM invoices AS fal WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.type = fal.type );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08221
train
v3
Schema: requests (alias: ejof)(amount, type, date, status) regions(salary, id, name, level) Task: Retrieve id from requests with value above the MIN(salary) of regions rows sharing the same code. SQL:
SELECT id FROM requests AS ejof WHERE value > ( SELECT MIN(salary) FROM regions AS okiv WHERE okiv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "regions", "outer_alias": "ejof", "inner_alias": "okiv", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08222
train
v1
Schema: accounts (alias: jac)(status, type, amount, value) customers(status, id, value, amount) Task: Select id from accounts where level exists in customers for the same status. SQL:
SELECT id FROM accounts AS jac WHERE level IN ( SELECT level FROM customers AS lex WHERE lex.status = jac.status );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "id", "filter_col": "level", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08223
train
v2
Schema: sales (alias: cif)(type, date, amount, salary) regions(name, date, status, level) Task: Find id from sales where a matching record exists in regions with the same type. SQL:
SELECT id FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = cif.type );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "id", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08224
train
v3
Schema: employees (alias: bev)(value, code, type, name) tasks(salary, value, id, status) Task: Find id from employees where amount exceeds the maximum value from tasks for the same type. SQL:
SELECT id FROM employees AS bev WHERE amount > ( SELECT MAX(value) FROM tasks AS znob WHERE znob.type = bev.type );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08225
train
v3
Schema: departments (alias: dov)(date, value, status, type) transactions(level, type, status, amount) Task: Find amount from departments where amount exceeds the maximum salary from transactions for the same code. SQL:
SELECT amount FROM departments AS dov WHERE amount > ( SELECT MAX(salary) FROM transactions AS gev WHERE gev.code = dov.code );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dov", "inner_alias": "gev", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08226
train
v2
Schema: products (alias: nad)(date, name, status, type) tasks(status, type, id, code) Task: Retrieve id from products that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT id FROM products AS nad WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = nad.status );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "id", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08227
train
v2
Schema: accounts (alias: jac)(value, amount, id, code) branches(code, date, name, salary) Task: Retrieve id from accounts that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT id FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = jac.code );
{ "outer_table": "accounts", "inner_table": "branches", "outer_alias": "jac", "inner_alias": "agov", "proj_col": "id", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08228
train
v2
Schema: departments (alias: dov)(id, level, amount, type) employees(name, code, date, amount) Task: Retrieve id from departments that have at least one corresponding entry in employees sharing the same id. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = dov.id );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "id", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08229
train
v3
Schema: sales (alias: cif)(salary, date, id, status) tasks(code, value, level, id) Task: Retrieve salary from sales with value above the SUM(amount) of tasks rows sharing the same type. SQL:
SELECT salary FROM sales AS cif WHERE value > ( SELECT SUM(amount) FROM tasks AS znob WHERE znob.type = cif.type );
{ "outer_table": "sales", "inner_table": "tasks", "outer_alias": "cif", "inner_alias": "znob", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08230
train
v2
Schema: regions (alias: okiv)(code, level, date, type) departments(status, date, type, level) Task: Find amount from regions where a matching record exists in departments with the same level. SQL:
SELECT amount 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": "amount", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08231
train
v3
Schema: items (alias: ikob)(date, code, id, value) shipments(code, amount, type, level) Task: Retrieve id from items with amount above the MIN(amount) of shipments rows sharing the same id. SQL:
SELECT id FROM items AS ikob WHERE amount > ( SELECT MIN(amount) FROM shipments AS vnob WHERE vnob.id = ikob.id );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08232
train
v1
Schema: requests (alias: ejof)(name, date, level, code) customers(salary, date, level, amount) Task: Select value from requests where type exists in customers for the same status. SQL:
SELECT value FROM requests AS ejof WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.status = ejof.status );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08233
train
v3
Schema: staff (alias: xnob)(id, salary, value, code) schedules(salary, amount, id, level) Task: Retrieve amount from staff with amount above the MIN(salary) of schedules rows sharing the same code. SQL:
SELECT amount FROM staff AS xnob WHERE amount > ( SELECT MIN(salary) FROM schedules AS vmob WHERE vmob.code = xnob.code );
{ "outer_table": "staff", "inner_table": "schedules", "outer_alias": "xnob", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08234
train
v3
Schema: branches (alias: agov)(value, salary, name, date) transactions(salary, code, value, amount) Task: Retrieve amount from branches with amount above the SUM(amount) of transactions rows sharing the same id. SQL:
SELECT amount FROM branches AS agov WHERE amount > ( SELECT SUM(amount) FROM transactions AS gev WHERE gev.id = agov.id );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "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_08235
train
v2
Schema: departments (alias: dov)(date, id, status, level) orders(status, value, salary, date) Task: Retrieve id from departments that have at least one corresponding entry in orders sharing the same status. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = dov.status );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dov", "inner_alias": "kab", "proj_col": "id", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08236
train
v1
Schema: products (alias: nad)(status, name, date, id) branches(id, type, date, status) Task: Retrieve id from products whose type is found in branches rows where status matches the outer record. SQL:
SELECT id FROM products AS nad WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.status = nad.status );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08237
train
v2
Schema: projects (alias: uliv)(amount, status, salary, code) customers(type, date, amount, level) Task: Find id from projects where a matching record exists in customers with the same status. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = uliv.status );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "uliv", "inner_alias": "lex", "proj_col": "id", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08238
train
v3
Schema: items (alias: ikob)(status, id, date, salary) schedules(status, date, salary, level) Task: Retrieve amount from items with amount above the SUM(amount) of schedules rows sharing the same code. SQL:
SELECT amount FROM items AS ikob WHERE amount > ( SELECT SUM(amount) FROM schedules AS vmob WHERE vmob.code = ikob.code );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "ikob", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08239
train
v3
Schema: products (alias: nad)(amount, type, id, salary) orders(status, value, type, code) Task: Retrieve name from products with amount above the COUNT(amount) of orders rows sharing the same level. SQL:
SELECT name FROM products AS nad WHERE amount > ( SELECT COUNT(amount) FROM orders AS kab WHERE kab.level = nad.level );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "nad", "inner_alias": "kab", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08240
train
v3
Schema: departments (alias: dov)(value, amount, name, salary) projects(type, code, value, id) Task: Retrieve name from departments with amount above the COUNT(amount) of projects rows sharing the same level. SQL:
SELECT name FROM departments AS dov WHERE amount > ( SELECT COUNT(amount) FROM projects AS uliv WHERE uliv.level = dov.level );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08241
train
v3
Schema: requests (alias: ejof)(name, code, value, amount) staff(id, type, code, level) Task: Find name from requests where amount exceeds the count of amount from staff for the same status. SQL:
SELECT name FROM requests AS ejof WHERE amount > ( SELECT COUNT(amount) FROM staff AS xnob WHERE xnob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ejof", "inner_alias": "xnob", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08242
train
v1
Schema: requests (alias: ejof)(salary, level, status, type) projects(status, value, type, name) Task: Select value from requests where code exists in projects for the same code. SQL:
SELECT value FROM requests AS ejof WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "value", "filter_col": "code", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08243
train
v1
Schema: items (alias: ikob)(amount, value, status, name) tasks(name, date, status, level) Task: Select name from items where status exists in tasks for the same id. SQL:
SELECT name FROM items AS ikob WHERE status IN ( SELECT status FROM tasks AS znob WHERE znob.id = ikob.id );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08244
train
v1
Schema: products (alias: nad)(id, code, type, salary) shipments(code, status, value, type) Task: Select code from products where id exists in shipments for the same status. SQL:
SELECT code FROM products AS nad WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.status = nad.status );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08245
train
v1
Schema: departments (alias: dov)(type, amount, level, value) items(date, value, code, type) Task: Select amount from departments where type exists in items for the same code. SQL:
SELECT amount FROM departments AS dov WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.code = dov.code );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08246
train
v3
Schema: branches (alias: agov)(name, id, salary, level) products(date, name, value, status) Task: Find code from branches where value exceeds the minimum amount from products for the same id. SQL:
SELECT code FROM branches AS agov WHERE value > ( SELECT MIN(amount) FROM products AS nad WHERE nad.id = agov.id );
{ "outer_table": "branches", "inner_table": "products", "outer_alias": "agov", "inner_alias": "nad", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08247
train
v3
Schema: accounts (alias: jac)(id, level, name, value) transactions(amount, status, level, type) Task: Retrieve name from accounts with salary above the AVG(amount) of transactions rows sharing the same id. SQL:
SELECT name FROM accounts AS jac WHERE salary > ( SELECT AVG(amount) FROM transactions AS gev WHERE gev.id = jac.id );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "jac", "inner_alias": "gev", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08248
train
v3
Schema: customers (alias: lex)(type, date, salary, value) categories(value, date, type, id) Task: Find name from customers where value exceeds the average salary from categories for the same status. SQL:
SELECT name FROM customers AS lex WHERE value > ( SELECT AVG(salary) FROM categories AS egiv WHERE egiv.status = lex.status );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08249
train
v3
Schema: transactions (alias: gev)(id, amount, type, value) sales(type, salary, id, status) Task: Find name from transactions where value exceeds the minimum salary from sales for the same level. SQL:
SELECT name FROM transactions AS gev WHERE value > ( SELECT MIN(salary) FROM sales AS cif WHERE cif.level = gev.level );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08250
train
v3
Schema: transactions (alias: gev)(amount, id, date, level) branches(type, name, amount, status) Task: Find amount from transactions where value exceeds the maximum value from branches for the same status. SQL:
SELECT amount FROM transactions AS gev WHERE value > ( SELECT MAX(value) FROM branches AS agov WHERE agov.status = gev.status );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "gev", "inner_alias": "agov", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08251
train
v3
Schema: staff (alias: xnob)(salary, status, name, level) accounts(id, amount, date, salary) Task: Retrieve code from staff with value above the SUM(amount) of accounts rows sharing the same id. SQL:
SELECT code FROM staff AS xnob WHERE value > ( SELECT SUM(amount) FROM accounts AS jac WHERE jac.id = xnob.id );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08252
train
v1
Schema: products (alias: nad)(status, value, id, date) orders(code, type, status, value) Task: Retrieve name from products whose type is found in orders rows where level matches the outer record. SQL:
SELECT name FROM products AS nad WHERE type IN ( SELECT type FROM orders AS kab WHERE kab.level = nad.level );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "nad", "inner_alias": "kab", "proj_col": "name", "filter_col": "type", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08253
train
v3
Schema: branches (alias: agov)(level, salary, type, id) categories(level, code, salary, id) Task: Retrieve value from branches with value above the AVG(salary) of categories rows sharing the same status. SQL:
SELECT value FROM branches AS agov WHERE value > ( SELECT AVG(salary) FROM categories AS egiv WHERE egiv.status = agov.status );
{ "outer_table": "branches", "inner_table": "categories", "outer_alias": "agov", "inner_alias": "egiv", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08254
train
v1
Schema: regions (alias: okiv)(status, code, name, id) staff(name, value, salary, status) Task: Find code from regions where code appears in staff entries with matching level. SQL:
SELECT code FROM regions AS okiv WHERE code IN ( SELECT code FROM staff AS xnob WHERE xnob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "okiv", "inner_alias": "xnob", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08255
train
v1
Schema: customers (alias: lex)(name, value, amount, status) branches(name, type, status, code) Task: Find amount from customers where status appears in branches entries with matching level. SQL:
SELECT amount FROM customers AS lex WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.level = lex.level );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08256
train
v3
Schema: branches (alias: agov)(date, amount, level, code) staff(code, status, type, id) Task: Find code from branches where amount exceeds the count of amount from staff for the same id. SQL:
SELECT code FROM branches AS agov WHERE amount > ( SELECT COUNT(amount) FROM staff AS xnob WHERE xnob.id = agov.id );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08257
train
v1
Schema: requests (alias: ejof)(id, amount, value, level) projects(name, id, code, value) Task: Select name from requests where type exists in projects for the same code. SQL:
SELECT name FROM requests AS ejof WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08258
train
v3
Schema: accounts (alias: jac)(type, date, id, code) sales(id, code, amount, salary) Task: Retrieve id from accounts with amount above the SUM(value) of sales rows sharing the same level. SQL:
SELECT id FROM accounts AS jac WHERE amount > ( SELECT SUM(value) FROM sales AS cif WHERE cif.level = jac.level );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08259
train
v2
Schema: employees (alias: bev)(value, date, salary, amount) requests(date, salary, type, status) Task: Find amount from employees where a matching record exists in requests with the same id. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = bev.id );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "amount", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08260
train
v2
Schema: regions (alias: okiv)(status, code, name, amount) managers(salary, type, status, level) Task: Find code from regions where a matching record exists in managers with the same level. SQL:
SELECT code FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = okiv.level );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "okiv", "inner_alias": "hac", "proj_col": "code", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08261
train
v1
Schema: managers (alias: hac)(level, id, type, status) branches(code, id, status, salary) Task: Find amount from managers where code appears in branches entries with matching code. SQL:
SELECT amount FROM managers AS hac WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.code = hac.code );
{ "outer_table": "managers", "inner_table": "branches", "outer_alias": "hac", "inner_alias": "agov", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08262
train
v3
Schema: accounts (alias: jac)(id, date, status, name) shipments(value, level, id, name) Task: Retrieve name from accounts with salary above the MIN(value) of shipments rows sharing the same status. SQL:
SELECT name FROM accounts AS jac WHERE salary > ( SELECT MIN(value) FROM shipments AS vnob WHERE vnob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08263
train
v2
Schema: shipments (alias: vnob)(name, id, level, amount) branches(amount, id, status, value) Task: Find amount from shipments where a matching record exists in branches with the same status. SQL:
SELECT amount FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "branches", "outer_alias": "vnob", "inner_alias": "agov", "proj_col": "amount", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08264
train
v1
Schema: invoices (alias: fal)(code, name, id, salary) products(code, type, salary, status) Task: Select code from invoices where id exists in products for the same code. SQL:
SELECT code FROM invoices AS fal WHERE id IN ( SELECT id FROM products AS nad WHERE nad.code = fal.code );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "code", "filter_col": "id", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08265
train
v1
Schema: staff (alias: xnob)(name, salary, date, code) departments(name, status, amount, value) Task: Select name from staff where status exists in departments for the same id. SQL:
SELECT name FROM staff AS xnob WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.id = xnob.id );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08266
train
v3
Schema: invoices (alias: fal)(salary, status, level, type) sales(salary, code, type, id) Task: Retrieve salary from invoices with salary above the COUNT(value) of sales rows sharing the same code. SQL:
SELECT salary FROM invoices AS fal WHERE salary > ( SELECT COUNT(value) FROM sales AS cif WHERE cif.code = fal.code );
{ "outer_table": "invoices", "inner_table": "sales", "outer_alias": "fal", "inner_alias": "cif", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08267
train
v3
Schema: products (alias: nad)(amount, salary, id, name) tasks(level, status, date, salary) Task: Find code from products where value exceeds the count of value from tasks for the same type. SQL:
SELECT code FROM products AS nad WHERE value > ( SELECT COUNT(value) FROM tasks AS znob WHERE znob.type = nad.type );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08268
train
v1
Schema: shipments (alias: vnob)(status, date, amount, name) products(id, name, value, code) Task: Find value from shipments where status appears in products entries with matching level. SQL:
SELECT value FROM shipments AS vnob WHERE status IN ( SELECT status FROM products AS nad WHERE nad.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08269
train
v3
Schema: managers (alias: hac)(status, name, salary, date) projects(date, type, name, status) Task: Retrieve amount from managers with amount above the MAX(amount) of projects rows sharing the same code. SQL:
SELECT amount FROM managers AS hac WHERE amount > ( SELECT MAX(amount) FROM projects AS uliv WHERE uliv.code = hac.code );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "hac", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08270
train
v1
Schema: sales (alias: cif)(value, salary, id, name) requests(amount, status, salary, code) Task: Select amount from sales where code exists in requests for the same type. SQL:
SELECT amount FROM sales AS cif WHERE code IN ( SELECT code FROM requests AS ejof WHERE ejof.type = cif.type );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08271
train
v3
Schema: regions (alias: okiv)(date, level, value, name) categories(id, code, amount, level) Task: Retrieve code from regions with amount above the COUNT(amount) of categories rows sharing the same code. SQL:
SELECT code FROM regions AS okiv WHERE amount > ( SELECT COUNT(amount) FROM categories AS egiv WHERE egiv.code = okiv.code );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08272
train
v2
Schema: requests (alias: ejof)(salary, status, level, value) accounts(level, salary, value, code) Task: Find salary from requests where a matching record exists in accounts with the same id. SQL:
SELECT salary FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = ejof.id );
{ "outer_table": "requests", "inner_table": "accounts", "outer_alias": "ejof", "inner_alias": "jac", "proj_col": "salary", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08273
train
v3
Schema: shipments (alias: vnob)(salary, amount, id, type) accounts(value, amount, status, type) Task: Find value from shipments where value exceeds the minimum amount from accounts for the same id. SQL:
SELECT value FROM shipments AS vnob WHERE value > ( SELECT MIN(amount) FROM accounts AS jac WHERE jac.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "accounts", "outer_alias": "vnob", "inner_alias": "jac", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08274
train
v1
Schema: shipments (alias: vnob)(name, code, status, id) employees(date, salary, code, status) Task: Select amount from shipments where status exists in employees for the same code. SQL:
SELECT amount FROM shipments AS vnob WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "amount", "filter_col": "status", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08275
train
v1
Schema: regions (alias: okiv)(code, status, type, salary) schedules(type, amount, salary, name) Task: Select name from regions where status exists in schedules for the same code. SQL:
SELECT name FROM regions AS okiv WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.code = okiv.code );
{ "outer_table": "regions", "inner_table": "schedules", "outer_alias": "okiv", "inner_alias": "vmob", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08276
train
v1
Schema: shipments (alias: vnob)(type, amount, code, salary) departments(level, status, salary, type) Task: Select salary from shipments where code exists in departments for the same level. SQL:
SELECT salary FROM shipments AS vnob WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "salary", "filter_col": "code", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08277
train
v3
Schema: products (alias: nad)(id, name, code, date) tasks(amount, salary, name, code) Task: Find value from products where value exceeds the average amount from tasks for the same status. SQL:
SELECT value FROM products AS nad WHERE value > ( SELECT AVG(amount) FROM tasks AS znob WHERE znob.status = nad.status );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08278
train
v3
Schema: requests (alias: ejof)(code, status, name, level) transactions(name, id, value, status) Task: Retrieve amount from requests with salary above the COUNT(amount) of transactions rows sharing the same code. SQL:
SELECT amount FROM requests AS ejof WHERE salary > ( SELECT COUNT(amount) FROM transactions AS gev WHERE gev.code = ejof.code );
{ "outer_table": "requests", "inner_table": "transactions", "outer_alias": "ejof", "inner_alias": "gev", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08279
train
v3
Schema: customers (alias: lex)(date, value, id, status) requests(type, code, salary, id) Task: Retrieve id from customers with salary above the SUM(amount) of requests rows sharing the same status. SQL:
SELECT id FROM customers AS lex WHERE salary > ( SELECT SUM(amount) FROM requests AS ejof WHERE ejof.status = lex.status );
{ "outer_table": "customers", "inner_table": "requests", "outer_alias": "lex", "inner_alias": "ejof", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08280
train
v2
Schema: managers (alias: hac)(id, type, date, amount) transactions(type, name, salary, id) Task: Retrieve id from managers that have at least one corresponding entry in transactions sharing the same level. SQL:
SELECT id FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = hac.level );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "id", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08281
train
v2
Schema: employees (alias: bev)(name, level, id, value) regions(level, status, value, id) Task: Retrieve salary from employees that have at least one corresponding entry in regions sharing the same id. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = bev.id );
{ "outer_table": "employees", "inner_table": "regions", "outer_alias": "bev", "inner_alias": "okiv", "proj_col": "salary", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08282
train
v1
Schema: items (alias: ikob)(id, name, date, type) branches(status, amount, value, id) Task: Select salary from items where id exists in branches for the same id. SQL:
SELECT salary FROM items AS ikob WHERE id IN ( SELECT id FROM branches AS agov WHERE agov.id = ikob.id );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "salary", "filter_col": "id", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08283
train
v3
Schema: transactions (alias: gev)(type, name, level, status) products(id, status, type, code) Task: Retrieve code from transactions with value above the AVG(salary) of products rows sharing the same status. SQL:
SELECT code FROM transactions AS gev WHERE value > ( SELECT AVG(salary) FROM products AS nad WHERE nad.status = gev.status );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08284
train
v1
Schema: shipments (alias: vnob)(name, level, status, value) tasks(type, name, date, salary) Task: Find name from shipments where level appears in tasks entries with matching status. SQL:
SELECT name FROM shipments AS vnob WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "tasks", "outer_alias": "vnob", "inner_alias": "znob", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08285
train
v3
Schema: tasks (alias: znob)(type, status, level, amount) customers(id, name, value, salary) Task: Retrieve name from tasks with salary above the AVG(amount) of customers rows sharing the same type. SQL:
SELECT name FROM tasks AS znob WHERE salary > ( SELECT AVG(amount) FROM customers AS lex WHERE lex.type = znob.type );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "znob", "inner_alias": "lex", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08286
train
v2
Schema: customers (alias: lex)(code, amount, id, date) schedules(id, date, amount, status) Task: Retrieve id from customers that have at least one corresponding entry in schedules sharing the same status. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = lex.status );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "id", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08287
train
v3
Schema: invoices (alias: fal)(value, salary, code, amount) schedules(type, amount, date, code) Task: Retrieve value from invoices with amount above the SUM(value) of schedules rows sharing the same code. SQL:
SELECT value FROM invoices AS fal WHERE amount > ( SELECT SUM(value) FROM schedules AS vmob WHERE vmob.code = fal.code );
{ "outer_table": "invoices", "inner_table": "schedules", "outer_alias": "fal", "inner_alias": "vmob", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08288
train
v1
Schema: managers (alias: hac)(code, salary, amount, level) requests(salary, code, value, date) Task: Select amount from managers where code exists in requests for the same level. SQL:
SELECT amount FROM managers AS hac WHERE code IN ( SELECT code FROM requests AS ejof WHERE ejof.level = hac.level );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "code", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08289
train
v2
Schema: departments (alias: dov)(level, type, code, date) branches(status, amount, name, level) Task: Retrieve id from departments that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = dov.code );
{ "outer_table": "departments", "inner_table": "branches", "outer_alias": "dov", "inner_alias": "agov", "proj_col": "id", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08290
train
v1
Schema: shipments (alias: vnob)(amount, id, value, status) departments(salary, status, type, id) Task: Select salary from shipments where code exists in departments for the same code. SQL:
SELECT salary FROM shipments AS vnob WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08291
train
v2
Schema: requests (alias: ejof)(amount, code, salary, name) products(level, value, amount, type) Task: Find code from requests where a matching record exists in products with the same status. SQL:
SELECT code FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = ejof.status );
{ "outer_table": "requests", "inner_table": "products", "outer_alias": "ejof", "inner_alias": "nad", "proj_col": "code", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08292
train
v1
Schema: employees (alias: bev)(value, salary, amount, code) transactions(amount, value, salary, type) Task: Select value from employees where id exists in transactions for the same type. SQL:
SELECT value FROM employees AS bev WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.type = bev.type );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "bev", "inner_alias": "gev", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08293
train
v2
Schema: tasks (alias: znob)(amount, value, name, date) orders(code, amount, salary, type) Task: Find name from tasks where a matching record exists in orders with the same level. SQL:
SELECT name FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = znob.level );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "name", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08294
train
v1
Schema: regions (alias: okiv)(status, amount, id, type) requests(status, salary, name, amount) Task: Find code from regions where status appears in requests entries with matching level. SQL:
SELECT code FROM regions AS okiv WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.level = okiv.level );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "code", "filter_col": "status", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08295
train
v2
Schema: categories (alias: egiv)(code, status, salary, date) items(amount, code, value, id) Task: Find value from categories where a matching record exists in items with the same level. SQL:
SELECT value FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = egiv.level );
{ "outer_table": "categories", "inner_table": "items", "outer_alias": "egiv", "inner_alias": "ikob", "proj_col": "value", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08296
train
v1
Schema: departments (alias: dov)(id, value, salary, name) staff(value, date, amount, salary) Task: Retrieve name from departments whose code is found in staff rows where status matches the outer record. SQL:
SELECT name FROM departments AS dov WHERE code IN ( SELECT code FROM staff AS xnob WHERE xnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "staff", "outer_alias": "dov", "inner_alias": "xnob", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08297
train
v1
Schema: accounts (alias: jac)(name, status, salary, code) categories(amount, date, id, salary) Task: Find name from accounts where code appears in categories entries with matching id. SQL:
SELECT name FROM accounts AS jac WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.id = jac.id );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "jac", "inner_alias": "egiv", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08298
train
v1
Schema: requests (alias: ejof)(value, type, id, status) sales(level, date, id, name) Task: Find id from requests where status appears in sales entries with matching id. SQL:
SELECT id FROM requests AS ejof WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.id = ejof.id );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08299
train