variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v2
Schema: transactions (alias: gev)(value, date, name, status) staff(level, salary, date, type) Task: Retrieve name from transactions that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "name", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06700
train
v2
Schema: managers (alias: hac)(code, status, value, id) shipments(date, id, name, status) Task: Find name from managers where a matching record exists in shipments with the same code. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = hac.code );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "hac", "inner_alias": "vnob", "proj_col": "name", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06701
train
v2
Schema: tasks (alias: znob)(id, value, level, amount) categories(level, name, type, value) Task: Retrieve salary from tasks that have at least one corresponding entry in categories sharing the same id. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.id = znob.id );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "salary", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06702
train
v3
Schema: invoices (alias: fal)(name, date, id, status) shipments(id, type, status, code) Task: Find id from invoices where value exceeds the average salary from shipments for the same status. SQL:
SELECT id FROM invoices AS fal WHERE value > ( SELECT AVG(salary) FROM shipments AS vnob WHERE vnob.status = fal.status );
{ "outer_table": "invoices", "inner_table": "shipments", "outer_alias": "fal", "inner_alias": "vnob", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06703
train
v1
Schema: customers (alias: lex)(type, date, name, level) projects(type, name, amount, code) Task: Select value from customers where level exists in projects for the same level. SQL:
SELECT value FROM customers AS lex WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.level = lex.level );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "value", "filter_col": "level", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06704
train
v3
Schema: employees (alias: bev)(name, salary, value, level) shipments(salary, date, status, value) Task: Retrieve id from employees with salary above the COUNT(amount) of shipments rows sharing the same level. SQL:
SELECT id FROM employees AS bev WHERE salary > ( SELECT COUNT(amount) FROM shipments AS vnob WHERE vnob.level = bev.level );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06705
train
v3
Schema: managers (alias: hac)(salary, date, name, id) invoices(status, name, date, salary) Task: Retrieve value from managers with value above the SUM(salary) of invoices rows sharing the same type. SQL:
SELECT value FROM managers AS hac WHERE value > ( SELECT SUM(salary) FROM invoices AS fal WHERE fal.type = hac.type );
{ "outer_table": "managers", "inner_table": "invoices", "outer_alias": "hac", "inner_alias": "fal", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06706
train
v3
Schema: invoices (alias: fal)(status, amount, type, value) categories(code, date, status, salary) Task: Find name from invoices where salary exceeds the total amount from categories for the same level. SQL:
SELECT name FROM invoices AS fal WHERE salary > ( SELECT SUM(amount) FROM categories AS egiv WHERE egiv.level = fal.level );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06707
train
v1
Schema: invoices (alias: fal)(date, code, id, type) transactions(level, type, salary, name) Task: Select amount from invoices where code exists in transactions for the same type. SQL:
SELECT amount FROM invoices AS fal WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.type = fal.type );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06708
train
v3
Schema: regions (alias: okiv)(level, salary, type, name) tasks(date, id, level, value) Task: Find amount from regions where value exceeds the maximum amount from tasks for the same type. SQL:
SELECT amount FROM regions AS okiv WHERE value > ( SELECT MAX(amount) FROM tasks AS znob WHERE znob.type = okiv.type );
{ "outer_table": "regions", "inner_table": "tasks", "outer_alias": "okiv", "inner_alias": "znob", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06709
train
v2
Schema: staff (alias: xnob)(amount, type, id, status) accounts(id, value, level, code) Task: Find id from staff where a matching record exists in accounts with the same status. SQL:
SELECT id FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = xnob.status );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "id", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06710
train
v2
Schema: invoices (alias: fal)(name, level, value, date) schedules(type, level, amount, id) Task: Retrieve salary from invoices that have at least one corresponding entry in schedules sharing the same type. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "schedules", "outer_alias": "fal", "inner_alias": "vmob", "proj_col": "salary", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06711
train
v2
Schema: regions (alias: okiv)(date, code, salary, name) invoices(type, date, level, amount) Task: Find name from regions where a matching record exists in invoices with the same status. SQL:
SELECT name FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.status = okiv.status );
{ "outer_table": "regions", "inner_table": "invoices", "outer_alias": "okiv", "inner_alias": "fal", "proj_col": "name", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06712
train
v3
Schema: items (alias: ikob)(id, level, name, date) tasks(amount, date, type, value) Task: Find amount from items where amount exceeds the minimum salary from tasks for the same id. SQL:
SELECT amount FROM items AS ikob WHERE amount > ( SELECT MIN(salary) FROM tasks AS znob WHERE znob.id = ikob.id );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06713
train
v1
Schema: invoices (alias: fal)(date, id, status, type) requests(level, type, id, amount) Task: Find code from invoices where status appears in requests entries with matching level. SQL:
SELECT code FROM invoices AS fal WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.level = fal.level );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "code", "filter_col": "status", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06714
train
v2
Schema: schedules (alias: vmob)(name, value, amount, level) departments(name, date, id, amount) Task: Find id from schedules where a matching record exists in departments with the same id. SQL:
SELECT id FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "vmob", "inner_alias": "dov", "proj_col": "id", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06715
train
v3
Schema: schedules (alias: vmob)(salary, amount, id, value) products(date, value, level, name) Task: Find code from schedules where amount exceeds the total value from products for the same code. SQL:
SELECT code FROM schedules AS vmob WHERE amount > ( SELECT SUM(value) FROM products AS nad WHERE nad.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06716
train
v1
Schema: sales (alias: cif)(salary, status, id, code) invoices(status, name, id, type) Task: Select salary from sales where id exists in invoices for the same level. SQL:
SELECT salary FROM sales AS cif WHERE id IN ( SELECT id FROM invoices AS fal WHERE fal.level = cif.level );
{ "outer_table": "sales", "inner_table": "invoices", "outer_alias": "cif", "inner_alias": "fal", "proj_col": "salary", "filter_col": "id", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06717
train
v3
Schema: tasks (alias: znob)(type, amount, status, id) shipments(name, code, type, status) Task: Find amount from tasks where amount exceeds the minimum amount from shipments for the same id. SQL:
SELECT amount FROM tasks AS znob WHERE amount > ( SELECT MIN(amount) FROM shipments AS vnob WHERE vnob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06718
train
v3
Schema: transactions (alias: gev)(code, amount, status, level) requests(value, name, status, amount) Task: Retrieve salary from transactions with value above the COUNT(salary) of requests rows sharing the same level. SQL:
SELECT salary FROM transactions AS gev WHERE value > ( SELECT COUNT(salary) FROM requests AS ejof WHERE ejof.level = gev.level );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06719
train
v3
Schema: managers (alias: hac)(id, value, name, level) items(code, date, name, level) Task: Retrieve code from managers with salary above the MIN(salary) of items rows sharing the same status. SQL:
SELECT code FROM managers AS hac WHERE salary > ( SELECT MIN(salary) FROM items AS ikob WHERE ikob.status = hac.status );
{ "outer_table": "managers", "inner_table": "items", "outer_alias": "hac", "inner_alias": "ikob", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06720
train
v1
Schema: departments (alias: dov)(code, id, salary, amount) shipments(amount, id, code, name) Task: Select code from departments where type exists in shipments for the same status. SQL:
SELECT code FROM departments AS dov WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06721
train
v3
Schema: orders (alias: kab)(date, type, salary, name) customers(salary, level, id, code) Task: Retrieve code from orders with value above the MAX(amount) of customers rows sharing the same type. SQL:
SELECT code FROM orders AS kab WHERE value > ( SELECT MAX(amount) FROM customers AS lex WHERE lex.type = kab.type );
{ "outer_table": "orders", "inner_table": "customers", "outer_alias": "kab", "inner_alias": "lex", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06722
train
v1
Schema: accounts (alias: jac)(date, code, level, type) products(amount, code, date, name) Task: Find amount from accounts where status appears in products entries with matching id. SQL:
SELECT amount FROM accounts AS jac WHERE status IN ( SELECT status FROM products AS nad WHERE nad.id = jac.id );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "jac", "inner_alias": "nad", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06723
train
v2
Schema: employees (alias: bev)(salary, name, value, amount) orders(value, code, level, status) Task: Retrieve salary from employees that have at least one corresponding entry in orders sharing the same id. SQL:
SELECT salary 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": "salary", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06724
train
v2
Schema: projects (alias: uliv)(id, name, date, salary) regions(salary, name, date, level) Task: Retrieve id from projects that have at least one corresponding entry in regions sharing the same status. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = uliv.status );
{ "outer_table": "projects", "inner_table": "regions", "outer_alias": "uliv", "inner_alias": "okiv", "proj_col": "id", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06725
train
v1
Schema: regions (alias: okiv)(level, date, type, amount) schedules(amount, level, type, salary) Task: Retrieve name from regions whose status is found in schedules rows where level matches the outer record. SQL:
SELECT name FROM regions AS okiv WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "schedules", "outer_alias": "okiv", "inner_alias": "vmob", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06726
train
v2
Schema: items (alias: ikob)(value, name, code, salary) invoices(type, value, code, amount) Task: Retrieve code from items that have at least one corresponding entry in invoices sharing the same type. SQL:
SELECT code FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = ikob.type );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "code", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06727
train
v3
Schema: branches (alias: agov)(date, value, salary, level) customers(type, salary, name, value) Task: Retrieve amount from branches with value above the SUM(salary) of customers rows sharing the same code. SQL:
SELECT amount FROM branches AS agov WHERE value > ( SELECT SUM(salary) FROM customers AS lex WHERE lex.code = agov.code );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06728
train
v1
Schema: departments (alias: dov)(status, value, salary, id) requests(status, level, date, name) Task: Retrieve id from departments whose type is found in requests rows where level matches the outer record. SQL:
SELECT id FROM departments AS dov WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.level = dov.level );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06729
train
v3
Schema: customers (alias: lex)(salary, amount, date, status) managers(code, name, value, id) Task: Find salary from customers where value exceeds the maximum value from managers for the same code. SQL:
SELECT salary FROM customers AS lex WHERE value > ( SELECT MAX(value) FROM managers AS hac WHERE hac.code = lex.code );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06730
train
v3
Schema: regions (alias: okiv)(name, code, date, status) items(level, status, value, amount) Task: Retrieve value from regions with value above the MAX(salary) of items rows sharing the same id. SQL:
SELECT value FROM regions AS okiv WHERE value > ( SELECT MAX(salary) FROM items AS ikob WHERE ikob.id = okiv.id );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06731
train
v2
Schema: requests (alias: ejof)(type, name, date, id) categories(status, level, salary, id) Task: Find salary from requests where a matching record exists in categories with the same code. SQL:
SELECT salary FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "categories", "outer_alias": "ejof", "inner_alias": "egiv", "proj_col": "salary", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06732
train
v3
Schema: managers (alias: hac)(code, type, date, level) branches(date, code, id, salary) Task: Retrieve name from managers with amount above the SUM(amount) of branches rows sharing the same type. SQL:
SELECT name FROM managers AS hac WHERE amount > ( SELECT SUM(amount) FROM branches AS agov WHERE agov.type = hac.type );
{ "outer_table": "managers", "inner_table": "branches", "outer_alias": "hac", "inner_alias": "agov", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06733
train
v2
Schema: staff (alias: xnob)(code, level, salary, value) products(status, amount, level, date) Task: Find amount from staff where a matching record exists in products with the same code. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = xnob.code );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "amount", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06734
train
v1
Schema: staff (alias: xnob)(name, level, type, id) categories(level, id, code, status) Task: Retrieve salary from staff whose id is found in categories rows where level matches the outer record. SQL:
SELECT salary FROM staff AS xnob WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.level = xnob.level );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "id", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06735
train
v3
Schema: staff (alias: xnob)(type, level, code, name) employees(value, salary, date, id) Task: Retrieve amount from staff with salary above the SUM(amount) of employees rows sharing the same level. SQL:
SELECT amount FROM staff AS xnob WHERE salary > ( SELECT SUM(amount) FROM employees AS bev WHERE bev.level = xnob.level );
{ "outer_table": "staff", "inner_table": "employees", "outer_alias": "xnob", "inner_alias": "bev", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06736
train
v1
Schema: managers (alias: hac)(id, level, amount, type) regions(value, code, salary, status) Task: Select id from managers where level exists in regions for the same status. SQL:
SELECT id FROM managers AS hac WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.status = hac.status );
{ "outer_table": "managers", "inner_table": "regions", "outer_alias": "hac", "inner_alias": "okiv", "proj_col": "id", "filter_col": "level", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06737
train
v3
Schema: requests (alias: ejof)(status, name, level, type) branches(date, type, code, status) Task: Find id from requests where amount exceeds the count of salary from branches for the same status. SQL:
SELECT id FROM requests AS ejof WHERE amount > ( SELECT COUNT(salary) FROM branches AS agov WHERE agov.status = ejof.status );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06738
train
v2
Schema: staff (alias: xnob)(status, salary, code, level) items(type, amount, date, value) Task: Retrieve salary from staff that have at least one corresponding entry in items sharing the same level. SQL:
SELECT salary FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = xnob.level );
{ "outer_table": "staff", "inner_table": "items", "outer_alias": "xnob", "inner_alias": "ikob", "proj_col": "salary", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06739
train
v3
Schema: invoices (alias: fal)(type, date, status, code) accounts(value, date, level, status) Task: Find value from invoices where value exceeds the maximum value from accounts for the same code. SQL:
SELECT value FROM invoices AS fal WHERE value > ( SELECT MAX(value) FROM accounts AS jac WHERE jac.code = fal.code );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06740
train
v2
Schema: regions (alias: okiv)(type, status, date, value) requests(type, name, status, salary) Task: Find salary from regions where a matching record exists in requests with the same status. SQL:
SELECT salary FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = okiv.status );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "salary", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06741
train
v1
Schema: categories (alias: egiv)(status, code, salary, amount) schedules(code, level, name, id) Task: Find amount from categories where id appears in schedules entries with matching status. SQL:
SELECT amount FROM categories AS egiv WHERE id IN ( SELECT id FROM schedules AS vmob WHERE vmob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "egiv", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06742
train
v1
Schema: managers (alias: hac)(date, name, code, status) staff(value, status, type, id) Task: Find code from managers where code appears in staff entries with matching code. SQL:
SELECT code FROM managers AS hac WHERE code IN ( SELECT code FROM staff AS xnob WHERE xnob.code = hac.code );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "hac", "inner_alias": "xnob", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06743
train
v2
Schema: invoices (alias: fal)(type, amount, status, name) departments(id, type, status, name) Task: Find amount from invoices where a matching record exists in departments with the same level. SQL:
SELECT amount FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = fal.level );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "amount", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06744
train
v2
Schema: invoices (alias: fal)(level, type, salary, date) accounts(value, level, status, date) Task: Retrieve value from invoices that have at least one corresponding entry in accounts sharing the same id. SQL:
SELECT value FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = fal.id );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "value", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06745
train
v1
Schema: categories (alias: egiv)(amount, value, code, level) invoices(salary, amount, date, name) Task: Retrieve code from categories whose status is found in invoices rows where id matches the outer record. SQL:
SELECT code FROM categories AS egiv WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.id = egiv.id );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "code", "filter_col": "status", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06746
train
v1
Schema: invoices (alias: fal)(type, amount, id, status) branches(name, salary, date, code) Task: Retrieve amount from invoices whose level is found in branches rows where code matches the outer record. SQL:
SELECT amount FROM invoices AS fal WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.code = fal.code );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06747
train
v3
Schema: customers (alias: lex)(level, amount, date, code) orders(level, code, type, id) Task: Find value from customers where amount exceeds the total salary from orders for the same code. SQL:
SELECT value FROM customers AS lex WHERE amount > ( SELECT SUM(salary) FROM orders AS kab WHERE kab.code = lex.code );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "lex", "inner_alias": "kab", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06748
train
v2
Schema: customers (alias: lex)(type, amount, id, date) staff(salary, amount, id, status) Task: Find amount from customers where a matching record exists in staff with the same type. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.type = lex.type );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "amount", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06749
train
v1
Schema: customers (alias: lex)(code, id, date, salary) projects(salary, date, id, code) Task: Find code from customers where level appears in projects entries with matching level. SQL:
SELECT code FROM customers AS lex WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.level = lex.level );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "code", "filter_col": "level", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06750
train
v3
Schema: schedules (alias: vmob)(date, code, amount, name) managers(name, code, type, value) Task: Retrieve salary from schedules with amount above the AVG(amount) of managers rows sharing the same status. SQL:
SELECT salary FROM schedules AS vmob WHERE amount > ( SELECT AVG(amount) FROM managers AS hac WHERE hac.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06751
train
v1
Schema: sales (alias: cif)(level, type, salary, id) staff(amount, value, type, status) Task: Retrieve id from sales whose id is found in staff rows where status matches the outer record. SQL:
SELECT id FROM sales AS cif WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.status = cif.status );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "id", "filter_col": "id", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06752
train
v3
Schema: projects (alias: uliv)(value, code, id, level) departments(id, type, code, date) Task: Retrieve name from projects with amount above the MIN(amount) of departments rows sharing the same level. SQL:
SELECT name FROM projects AS uliv WHERE amount > ( SELECT MIN(amount) FROM departments AS dov WHERE dov.level = uliv.level );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "uliv", "inner_alias": "dov", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06753
train
v3
Schema: invoices (alias: fal)(amount, value, salary, level) items(salary, value, amount, type) Task: Retrieve id from invoices with salary above the AVG(amount) of items rows sharing the same id. SQL:
SELECT id FROM invoices AS fal WHERE salary > ( SELECT AVG(amount) FROM items AS ikob WHERE ikob.id = fal.id );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "fal", "inner_alias": "ikob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06754
train
v1
Schema: requests (alias: ejof)(name, id, date, level) tasks(id, level, amount, value) Task: Retrieve amount from requests whose code is found in tasks rows where status matches the outer record. SQL:
SELECT amount FROM requests AS ejof WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "amount", "filter_col": "code", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06755
train
v2
Schema: orders (alias: kab)(date, code, salary, status) employees(type, code, level, value) Task: Find salary from orders where a matching record exists in employees with the same status. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = kab.status );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "salary", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06756
train
v1
Schema: transactions (alias: gev)(name, id, code, level) categories(status, salary, id, value) Task: Select id from transactions where level exists in categories for the same id. SQL:
SELECT id FROM transactions AS gev WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.id = gev.id );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "id", "filter_col": "level", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06757
train
v1
Schema: requests (alias: ejof)(value, name, amount, salary) orders(code, id, type, name) Task: Retrieve code from requests whose status is found in orders rows where code matches the outer record. SQL:
SELECT code FROM requests AS ejof WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.code = ejof.code );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "code", "filter_col": "status", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06758
train
v2
Schema: staff (alias: xnob)(type, salary, value, code) categories(id, salary, date, value) Task: Retrieve code from staff that have at least one corresponding entry in categories sharing the same code. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "code", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06759
train
v1
Schema: schedules (alias: vmob)(value, code, name, id) shipments(salary, id, name, level) Task: Retrieve name from schedules whose code is found in shipments rows where id matches the outer record. SQL:
SELECT name FROM schedules AS vmob WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "shipments", "outer_alias": "vmob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06760
train
v1
Schema: requests (alias: ejof)(code, id, type, date) shipments(value, type, date, id) Task: Find name from requests where code appears in shipments entries with matching level. SQL:
SELECT name FROM requests AS ejof WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.level = ejof.level );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ejof", "inner_alias": "vnob", "proj_col": "name", "filter_col": "code", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06761
train
v1
Schema: staff (alias: xnob)(id, status, salary, value) customers(name, salary, level, amount) Task: Select id from staff where type exists in customers for the same id. SQL:
SELECT id FROM staff AS xnob WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.id = xnob.id );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "id", "filter_col": "type", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06762
train
v2
Schema: requests (alias: ejof)(salary, type, level, date) transactions(code, date, amount, value) Task: Find salary from requests where a matching record exists in transactions with the same id. SQL:
SELECT salary FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = ejof.id );
{ "outer_table": "requests", "inner_table": "transactions", "outer_alias": "ejof", "inner_alias": "gev", "proj_col": "salary", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06763
train
v3
Schema: employees (alias: bev)(status, id, type, name) customers(id, date, name, status) Task: Find value from employees where value exceeds the average value from customers for the same type. SQL:
SELECT value FROM employees AS bev WHERE value > ( SELECT AVG(value) FROM customers AS lex WHERE lex.type = bev.type );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "bev", "inner_alias": "lex", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06764
train
v2
Schema: orders (alias: kab)(level, name, amount, id) employees(salary, status, amount, id) Task: Find value from orders where a matching record exists in employees with the same id. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = kab.id );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "value", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06765
train
v1
Schema: invoices (alias: fal)(salary, value, status, date) branches(amount, value, name, type) Task: Retrieve value from invoices whose id is found in branches rows where code matches the outer record. SQL:
SELECT value FROM invoices AS fal WHERE id IN ( SELECT id FROM branches AS agov WHERE agov.code = fal.code );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "value", "filter_col": "id", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06766
train
v3
Schema: transactions (alias: gev)(date, salary, status, id) employees(type, level, amount, value) Task: Retrieve amount from transactions with salary above the SUM(amount) of employees rows sharing the same type. SQL:
SELECT amount FROM transactions AS gev WHERE salary > ( SELECT SUM(amount) FROM employees AS bev WHERE bev.type = gev.type );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "gev", "inner_alias": "bev", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06767
train
v2
Schema: departments (alias: dov)(type, amount, status, name) staff(status, type, amount, name) Task: Retrieve id from departments that have at least one corresponding entry in staff sharing the same code. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = dov.code );
{ "outer_table": "departments", "inner_table": "staff", "outer_alias": "dov", "inner_alias": "xnob", "proj_col": "id", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06768
train
v2
Schema: employees (alias: bev)(id, date, value, salary) departments(level, id, value, name) Task: Find value from employees where a matching record exists in departments with the same code. SQL:
SELECT value FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = bev.code );
{ "outer_table": "employees", "inner_table": "departments", "outer_alias": "bev", "inner_alias": "dov", "proj_col": "value", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06769
train
v1
Schema: requests (alias: ejof)(type, value, name, code) accounts(date, status, name, salary) Task: Select amount from requests where type exists in accounts for the same type. SQL:
SELECT amount FROM requests AS ejof WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.type = ejof.type );
{ "outer_table": "requests", "inner_table": "accounts", "outer_alias": "ejof", "inner_alias": "jac", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06770
train
v2
Schema: departments (alias: dov)(id, salary, level, status) categories(code, date, type, salary) Task: Find code from departments where a matching record exists in categories with the same id. SQL:
SELECT code FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.id = dov.id );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dov", "inner_alias": "egiv", "proj_col": "code", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06771
train
v3
Schema: items (alias: ikob)(value, name, amount, date) invoices(id, salary, status, amount) Task: Retrieve id from items with amount above the SUM(value) of invoices rows sharing the same code. SQL:
SELECT id FROM items AS ikob WHERE amount > ( SELECT SUM(value) FROM invoices AS fal WHERE fal.code = ikob.code );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06772
train
v2
Schema: requests (alias: ejof)(amount, name, status, date) branches(date, level, id, value) Task: Find id from requests where a matching record exists in branches with the same level. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.level = ejof.level );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "id", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06773
train
v3
Schema: invoices (alias: fal)(status, amount, level, name) regions(name, level, value, amount) Task: Retrieve name from invoices with value above the MAX(salary) of regions rows sharing the same type. SQL:
SELECT name FROM invoices AS fal WHERE value > ( SELECT MAX(salary) FROM regions AS okiv WHERE okiv.type = fal.type );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06774
train
v1
Schema: branches (alias: agov)(type, value, level, name) regions(level, value, date, id) Task: Find amount from branches where type appears in regions entries with matching type. SQL:
SELECT amount FROM branches AS agov WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.type = agov.type );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06775
train
v3
Schema: projects (alias: uliv)(id, level, type, amount) sales(value, amount, status, date) Task: Find code from projects where salary exceeds the count of amount from sales for the same status. SQL:
SELECT code FROM projects AS uliv WHERE salary > ( SELECT COUNT(amount) FROM sales AS cif WHERE cif.status = uliv.status );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06776
train
v2
Schema: regions (alias: okiv)(date, value, amount, type) shipments(id, date, amount, salary) Task: Find amount from regions where a matching record exists in shipments with the same id. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = okiv.id );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "okiv", "inner_alias": "vnob", "proj_col": "amount", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06777
train
v1
Schema: orders (alias: kab)(id, value, status, code) employees(value, salary, id, amount) Task: Select name from orders where code exists in employees for the same status. SQL:
SELECT name FROM orders AS kab WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.status = kab.status );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06778
train
v2
Schema: tasks (alias: znob)(salary, level, date, type) sales(date, salary, level, id) Task: Find code from tasks where a matching record exists in sales with the same type. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = znob.type );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "znob", "inner_alias": "cif", "proj_col": "code", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06779
train
v1
Schema: projects (alias: uliv)(amount, name, type, value) items(code, value, type, date) Task: Find name from projects where id appears in items entries with matching code. SQL:
SELECT name FROM projects AS uliv WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06780
train
v3
Schema: staff (alias: xnob)(level, salary, value, id) orders(code, id, value, name) Task: Retrieve salary from staff with amount above the MAX(salary) of orders rows sharing the same type. SQL:
SELECT salary FROM staff AS xnob WHERE amount > ( SELECT MAX(salary) FROM orders AS kab WHERE kab.type = xnob.type );
{ "outer_table": "staff", "inner_table": "orders", "outer_alias": "xnob", "inner_alias": "kab", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06781
train
v1
Schema: projects (alias: uliv)(code, salary, name, level) shipments(code, type, status, name) Task: Retrieve name from projects whose level is found in shipments rows where level matches the outer record. SQL:
SELECT name FROM projects AS uliv WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "shipments", "outer_alias": "uliv", "inner_alias": "vnob", "proj_col": "name", "filter_col": "level", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06782
train
v2
Schema: staff (alias: xnob)(value, level, amount, status) categories(type, code, value, status) Task: Find value from staff where a matching record exists in categories with the same code. SQL:
SELECT value FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "value", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06783
train
v1
Schema: employees (alias: bev)(type, status, date, name) schedules(name, level, date, amount) Task: Find id from employees where type appears in schedules entries with matching type. SQL:
SELECT id FROM employees AS bev WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.type = bev.type );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "id", "filter_col": "type", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06784
train
v2
Schema: branches (alias: agov)(status, level, value, salary) regions(type, salary, id, value) Task: Retrieve amount from branches that have at least one corresponding entry in regions sharing the same type. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = agov.type );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "amount", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06785
train
v1
Schema: orders (alias: kab)(code, type, status, id) sales(level, date, status, amount) Task: Retrieve salary from orders whose type is found in sales rows where status matches the outer record. SQL:
SELECT salary FROM orders AS kab WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.status = kab.status );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "salary", "filter_col": "type", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06786
train
v2
Schema: items (alias: ikob)(status, id, salary, type) categories(level, id, type, date) Task: Retrieve amount from items that have at least one corresponding entry in categories sharing the same type. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = ikob.type );
{ "outer_table": "items", "inner_table": "categories", "outer_alias": "ikob", "inner_alias": "egiv", "proj_col": "amount", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06787
train
v1
Schema: regions (alias: okiv)(code, id, value, amount) orders(amount, salary, code, date) Task: Select id from regions where type exists in orders for the same code. SQL:
SELECT id FROM regions AS okiv WHERE type IN ( SELECT type FROM orders AS kab WHERE kab.code = okiv.code );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06788
train
v3
Schema: products (alias: nad)(date, name, type, id) requests(level, id, salary, type) Task: Find name from products where salary exceeds the total value from requests for the same type. SQL:
SELECT name FROM products AS nad WHERE salary > ( SELECT SUM(value) FROM requests AS ejof WHERE ejof.type = nad.type );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06789
train
v1
Schema: sales (alias: cif)(status, value, name, amount) orders(value, code, name, level) Task: Retrieve code from sales whose type is found in orders rows where id matches the outer record. SQL:
SELECT code FROM sales AS cif WHERE type IN ( SELECT type FROM orders AS kab WHERE kab.id = cif.id );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "code", "filter_col": "type", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06790
train
v1
Schema: shipments (alias: vnob)(date, name, salary, code) requests(salary, code, name, level) Task: Select name from shipments where id exists in requests for the same code. SQL:
SELECT name FROM shipments AS vnob WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "requests", "outer_alias": "vnob", "inner_alias": "ejof", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06791
train
v1
Schema: tasks (alias: znob)(status, code, date, salary) categories(name, amount, id, code) Task: Retrieve name from tasks whose type is found in categories rows where level matches the outer record. SQL:
SELECT name FROM tasks AS znob WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.level = znob.level );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "name", "filter_col": "type", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06792
train
v1
Schema: managers (alias: hac)(salary, level, name, value) customers(date, id, status, value) Task: Find id from managers where type appears in customers entries with matching code. SQL:
SELECT id FROM managers AS hac WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.code = hac.code );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06793
train
v3
Schema: categories (alias: egiv)(name, amount, level, date) projects(value, level, name, salary) Task: Find salary from categories where value exceeds the count of value from projects for the same id. SQL:
SELECT salary FROM categories AS egiv WHERE value > ( SELECT COUNT(value) FROM projects AS uliv WHERE uliv.id = egiv.id );
{ "outer_table": "categories", "inner_table": "projects", "outer_alias": "egiv", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06794
train
v1
Schema: departments (alias: dov)(status, date, salary, level) managers(value, name, status, amount) Task: Retrieve code from departments whose id is found in managers rows where id matches the outer record. SQL:
SELECT code FROM departments AS dov WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.id = dov.id );
{ "outer_table": "departments", "inner_table": "managers", "outer_alias": "dov", "inner_alias": "hac", "proj_col": "code", "filter_col": "id", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06795
train
v1
Schema: categories (alias: egiv)(salary, level, id, amount) departments(id, name, date, type) Task: Find amount from categories where status appears in departments entries with matching type. SQL:
SELECT amount FROM categories AS egiv WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.type = egiv.type );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06796
train
v1
Schema: regions (alias: okiv)(level, value, id, name) managers(code, value, status, name) Task: Select amount from regions where id exists in managers for the same type. SQL:
SELECT amount FROM regions AS okiv WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.type = okiv.type );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "okiv", "inner_alias": "hac", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06797
train
v1
Schema: schedules (alias: vmob)(name, level, amount, code) customers(status, amount, level, code) Task: Find amount from schedules where level appears in customers entries with matching status. SQL:
SELECT amount FROM schedules AS vmob WHERE level IN ( SELECT level 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": "level", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06798
train
v1
Schema: accounts (alias: jac)(value, type, salary, id) schedules(name, amount, level, id) Task: Find value from accounts where type appears in schedules entries with matching id. SQL:
SELECT value FROM accounts AS jac WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.id = jac.id );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "value", "filter_col": "type", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06799
train