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: accounts (alias: jac)(level, salary, status, id) branches(name, date, id, code) Task: Find name from accounts where a matching record exists in branches with the same id. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = jac.id );
{ "outer_table": "accounts", "inner_table": "branches", "outer_alias": "jac", "inner_alias": "agov", "proj_col": "name", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08700
train
v1
Schema: regions (alias: okiv)(amount, name, status, code) departments(salary, code, name, id) Task: Find name from regions where code appears in departments entries with matching status. SQL:
SELECT name FROM regions AS okiv WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.status = okiv.status );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "okiv", "inner_alias": "dov", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08701
train
v3
Schema: branches (alias: agov)(status, type, name, value) staff(level, salary, id, type) Task: Retrieve salary from branches with salary above the AVG(salary) of staff rows sharing the same id. SQL:
SELECT salary FROM branches AS agov WHERE salary > ( SELECT AVG(salary) FROM staff AS xnob WHERE xnob.id = agov.id );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08702
train
v3
Schema: branches (alias: agov)(code, salary, amount, level) regions(id, code, salary, name) Task: Find value from branches where amount exceeds the average amount from regions for the same code. SQL:
SELECT value FROM branches AS agov WHERE amount > ( SELECT AVG(amount) FROM regions AS okiv WHERE okiv.code = agov.code );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08703
train
v1
Schema: requests (alias: ejof)(name, id, code, date) schedules(type, amount, value, id) Task: Find id from requests where status appears in schedules entries with matching type. SQL:
SELECT id FROM requests AS ejof WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.type = ejof.type );
{ "outer_table": "requests", "inner_table": "schedules", "outer_alias": "ejof", "inner_alias": "vmob", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08704
train
v3
Schema: projects (alias: uliv)(date, value, code, status) shipments(id, level, amount, status) Task: Retrieve salary from projects with amount above the COUNT(value) of shipments rows sharing the same level. SQL:
SELECT salary FROM projects AS uliv WHERE amount > ( SELECT COUNT(value) FROM shipments AS vnob WHERE vnob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "shipments", "outer_alias": "uliv", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08705
train
v3
Schema: employees (alias: bev)(id, code, status, level) transactions(amount, status, date, type) Task: Retrieve code from employees with value above the MAX(salary) of transactions rows sharing the same status. SQL:
SELECT code FROM employees AS bev WHERE value > ( SELECT MAX(salary) FROM transactions AS gev WHERE gev.status = bev.status );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "bev", "inner_alias": "gev", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08706
train
v2
Schema: shipments (alias: vnob)(amount, level, status, name) regions(level, status, code, value) Task: Find amount from shipments where a matching record exists in regions with the same level. SQL:
SELECT amount FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "amount", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08707
train
v3
Schema: schedules (alias: vmob)(name, salary, status, date) staff(code, name, date, salary) Task: Find name from schedules where salary exceeds the minimum value from staff for the same level. SQL:
SELECT name FROM schedules AS vmob WHERE salary > ( SELECT MIN(value) FROM staff AS xnob WHERE xnob.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08708
train
v2
Schema: accounts (alias: jac)(date, salary, value, amount) customers(code, level, type, value) Task: Retrieve code from accounts that have at least one corresponding entry in customers sharing the same status. SQL:
SELECT code FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = jac.status );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "code", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08709
train
v3
Schema: sales (alias: cif)(level, code, value, date) tasks(code, date, value, salary) Task: Find code from sales where value exceeds the maximum amount from tasks for the same id. SQL:
SELECT code FROM sales AS cif WHERE value > ( SELECT MAX(amount) FROM tasks AS znob WHERE znob.id = cif.id );
{ "outer_table": "sales", "inner_table": "tasks", "outer_alias": "cif", "inner_alias": "znob", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08710
train
v3
Schema: customers (alias: lex)(id, date, name, code) orders(code, status, level, value) Task: Find value from customers where salary exceeds the average amount from orders for the same level. SQL:
SELECT value FROM customers AS lex WHERE salary > ( SELECT AVG(amount) FROM orders AS kab WHERE kab.level = lex.level );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "lex", "inner_alias": "kab", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08711
train
v3
Schema: products (alias: nad)(date, level, salary, name) requests(level, code, name, amount) Task: Retrieve amount from products with amount above the MAX(salary) of requests rows sharing the same level. SQL:
SELECT amount FROM products AS nad WHERE amount > ( SELECT MAX(salary) FROM requests AS ejof WHERE ejof.level = nad.level );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08712
train
v1
Schema: tasks (alias: znob)(name, value, salary, level) orders(name, date, id, code) Task: Find salary from tasks where id appears in orders entries with matching level. SQL:
SELECT salary FROM tasks AS znob WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.level = znob.level );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "salary", "filter_col": "id", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08713
train
v3
Schema: items (alias: ikob)(value, name, id, type) tasks(code, type, value, date) Task: Retrieve value from items with value above the AVG(amount) of tasks rows sharing the same level. SQL:
SELECT value FROM items AS ikob WHERE value > ( SELECT AVG(amount) FROM tasks AS znob WHERE znob.level = ikob.level );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08714
train
v2
Schema: employees (alias: bev)(amount, type, level, value) orders(date, value, type, amount) Task: Find amount from employees where a matching record exists in orders with the same status. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = bev.status );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "amount", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08715
train
v3
Schema: invoices (alias: fal)(salary, amount, code, id) items(name, id, code, type) Task: Find id from invoices where salary exceeds the count of value from items for the same level. SQL:
SELECT id FROM invoices AS fal WHERE salary > ( SELECT COUNT(value) FROM items AS ikob WHERE ikob.level = fal.level );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "fal", "inner_alias": "ikob", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08716
train
v1
Schema: shipments (alias: vnob)(name, date, type, status) staff(level, value, type, salary) Task: Retrieve id from shipments whose status is found in staff rows where id matches the outer record. SQL:
SELECT id FROM shipments AS vnob WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08717
train
v3
Schema: regions (alias: okiv)(type, code, status, id) customers(amount, id, value, status) Task: Find salary from regions where salary exceeds the maximum value from customers for the same type. SQL:
SELECT salary FROM regions AS okiv WHERE salary > ( SELECT MAX(value) FROM customers AS lex WHERE lex.type = okiv.type );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08718
train
v2
Schema: orders (alias: kab)(level, amount, salary, value) staff(value, salary, amount, code) Task: Find id from orders where a matching record exists in staff with the same id. SQL:
SELECT id FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = kab.id );
{ "outer_table": "orders", "inner_table": "staff", "outer_alias": "kab", "inner_alias": "xnob", "proj_col": "id", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08719
train
v2
Schema: categories (alias: egiv)(level, code, amount, name) requests(type, date, id, name) Task: Retrieve name from categories that have at least one corresponding entry in requests sharing the same code. SQL:
SELECT name FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = egiv.code );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "egiv", "inner_alias": "ejof", "proj_col": "name", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08720
train
v2
Schema: transactions (alias: gev)(status, type, code, name) regions(value, id, date, amount) Task: Retrieve id from transactions that have at least one corresponding entry in regions sharing the same id. SQL:
SELECT id FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = gev.id );
{ "outer_table": "transactions", "inner_table": "regions", "outer_alias": "gev", "inner_alias": "okiv", "proj_col": "id", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08721
train
v1
Schema: employees (alias: bev)(date, code, type, amount) managers(level, code, value, date) Task: Select id from employees where level exists in managers for the same id. SQL:
SELECT id FROM employees AS bev WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.id = bev.id );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "bev", "inner_alias": "hac", "proj_col": "id", "filter_col": "level", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08722
train
v1
Schema: sales (alias: cif)(date, status, id, amount) branches(date, id, value, level) Task: Select code from sales where type exists in branches for the same level. SQL:
SELECT code FROM sales AS cif WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.level = cif.level );
{ "outer_table": "sales", "inner_table": "branches", "outer_alias": "cif", "inner_alias": "agov", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08723
train
v3
Schema: departments (alias: dov)(type, status, level, value) shipments(status, type, level, name) Task: Retrieve id from departments with amount above the MAX(value) of shipments rows sharing the same level. SQL:
SELECT id FROM departments AS dov WHERE amount > ( SELECT MAX(value) FROM shipments AS vnob WHERE vnob.level = dov.level );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08724
train
v3
Schema: accounts (alias: jac)(level, code, status, value) schedules(code, level, id, date) Task: Find code from accounts where salary exceeds the total value from schedules for the same type. SQL:
SELECT code FROM accounts AS jac WHERE salary > ( SELECT SUM(value) FROM schedules AS vmob WHERE vmob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08725
train
v1
Schema: categories (alias: egiv)(id, value, salary, type) projects(status, name, id, value) Task: Select salary from categories where type exists in projects for the same id. SQL:
SELECT salary FROM categories AS egiv WHERE type IN ( SELECT type 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": "type", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08726
train
v2
Schema: items (alias: ikob)(code, level, name, salary) branches(name, code, salary, status) Task: Retrieve amount from items that have at least one corresponding entry in branches sharing the same status. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = ikob.status );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "amount", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08727
train
v3
Schema: branches (alias: agov)(name, code, amount, date) staff(level, amount, id, value) Task: Retrieve amount from branches with salary above the MIN(salary) of staff rows sharing the same status. SQL:
SELECT amount FROM branches AS agov WHERE salary > ( SELECT MIN(salary) FROM staff AS xnob WHERE xnob.status = agov.status );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08728
train
v3
Schema: sales (alias: cif)(value, level, name, type) regions(status, value, level, code) Task: Retrieve code from sales with value above the MIN(salary) of regions rows sharing the same type. SQL:
SELECT code FROM sales AS cif WHERE value > ( SELECT MIN(salary) FROM regions AS okiv WHERE okiv.type = cif.type );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08729
train
v1
Schema: employees (alias: bev)(value, type, status, name) items(status, id, name, level) Task: Find salary from employees where id appears in items entries with matching status. SQL:
SELECT salary FROM employees AS bev WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.status = bev.status );
{ "outer_table": "employees", "inner_table": "items", "outer_alias": "bev", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08730
train
v2
Schema: regions (alias: okiv)(type, salary, date, status) projects(status, date, value, salary) Task: Find amount from regions where a matching record exists in projects with the same code. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = okiv.code );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "amount", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08731
train
v1
Schema: branches (alias: agov)(salary, level, status, code) items(type, status, amount, salary) Task: Find value from branches where type appears in items entries with matching type. SQL:
SELECT value FROM branches AS agov WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.type = agov.type );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "value", "filter_col": "type", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08732
train
v2
Schema: categories (alias: egiv)(value, name, amount, code) invoices(salary, id, name, type) Task: Retrieve salary from categories that have at least one corresponding entry in invoices sharing the same status. SQL:
SELECT salary FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.status = egiv.status );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "salary", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08733
train
v3
Schema: requests (alias: ejof)(salary, amount, value, name) projects(status, name, date, salary) Task: Retrieve salary from requests with value above the MAX(amount) of projects rows sharing the same code. SQL:
SELECT salary FROM requests AS ejof WHERE value > ( SELECT MAX(amount) FROM projects AS uliv WHERE uliv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08734
train
v2
Schema: departments (alias: dov)(name, code, type, date) accounts(date, value, id, level) Task: Find salary from departments where a matching record exists in accounts with the same id. SQL:
SELECT salary FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = dov.id );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "salary", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08735
train
v2
Schema: projects (alias: uliv)(date, amount, value, type) orders(type, level, code, date) Task: Find amount from projects where a matching record exists in orders with the same type. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = uliv.type );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "amount", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08736
train
v1
Schema: transactions (alias: gev)(code, date, level, value) branches(type, code, amount, id) Task: Retrieve id from transactions whose status is found in branches rows where code matches the outer record. SQL:
SELECT id FROM transactions AS gev WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.code = gev.code );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "gev", "inner_alias": "agov", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08737
train
v1
Schema: items (alias: ikob)(status, date, value, level) regions(status, value, level, code) Task: Select code from items where status exists in regions for the same status. SQL:
SELECT code FROM items AS ikob WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.status = ikob.status );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08738
train
v3
Schema: branches (alias: agov)(id, level, value, salary) staff(salary, status, type, level) Task: Retrieve salary from branches with amount above the MIN(amount) of staff rows sharing the same type. SQL:
SELECT salary FROM branches AS agov WHERE amount > ( SELECT MIN(amount) FROM staff AS xnob WHERE xnob.type = agov.type );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08739
train
v3
Schema: requests (alias: ejof)(id, value, name, type) projects(amount, name, level, salary) Task: Find code from requests where value exceeds the maximum salary from projects for the same code. SQL:
SELECT code FROM requests AS ejof WHERE value > ( SELECT MAX(salary) FROM projects AS uliv WHERE uliv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08740
train
v3
Schema: products (alias: nad)(name, date, id, level) customers(code, amount, type, salary) Task: Find amount from products where value exceeds the average value from customers for the same id. SQL:
SELECT amount FROM products AS nad WHERE value > ( SELECT AVG(value) FROM customers AS lex WHERE lex.id = nad.id );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08741
train
v1
Schema: staff (alias: xnob)(status, name, value, date) customers(name, salary, id, status) Task: Find amount from staff where status appears in customers entries with matching code. SQL:
SELECT amount FROM staff AS xnob WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.code = xnob.code );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "amount", "filter_col": "status", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08742
train
v2
Schema: managers (alias: hac)(id, status, amount, date) accounts(level, amount, status, type) Task: Retrieve amount from managers that have at least one corresponding entry in accounts sharing the same level. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = hac.level );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "amount", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08743
train
v1
Schema: requests (alias: ejof)(value, name, amount, code) categories(name, level, date, amount) Task: Find code from requests where status appears in categories entries with matching status. SQL:
SELECT code FROM requests AS ejof WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.status = ejof.status );
{ "outer_table": "requests", "inner_table": "categories", "outer_alias": "ejof", "inner_alias": "egiv", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08744
train
v3
Schema: requests (alias: ejof)(status, salary, code, id) branches(status, level, id, name) Task: Retrieve name from requests with salary above the AVG(salary) of branches rows sharing the same level. SQL:
SELECT name FROM requests AS ejof WHERE salary > ( SELECT AVG(salary) FROM branches AS agov WHERE agov.level = ejof.level );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08745
train
v2
Schema: shipments (alias: vnob)(value, status, date, salary) categories(date, name, value, amount) Task: Retrieve amount from shipments that have at least one corresponding entry in categories sharing the same type. SQL:
SELECT amount FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "categories", "outer_alias": "vnob", "inner_alias": "egiv", "proj_col": "amount", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08746
train
v1
Schema: regions (alias: okiv)(value, id, salary, amount) products(status, date, name, level) Task: Select amount from regions where status exists in products for the same id. SQL:
SELECT amount FROM regions AS okiv WHERE status IN ( SELECT status FROM products AS nad WHERE nad.id = okiv.id );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08747
train
v2
Schema: items (alias: ikob)(value, type, code, level) employees(level, id, salary, date) Task: Find code from items where a matching record exists in employees with the same status. SQL:
SELECT code FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = ikob.status );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "code", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08748
train
v3
Schema: accounts (alias: jac)(level, date, code, amount) projects(value, amount, name, salary) Task: Retrieve code from accounts with value above the AVG(salary) of projects rows sharing the same id. SQL:
SELECT code FROM accounts AS jac WHERE value > ( SELECT AVG(salary) FROM projects AS uliv WHERE uliv.id = jac.id );
{ "outer_table": "accounts", "inner_table": "projects", "outer_alias": "jac", "inner_alias": "uliv", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08749
train
v2
Schema: tasks (alias: znob)(code, amount, id, level) branches(level, code, date, type) Task: Retrieve amount from tasks that have at least one corresponding entry in branches sharing the same id. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = znob.id );
{ "outer_table": "tasks", "inner_table": "branches", "outer_alias": "znob", "inner_alias": "agov", "proj_col": "amount", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08750
train
v3
Schema: accounts (alias: jac)(salary, id, name, level) regions(type, code, status, salary) Task: Find value from accounts where salary exceeds the minimum salary from regions for the same id. SQL:
SELECT value FROM accounts AS jac WHERE salary > ( SELECT MIN(salary) FROM regions AS okiv WHERE okiv.id = jac.id );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08751
train
v3
Schema: managers (alias: hac)(level, amount, salary, value) accounts(code, level, amount, id) Task: Retrieve name from managers with amount above the AVG(amount) of accounts rows sharing the same code. SQL:
SELECT name FROM managers AS hac WHERE amount > ( SELECT AVG(amount) FROM accounts AS jac WHERE jac.code = hac.code );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08752
train
v2
Schema: accounts (alias: jac)(id, name, level, type) items(name, status, amount, value) Task: Find name from accounts where a matching record exists in items with the same type. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "name", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08753
train
v3
Schema: orders (alias: kab)(level, name, value, amount) tasks(name, value, salary, amount) Task: Retrieve id from orders with salary above the SUM(amount) of tasks rows sharing the same id. SQL:
SELECT id FROM orders AS kab WHERE salary > ( SELECT SUM(amount) FROM tasks AS znob WHERE znob.id = kab.id );
{ "outer_table": "orders", "inner_table": "tasks", "outer_alias": "kab", "inner_alias": "znob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08754
train
v1
Schema: staff (alias: xnob)(level, salary, type, amount) categories(type, id, code, value) Task: Select salary from staff where level exists in categories for the same code. SQL:
SELECT salary FROM staff AS xnob WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "level", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08755
train
v2
Schema: employees (alias: bev)(value, level, code, date) requests(name, salary, level, id) Task: Retrieve id from employees that have at least one corresponding entry in requests sharing the same code. SQL:
SELECT id FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = bev.code );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "id", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08756
train
v3
Schema: orders (alias: kab)(id, status, name, value) products(id, name, amount, date) Task: Find salary from orders where value exceeds the average amount from products for the same level. SQL:
SELECT salary FROM orders AS kab WHERE value > ( SELECT AVG(amount) FROM products AS nad WHERE nad.level = kab.level );
{ "outer_table": "orders", "inner_table": "products", "outer_alias": "kab", "inner_alias": "nad", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08757
train
v1
Schema: schedules (alias: vmob)(type, date, salary, amount) transactions(date, type, level, amount) Task: Find salary from schedules where code appears in transactions entries with matching code. SQL:
SELECT salary FROM schedules AS vmob WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "transactions", "outer_alias": "vmob", "inner_alias": "gev", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08758
train
v2
Schema: customers (alias: lex)(name, level, amount, id) projects(status, value, amount, id) Task: Find code from customers where a matching record exists in projects with the same code. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = lex.code );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "code", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08759
train
v2
Schema: invoices (alias: fal)(level, amount, salary, id) managers(date, level, code, amount) Task: Find name from invoices where a matching record exists in managers with the same id. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = fal.id );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "name", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08760
train
v1
Schema: transactions (alias: gev)(name, level, id, date) categories(level, name, id, code) Task: Select salary from transactions where status exists in categories for the same type. SQL:
SELECT salary FROM transactions AS gev WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.type = gev.type );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "status", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08761
train
v1
Schema: shipments (alias: vnob)(date, id, type, amount) departments(value, code, status, date) Task: Retrieve salary from shipments whose status is found in departments rows where type matches the outer record. SQL:
SELECT salary FROM shipments AS vnob WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "salary", "filter_col": "status", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08762
train
v2
Schema: branches (alias: agov)(value, code, id, salary) departments(name, status, value, amount) Task: Retrieve amount from branches that have at least one corresponding entry in departments sharing the same code. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = agov.code );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "amount", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08763
train
v1
Schema: tasks (alias: znob)(date, code, value, type) sales(salary, code, name, level) Task: Select amount from tasks where code exists in sales for the same level. SQL:
SELECT amount FROM tasks AS znob WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.level = znob.level );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "znob", "inner_alias": "cif", "proj_col": "amount", "filter_col": "code", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08764
train
v2
Schema: managers (alias: hac)(amount, status, name, value) departments(type, level, code, date) Task: Retrieve code from managers that have at least one corresponding entry in departments sharing the same level. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = hac.level );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "code", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08765
train
v3
Schema: branches (alias: agov)(amount, type, date, name) employees(code, status, amount, type) Task: Retrieve code from branches with amount above the AVG(salary) of employees rows sharing the same type. SQL:
SELECT code FROM branches AS agov WHERE amount > ( SELECT AVG(salary) FROM employees AS bev WHERE bev.type = agov.type );
{ "outer_table": "branches", "inner_table": "employees", "outer_alias": "agov", "inner_alias": "bev", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08766
train
v1
Schema: categories (alias: egiv)(date, level, value, id) regions(code, id, salary, level) Task: Find amount from categories where id appears in regions entries with matching status. SQL:
SELECT amount FROM categories AS egiv WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.status = egiv.status );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08767
train
v2
Schema: regions (alias: okiv)(amount, code, value, type) items(salary, level, value, date) Task: Find amount from regions where a matching record exists in items with the same level. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "amount", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08768
train
v1
Schema: tasks (alias: znob)(type, salary, id, date) managers(status, salary, value, name) Task: Select salary from tasks where level exists in managers for the same id. SQL:
SELECT salary FROM tasks AS znob WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.id = znob.id );
{ "outer_table": "tasks", "inner_table": "managers", "outer_alias": "znob", "inner_alias": "hac", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08769
train
v1
Schema: projects (alias: uliv)(salary, id, date, code) regions(date, type, amount, value) Task: Select amount from projects where type exists in regions for the same level. SQL:
SELECT amount FROM projects AS uliv WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.level = uliv.level );
{ "outer_table": "projects", "inner_table": "regions", "outer_alias": "uliv", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "type", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08770
train
v1
Schema: shipments (alias: vnob)(salary, level, name, amount) invoices(date, status, level, value) Task: Retrieve amount from shipments whose code is found in invoices rows where level matches the outer record. SQL:
SELECT amount FROM shipments AS vnob WHERE code IN ( SELECT code FROM invoices AS fal WHERE fal.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "vnob", "inner_alias": "fal", "proj_col": "amount", "filter_col": "code", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08771
train
v2
Schema: customers (alias: lex)(name, salary, type, status) departments(type, salary, code, date) Task: Retrieve value from customers that have at least one corresponding entry in departments sharing the same level. SQL:
SELECT value FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = lex.level );
{ "outer_table": "customers", "inner_table": "departments", "outer_alias": "lex", "inner_alias": "dov", "proj_col": "value", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08772
train
v3
Schema: invoices (alias: fal)(value, code, salary, type) requests(status, code, type, value) Task: Find value from invoices where salary exceeds the maximum value from requests for the same code. SQL:
SELECT value FROM invoices AS fal WHERE salary > ( SELECT MAX(value) FROM requests AS ejof WHERE ejof.code = fal.code );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08773
train
v3
Schema: requests (alias: ejof)(code, value, amount, date) sales(salary, date, level, name) Task: Retrieve id from requests with value above the MAX(salary) of sales rows sharing the same code. SQL:
SELECT id FROM requests AS ejof WHERE value > ( SELECT MAX(salary) FROM sales AS cif WHERE cif.code = ejof.code );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08774
train
v3
Schema: transactions (alias: gev)(value, id, code, amount) items(amount, code, level, value) Task: Find code from transactions where value exceeds the maximum amount from items for the same level. SQL:
SELECT code FROM transactions AS gev WHERE value > ( SELECT MAX(amount) FROM items AS ikob WHERE ikob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "gev", "inner_alias": "ikob", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08775
train
v1
Schema: items (alias: ikob)(value, id, status, salary) employees(type, salary, amount, id) Task: Select code from items where level exists in employees for the same level. SQL:
SELECT code FROM items AS ikob WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.level = ikob.level );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "code", "filter_col": "level", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08776
train
v3
Schema: staff (alias: xnob)(id, code, type, name) projects(amount, type, id, status) Task: Retrieve id from staff with amount above the SUM(value) of projects rows sharing the same id. SQL:
SELECT id FROM staff AS xnob WHERE amount > ( SELECT SUM(value) FROM projects AS uliv WHERE uliv.id = xnob.id );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "xnob", "inner_alias": "uliv", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08777
train
v1
Schema: transactions (alias: gev)(amount, salary, id, date) staff(salary, level, type, amount) Task: Find value from transactions where code appears in staff entries with matching level. SQL:
SELECT value FROM transactions AS gev WHERE code IN ( SELECT code FROM staff AS xnob WHERE xnob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08778
train
v3
Schema: employees (alias: bev)(amount, salary, code, type) orders(name, code, date, id) Task: Retrieve code from employees with amount above the MAX(salary) of orders rows sharing the same level. SQL:
SELECT code FROM employees AS bev WHERE amount > ( SELECT MAX(salary) FROM orders AS kab WHERE kab.level = bev.level );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08779
train
v2
Schema: projects (alias: uliv)(status, amount, id, date) invoices(salary, value, date, type) Task: Find salary from projects where a matching record exists in invoices with the same status. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.status = uliv.status );
{ "outer_table": "projects", "inner_table": "invoices", "outer_alias": "uliv", "inner_alias": "fal", "proj_col": "salary", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08780
train
v3
Schema: items (alias: ikob)(date, code, salary, name) orders(date, level, value, id) Task: Retrieve code from items with value above the AVG(value) of orders rows sharing the same code. SQL:
SELECT code FROM items AS ikob WHERE value > ( SELECT AVG(value) FROM orders AS kab WHERE kab.code = ikob.code );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08781
train
v2
Schema: staff (alias: xnob)(status, date, name, level) managers(code, value, level, status) Task: Retrieve amount from staff that have at least one corresponding entry in managers sharing the same code. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = xnob.code );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "xnob", "inner_alias": "hac", "proj_col": "amount", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08782
train
v3
Schema: branches (alias: agov)(salary, date, value, type) customers(id, amount, type, code) Task: Find name from branches where value exceeds the average value from customers for the same type. SQL:
SELECT name FROM branches AS agov WHERE value > ( SELECT AVG(value) FROM customers AS lex WHERE lex.type = agov.type );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08783
train
v1
Schema: items (alias: ikob)(status, level, id, code) products(id, level, code, date) Task: Select value from items where level exists in products for the same status. SQL:
SELECT value FROM items AS ikob WHERE level IN ( SELECT level FROM products AS nad WHERE nad.status = ikob.status );
{ "outer_table": "items", "inner_table": "products", "outer_alias": "ikob", "inner_alias": "nad", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08784
train
v2
Schema: orders (alias: kab)(code, amount, value, level) items(code, level, type, value) Task: Find salary from orders where a matching record exists in items with the same status. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = kab.status );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "kab", "inner_alias": "ikob", "proj_col": "salary", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08785
train
v1
Schema: products (alias: nad)(code, type, status, amount) branches(type, amount, salary, date) Task: Retrieve id from products whose level is found in branches rows where code matches the outer record. SQL:
SELECT id FROM products AS nad WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.code = nad.code );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08786
train
v1
Schema: transactions (alias: gev)(code, amount, level, salary) departments(level, name, date, id) Task: Select id from transactions where type exists in departments for the same level. SQL:
SELECT id FROM transactions AS gev WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.level = gev.level );
{ "outer_table": "transactions", "inner_table": "departments", "outer_alias": "gev", "inner_alias": "dov", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08787
train
v1
Schema: orders (alias: kab)(value, salary, name, date) schedules(salary, code, date, level) Task: Select id from orders where id exists in schedules for the same level. SQL:
SELECT id FROM orders AS kab WHERE id IN ( SELECT id FROM schedules AS vmob WHERE vmob.level = kab.level );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "id", "filter_col": "id", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08788
train
v3
Schema: branches (alias: agov)(date, salary, level, amount) invoices(value, level, name, status) Task: Retrieve code from branches with amount above the MAX(amount) of invoices rows sharing the same level. SQL:
SELECT code FROM branches AS agov WHERE amount > ( SELECT MAX(amount) FROM invoices AS fal WHERE fal.level = agov.level );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08789
train
v1
Schema: products (alias: nad)(salary, status, id, type) projects(value, amount, name, id) Task: Retrieve name from products whose status is found in projects rows where id matches the outer record. SQL:
SELECT name FROM products AS nad WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.id = nad.id );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08790
train
v1
Schema: managers (alias: hac)(salary, status, level, amount) shipments(code, status, amount, value) Task: Find code from managers where type appears in shipments entries with matching code. SQL:
SELECT code FROM managers AS hac WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.code = hac.code );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "hac", "inner_alias": "vnob", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08791
train
v3
Schema: shipments (alias: vnob)(value, name, level, date) employees(salary, amount, type, level) Task: Find salary from shipments where amount exceeds the count of salary from employees for the same type. SQL:
SELECT salary FROM shipments AS vnob WHERE amount > ( SELECT COUNT(salary) FROM employees AS bev WHERE bev.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08792
train
v3
Schema: orders (alias: kab)(code, level, value, type) shipments(code, value, status, date) Task: Retrieve value from orders with value above the COUNT(salary) of shipments rows sharing the same id. SQL:
SELECT value FROM orders AS kab WHERE value > ( SELECT COUNT(salary) FROM shipments AS vnob WHERE vnob.id = kab.id );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08793
train
v2
Schema: branches (alias: agov)(code, status, amount, id) transactions(level, value, salary, id) Task: Find value from branches where a matching record exists in transactions with the same id. SQL:
SELECT value FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = agov.id );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "value", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08794
train
v1
Schema: regions (alias: okiv)(date, status, amount, type) customers(id, name, code, type) Task: Retrieve name from regions whose status is found in customers rows where code matches the outer record. SQL:
SELECT name FROM regions AS okiv WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.code = okiv.code );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08795
train
v2
Schema: tasks (alias: znob)(amount, type, id, level) departments(amount, salary, id, name) Task: Find amount from tasks where a matching record exists in departments with the same id. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = znob.id );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "amount", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08796
train
v2
Schema: products (alias: nad)(status, date, salary, code) accounts(type, id, salary, value) Task: Retrieve salary from products that have at least one corresponding entry in accounts sharing the same type. SQL:
SELECT salary FROM products AS nad WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = nad.type );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "salary", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08797
train
v1
Schema: branches (alias: agov)(id, amount, salary, name) requests(status, type, date, code) Task: Find amount from branches where status appears in requests entries with matching type. SQL:
SELECT amount FROM branches AS agov WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.type = agov.type );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08798
train
v1
Schema: schedules (alias: vmob)(level, type, salary, status) tasks(id, value, level, name) Task: Find salary from schedules where level appears in tasks entries with matching id. SQL:
SELECT salary FROM schedules AS vmob WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08799
train