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: tasks (alias: znob)(date, salary, id, code) requests(amount, status, value, code) Task: Retrieve code from tasks that have at least one corresponding entry in requests sharing the same id. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = znob.id );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "code", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06000
train
v3
Schema: branches (alias: agov)(amount, id, type, date) staff(status, date, value, level) Task: Retrieve name from branches with amount above the MIN(value) of staff rows sharing the same status. SQL:
SELECT name FROM branches AS agov WHERE amount > ( SELECT MIN(value) FROM staff AS xnob WHERE xnob.status = agov.status );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06001
train
v1
Schema: products (alias: nad)(status, salary, value, type) invoices(code, date, status, id) Task: Select name from products where level exists in invoices for the same code. SQL:
SELECT name FROM products AS nad WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.code = nad.code );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06002
train
v2
Schema: customers (alias: lex)(date, status, level, amount) regions(name, type, date, status) Task: Find salary from customers where a matching record exists in regions with the same type. SQL:
SELECT salary FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = lex.type );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "salary", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06003
train
v1
Schema: accounts (alias: jac)(value, level, salary, date) regions(date, value, name, type) Task: Find name from accounts where code appears in regions entries with matching status. SQL:
SELECT name FROM accounts AS jac WHERE code IN ( SELECT code FROM regions AS okiv WHERE okiv.status = jac.status );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06004
train
v2
Schema: branches (alias: agov)(salary, name, level, status) categories(level, status, value, amount) Task: Retrieve code from branches that have at least one corresponding entry in categories sharing the same status. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = agov.status );
{ "outer_table": "branches", "inner_table": "categories", "outer_alias": "agov", "inner_alias": "egiv", "proj_col": "code", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06005
train
v1
Schema: schedules (alias: vmob)(level, type, status, date) projects(value, level, salary, type) Task: Retrieve salary from schedules whose id is found in projects rows where status matches the outer record. SQL:
SELECT salary FROM schedules AS vmob WHERE id IN ( SELECT id FROM projects AS uliv WHERE uliv.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06006
train
v3
Schema: orders (alias: kab)(level, type, value, code) invoices(date, value, amount, status) Task: Retrieve amount from orders with salary above the MIN(value) of invoices rows sharing the same level. SQL:
SELECT amount FROM orders AS kab WHERE salary > ( SELECT MIN(value) FROM invoices AS fal WHERE fal.level = kab.level );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "kab", "inner_alias": "fal", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06007
train
v1
Schema: shipments (alias: vnob)(value, code, name, type) items(date, name, level, amount) Task: Find value from shipments where id appears in items entries with matching status. SQL:
SELECT value FROM shipments AS vnob WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "items", "outer_alias": "vnob", "inner_alias": "ikob", "proj_col": "value", "filter_col": "id", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06008
train
v1
Schema: schedules (alias: vmob)(value, code, name, type) departments(id, name, type, status) Task: Find value from schedules where code appears in departments entries with matching level. SQL:
SELECT value FROM schedules AS vmob WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "vmob", "inner_alias": "dov", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06009
train
v2
Schema: accounts (alias: jac)(date, level, status, value) products(salary, id, type, status) Task: Retrieve value from accounts that have at least one corresponding entry in products sharing the same status. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = jac.status );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "jac", "inner_alias": "nad", "proj_col": "value", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06010
train
v2
Schema: categories (alias: egiv)(level, date, value, salary) employees(date, id, salary, level) Task: Find id from categories where a matching record exists in employees with the same code. SQL:
SELECT id FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.code = egiv.code );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "egiv", "inner_alias": "bev", "proj_col": "id", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06011
train
v3
Schema: requests (alias: ejof)(id, salary, amount, name) projects(type, level, amount, id) Task: Find id from requests where amount exceeds the maximum amount from projects for the same id. SQL:
SELECT id FROM requests AS ejof WHERE amount > ( SELECT MAX(amount) FROM projects AS uliv WHERE uliv.id = ejof.id );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06012
train
v2
Schema: products (alias: nad)(id, code, status, type) schedules(level, salary, status, id) Task: Retrieve salary from products that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT salary FROM products AS nad WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = nad.code );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "salary", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06013
train
v1
Schema: tasks (alias: znob)(name, status, type, date) regions(level, date, type, id) Task: Find value from tasks where level appears in regions entries with matching type. SQL:
SELECT value FROM tasks AS znob WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.type = znob.type );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "value", "filter_col": "level", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06014
train
v1
Schema: transactions (alias: gev)(name, amount, date, value) employees(id, type, code, name) Task: Find amount from transactions where code appears in employees entries with matching id. SQL:
SELECT amount FROM transactions AS gev WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.id = gev.id );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "gev", "inner_alias": "bev", "proj_col": "amount", "filter_col": "code", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06015
train
v1
Schema: sales (alias: cif)(salary, amount, date, value) regions(value, code, date, level) Task: Select name from sales where type exists in regions for the same type. SQL:
SELECT name FROM sales AS cif WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.type = cif.type );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "name", "filter_col": "type", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06016
train
v1
Schema: branches (alias: agov)(date, status, level, id) departments(value, id, amount, name) Task: Retrieve salary from branches whose level is found in departments rows where level matches the outer record. SQL:
SELECT salary FROM branches AS agov WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.level = agov.level );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "salary", "filter_col": "level", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06017
train
v3
Schema: invoices (alias: fal)(amount, level, name, code) managers(date, name, level, salary) Task: Find id from invoices where salary exceeds the maximum value from managers for the same level. SQL:
SELECT id FROM invoices AS fal WHERE salary > ( SELECT MAX(value) FROM managers AS hac WHERE hac.level = fal.level );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06018
train
v1
Schema: projects (alias: uliv)(amount, value, level, code) schedules(level, id, code, status) Task: Find value from projects where status appears in schedules entries with matching code. SQL:
SELECT value FROM projects AS uliv WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "value", "filter_col": "status", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06019
train
v2
Schema: departments (alias: dov)(type, date, salary, level) customers(amount, level, salary, type) Task: Find name from departments where a matching record exists in customers with the same type. SQL:
SELECT name FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = dov.type );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "name", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06020
train
v3
Schema: departments (alias: dov)(type, date, name, level) items(type, code, amount, status) Task: Find salary from departments where salary exceeds the average value from items for the same level. SQL:
SELECT salary FROM departments AS dov WHERE salary > ( SELECT AVG(value) FROM items AS ikob WHERE ikob.level = dov.level );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06021
train
v2
Schema: transactions (alias: gev)(salary, amount, status, value) staff(date, status, type, id) Task: Find id from transactions where a matching record exists in staff with the same id. SQL:
SELECT id FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "id", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06022
train
v1
Schema: accounts (alias: jac)(date, code, status, salary) regions(salary, amount, date, code) Task: Retrieve id from accounts whose status is found in regions rows where code matches the outer record. SQL:
SELECT id FROM accounts AS jac WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.code = jac.code );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06023
train
v1
Schema: managers (alias: hac)(value, level, status, type) regions(code, status, level, value) Task: Select code from managers where id exists in regions for the same code. SQL:
SELECT code FROM managers AS hac WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.code = hac.code );
{ "outer_table": "managers", "inner_table": "regions", "outer_alias": "hac", "inner_alias": "okiv", "proj_col": "code", "filter_col": "id", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06024
train
v1
Schema: products (alias: nad)(type, salary, id, status) tasks(salary, amount, id, code) Task: Find name from products where status appears in tasks entries with matching id. SQL:
SELECT name FROM products AS nad WHERE status IN ( SELECT status FROM tasks AS znob WHERE znob.id = nad.id );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06025
train
v3
Schema: departments (alias: dov)(id, name, value, type) staff(code, date, status, salary) Task: Find code from departments where salary exceeds the maximum amount from staff for the same id. SQL:
SELECT code FROM departments AS dov WHERE salary > ( SELECT MAX(amount) FROM staff AS xnob WHERE xnob.id = dov.id );
{ "outer_table": "departments", "inner_table": "staff", "outer_alias": "dov", "inner_alias": "xnob", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06026
train
v3
Schema: employees (alias: bev)(date, level, name, type) requests(code, status, salary, level) Task: Find value from employees where value exceeds the count of salary from requests for the same id. SQL:
SELECT value FROM employees AS bev WHERE value > ( SELECT COUNT(salary) FROM requests AS ejof WHERE ejof.id = bev.id );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06027
train
v2
Schema: staff (alias: xnob)(name, code, value, type) items(type, id, value, name) Task: Retrieve name from staff that have at least one corresponding entry in items sharing the same type. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = xnob.type );
{ "outer_table": "staff", "inner_table": "items", "outer_alias": "xnob", "inner_alias": "ikob", "proj_col": "name", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06028
train
v3
Schema: items (alias: ikob)(status, salary, code, id) transactions(level, salary, date, name) Task: Find name from items where amount exceeds the minimum value from transactions for the same type. SQL:
SELECT name FROM items AS ikob WHERE amount > ( SELECT MIN(value) FROM transactions AS gev WHERE gev.type = ikob.type );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "ikob", "inner_alias": "gev", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06029
train
v1
Schema: schedules (alias: vmob)(date, amount, value, code) customers(status, amount, level, date) Task: Retrieve salary from schedules whose type is found in customers rows where code matches the outer record. SQL:
SELECT salary FROM schedules AS vmob WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "vmob", "inner_alias": "lex", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06030
train
v3
Schema: invoices (alias: fal)(type, name, salary, id) projects(code, amount, date, id) Task: Find code from invoices where value exceeds the average salary from projects for the same status. SQL:
SELECT code FROM invoices AS fal WHERE value > ( SELECT AVG(salary) FROM projects AS uliv WHERE uliv.status = fal.status );
{ "outer_table": "invoices", "inner_table": "projects", "outer_alias": "fal", "inner_alias": "uliv", "proj_col": "code", "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_06031
train
v2
Schema: products (alias: nad)(code, type, level, amount) managers(status, type, level, id) Task: Retrieve id from products that have at least one corresponding entry in managers sharing the same level. SQL:
SELECT id FROM products AS nad WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = nad.level );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "nad", "inner_alias": "hac", "proj_col": "id", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06032
train
v3
Schema: managers (alias: hac)(salary, level, status, id) staff(status, code, type, level) Task: Find name from managers where amount exceeds the minimum value from staff for the same status. SQL:
SELECT name FROM managers AS hac WHERE amount > ( SELECT MIN(value) FROM staff AS xnob WHERE xnob.status = hac.status );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "hac", "inner_alias": "xnob", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06033
train
v2
Schema: requests (alias: ejof)(id, value, name, salary) managers(code, level, id, date) Task: Retrieve salary from requests that have at least one corresponding entry in managers sharing the same code. SQL:
SELECT salary FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = ejof.code );
{ "outer_table": "requests", "inner_table": "managers", "outer_alias": "ejof", "inner_alias": "hac", "proj_col": "salary", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06034
train
v2
Schema: items (alias: ikob)(amount, type, level, value) managers(amount, code, value, id) Task: Retrieve value from items that have at least one corresponding entry in managers sharing the same id. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = ikob.id );
{ "outer_table": "items", "inner_table": "managers", "outer_alias": "ikob", "inner_alias": "hac", "proj_col": "value", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06035
train
v2
Schema: requests (alias: ejof)(amount, level, name, status) sales(value, date, status, type) Task: Find name from requests where a matching record exists in sales with the same status. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = ejof.status );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "name", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06036
train
v1
Schema: transactions (alias: gev)(type, date, level, code) sales(id, value, amount, status) Task: Find name from transactions where status appears in sales entries with matching status. SQL:
SELECT name FROM transactions AS gev WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.status = gev.status );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06037
train
v3
Schema: items (alias: ikob)(amount, name, salary, status) accounts(date, level, amount, type) Task: Retrieve code from items with value above the SUM(salary) of accounts rows sharing the same level. SQL:
SELECT code FROM items AS ikob WHERE value > ( SELECT SUM(salary) FROM accounts AS jac WHERE jac.level = ikob.level );
{ "outer_table": "items", "inner_table": "accounts", "outer_alias": "ikob", "inner_alias": "jac", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06038
train
v2
Schema: regions (alias: okiv)(code, status, date, type) shipments(value, date, status, amount) Task: Retrieve amount from regions that have at least one corresponding entry in shipments sharing the same type. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = okiv.type );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "okiv", "inner_alias": "vnob", "proj_col": "amount", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06039
train
v1
Schema: regions (alias: okiv)(name, type, amount, code) branches(id, name, date, type) Task: Retrieve amount from regions whose id is found in branches rows where id matches the outer record. SQL:
SELECT amount FROM regions AS okiv WHERE id IN ( SELECT id FROM branches AS agov WHERE agov.id = okiv.id );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "okiv", "inner_alias": "agov", "proj_col": "amount", "filter_col": "id", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06040
train
v2
Schema: accounts (alias: jac)(status, level, date, amount) requests(type, level, name, status) Task: Retrieve value from accounts that have at least one corresponding entry in requests sharing the same type. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.type = jac.type );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "jac", "inner_alias": "ejof", "proj_col": "value", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06041
train
v1
Schema: accounts (alias: jac)(value, level, salary, amount) branches(level, value, status, amount) Task: Retrieve salary from accounts whose id is found in branches rows where level matches the outer record. SQL:
SELECT salary FROM accounts AS jac WHERE id IN ( SELECT id FROM branches AS agov WHERE agov.level = jac.level );
{ "outer_table": "accounts", "inner_table": "branches", "outer_alias": "jac", "inner_alias": "agov", "proj_col": "salary", "filter_col": "id", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06042
train
v2
Schema: schedules (alias: vmob)(type, level, name, id) invoices(salary, date, code, status) Task: Retrieve code from schedules that have at least one corresponding entry in invoices sharing the same id. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "vmob", "inner_alias": "fal", "proj_col": "code", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06043
train
v2
Schema: managers (alias: hac)(id, type, status, value) schedules(status, value, code, salary) Task: Retrieve value from managers that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT value FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = hac.code );
{ "outer_table": "managers", "inner_table": "schedules", "outer_alias": "hac", "inner_alias": "vmob", "proj_col": "value", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06044
train
v3
Schema: categories (alias: egiv)(level, id, value, date) staff(value, type, status, name) Task: Find id from categories where salary exceeds the maximum value from staff for the same code. SQL:
SELECT id FROM categories AS egiv WHERE salary > ( SELECT MAX(value) FROM staff AS xnob WHERE xnob.code = egiv.code );
{ "outer_table": "categories", "inner_table": "staff", "outer_alias": "egiv", "inner_alias": "xnob", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06045
train
v3
Schema: tasks (alias: znob)(date, status, value, name) transactions(id, type, date, value) Task: Find value from tasks where value exceeds the average salary from transactions for the same id. SQL:
SELECT value FROM tasks AS znob WHERE value > ( SELECT AVG(salary) FROM transactions AS gev WHERE gev.id = znob.id );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06046
train
v2
Schema: accounts (alias: jac)(salary, code, type, id) employees(name, date, id, salary) Task: Find id from accounts where a matching record exists in employees with the same level. SQL:
SELECT id FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = jac.level );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "id", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06047
train
v3
Schema: employees (alias: bev)(status, date, id, name) departments(status, amount, date, salary) Task: Find value from employees where salary exceeds the count of amount from departments for the same code. SQL:
SELECT value FROM employees AS bev WHERE salary > ( SELECT COUNT(amount) FROM departments AS dov WHERE dov.code = bev.code );
{ "outer_table": "employees", "inner_table": "departments", "outer_alias": "bev", "inner_alias": "dov", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06048
train
v1
Schema: orders (alias: kab)(type, value, salary, date) invoices(value, level, status, type) Task: Find id from orders where id appears in invoices entries with matching code. SQL:
SELECT id FROM orders AS kab WHERE id IN ( SELECT id FROM invoices AS fal WHERE fal.code = kab.code );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "kab", "inner_alias": "fal", "proj_col": "id", "filter_col": "id", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06049
train
v1
Schema: staff (alias: xnob)(status, date, type, id) categories(type, value, amount, level) Task: Find name from staff where id appears in categories entries with matching type. SQL:
SELECT name FROM staff AS xnob WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.type = xnob.type );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "name", "filter_col": "id", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06050
train
v2
Schema: schedules (alias: vmob)(status, amount, code, id) managers(type, name, id, code) Task: Find value from schedules where a matching record exists in managers with the same type. SQL:
SELECT value FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "value", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06051
train
v1
Schema: shipments (alias: vnob)(name, code, amount, salary) departments(level, code, value, id) Task: Find code from shipments where code appears in departments entries with matching code. SQL:
SELECT code FROM shipments AS vnob WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06052
train
v3
Schema: regions (alias: okiv)(name, level, amount, value) transactions(code, name, status, salary) Task: Find id from regions where value exceeds the maximum salary from transactions for the same level. SQL:
SELECT id FROM regions AS okiv WHERE value > ( SELECT MAX(salary) FROM transactions AS gev WHERE gev.level = okiv.level );
{ "outer_table": "regions", "inner_table": "transactions", "outer_alias": "okiv", "inner_alias": "gev", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06053
train
v3
Schema: products (alias: nad)(date, value, salary, status) departments(level, salary, value, name) Task: Find name from products where salary exceeds the average salary from departments for the same status. SQL:
SELECT name FROM products AS nad WHERE salary > ( SELECT AVG(salary) FROM departments AS dov WHERE dov.status = nad.status );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06054
train
v1
Schema: accounts (alias: jac)(type, id, name, amount) orders(amount, name, type, value) Task: Find name from accounts where code appears in orders entries with matching code. SQL:
SELECT name FROM accounts AS jac WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.code = jac.code );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06055
train
v3
Schema: regions (alias: okiv)(name, level, code, date) accounts(amount, name, status, type) Task: Find value from regions where salary exceeds the minimum salary from accounts for the same level. SQL:
SELECT value FROM regions AS okiv WHERE salary > ( SELECT MIN(salary) FROM accounts AS jac WHERE jac.level = okiv.level );
{ "outer_table": "regions", "inner_table": "accounts", "outer_alias": "okiv", "inner_alias": "jac", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06056
train
v3
Schema: regions (alias: okiv)(name, type, level, date) departments(name, amount, code, id) Task: Retrieve value from regions with value above the SUM(value) of departments rows sharing the same code. SQL:
SELECT value FROM regions AS okiv WHERE value > ( SELECT SUM(value) FROM departments AS dov WHERE dov.code = okiv.code );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "okiv", "inner_alias": "dov", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06057
train
v2
Schema: customers (alias: lex)(id, status, name, salary) regions(date, value, amount, id) Task: Retrieve salary from customers that have at least one corresponding entry in regions sharing the same type. SQL:
SELECT salary FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = lex.type );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "salary", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06058
train
v2
Schema: managers (alias: hac)(name, salary, value, code) products(value, date, code, name) Task: Retrieve amount from managers that have at least one corresponding entry in products sharing the same code. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = hac.code );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "hac", "inner_alias": "nad", "proj_col": "amount", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06059
train
v1
Schema: transactions (alias: gev)(id, date, code, value) invoices(status, amount, date, code) Task: Find name from transactions where code appears in invoices entries with matching code. SQL:
SELECT name FROM transactions AS gev WHERE code IN ( SELECT code FROM invoices AS fal WHERE fal.code = gev.code );
{ "outer_table": "transactions", "inner_table": "invoices", "outer_alias": "gev", "inner_alias": "fal", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06060
train
v3
Schema: transactions (alias: gev)(level, amount, value, id) accounts(name, value, level, type) Task: Find salary from transactions where amount exceeds the maximum amount from accounts for the same id. SQL:
SELECT salary FROM transactions AS gev WHERE amount > ( SELECT MAX(amount) FROM accounts AS jac WHERE jac.id = gev.id );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "gev", "inner_alias": "jac", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06061
train
v2
Schema: regions (alias: okiv)(salary, status, id, date) staff(id, date, salary, code) Task: Find code from regions where a matching record exists in staff with the same status. SQL:
SELECT code FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = okiv.status );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "okiv", "inner_alias": "xnob", "proj_col": "code", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06062
train
v1
Schema: shipments (alias: vnob)(type, status, name, date) sales(amount, level, salary, type) Task: Retrieve id from shipments whose status is found in sales rows where code matches the outer record. SQL:
SELECT id FROM shipments AS vnob WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06063
train
v2
Schema: accounts (alias: jac)(value, id, status, date) requests(amount, value, salary, id) Task: Find amount from accounts where a matching record exists in requests with the same type. SQL:
SELECT amount FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.type = jac.type );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "jac", "inner_alias": "ejof", "proj_col": "amount", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06064
train
v1
Schema: sales (alias: cif)(status, name, type, id) transactions(type, value, amount, date) Task: Retrieve code from sales whose status is found in transactions rows where code matches the outer record. SQL:
SELECT code FROM sales AS cif WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.code = cif.code );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "code", "filter_col": "status", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06065
train
v3
Schema: managers (alias: hac)(salary, date, amount, status) departments(id, level, name, date) Task: Retrieve id from managers with value above the MAX(amount) of departments rows sharing the same type. SQL:
SELECT id FROM managers AS hac WHERE value > ( SELECT MAX(amount) FROM departments AS dov WHERE dov.type = hac.type );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06066
train
v3
Schema: invoices (alias: fal)(status, code, id, name) categories(value, level, id, amount) Task: Retrieve salary from invoices with amount above the COUNT(value) of categories rows sharing the same id. SQL:
SELECT salary FROM invoices AS fal WHERE amount > ( SELECT COUNT(value) FROM categories AS egiv WHERE egiv.id = fal.id );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06067
train
v2
Schema: managers (alias: hac)(salary, id, level, status) staff(type, date, code, amount) Task: Find code from managers where a matching record exists in staff with the same type. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.type = hac.type );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "hac", "inner_alias": "xnob", "proj_col": "code", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06068
train
v3
Schema: categories (alias: egiv)(level, code, type, name) transactions(status, id, salary, date) Task: Find name from categories where salary exceeds the average value from transactions for the same status. SQL:
SELECT name FROM categories AS egiv WHERE salary > ( SELECT AVG(value) FROM transactions AS gev WHERE gev.status = egiv.status );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "egiv", "inner_alias": "gev", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06069
train
v2
Schema: staff (alias: xnob)(name, level, code, salary) projects(amount, id, type, status) Task: Retrieve id from staff that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT id FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "xnob", "inner_alias": "uliv", "proj_col": "id", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06070
train
v3
Schema: categories (alias: egiv)(level, code, value, salary) accounts(name, amount, code, value) Task: Retrieve amount from categories with salary above the COUNT(salary) of accounts rows sharing the same type. SQL:
SELECT amount FROM categories AS egiv WHERE salary > ( SELECT COUNT(salary) FROM accounts AS jac WHERE jac.type = egiv.type );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "egiv", "inner_alias": "jac", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06071
train
v1
Schema: regions (alias: okiv)(amount, level, salary, value) accounts(type, id, amount, level) Task: Retrieve id from regions whose level is found in accounts rows where id matches the outer record. SQL:
SELECT id FROM regions AS okiv WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.id = okiv.id );
{ "outer_table": "regions", "inner_table": "accounts", "outer_alias": "okiv", "inner_alias": "jac", "proj_col": "id", "filter_col": "level", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06072
train
v3
Schema: customers (alias: lex)(date, level, code, type) managers(status, code, id, salary) Task: Find code from customers where amount exceeds the maximum salary from managers for the same code. SQL:
SELECT code FROM customers AS lex WHERE amount > ( SELECT MAX(salary) FROM managers AS hac WHERE hac.code = lex.code );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06073
train
v1
Schema: branches (alias: agov)(name, id, type, level) departments(name, code, type, salary) Task: Retrieve amount from branches whose id is found in departments rows where type matches the outer record. SQL:
SELECT amount FROM branches AS agov WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.type = agov.type );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06074
train
v1
Schema: items (alias: ikob)(id, code, date, level) tasks(code, salary, value, id) Task: Find name from items where status appears in tasks entries with matching id. SQL:
SELECT name FROM items AS ikob WHERE status IN ( SELECT status FROM tasks AS znob WHERE znob.id = ikob.id );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06075
train
v3
Schema: transactions (alias: gev)(salary, type, name, level) items(date, status, name, code) Task: Retrieve code from transactions with value above the AVG(value) of items rows sharing the same id. SQL:
SELECT code FROM transactions AS gev WHERE value > ( SELECT AVG(value) FROM items AS ikob WHERE ikob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "gev", "inner_alias": "ikob", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06076
train
v1
Schema: orders (alias: kab)(type, salary, date, value) sales(level, date, type, name) Task: Select id from orders where status exists in sales for the same type. SQL:
SELECT id FROM orders AS kab WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.type = kab.type );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06077
train
v3
Schema: products (alias: nad)(code, id, value, amount) departments(code, salary, date, id) Task: Find amount from products where amount exceeds the average amount from departments for the same id. SQL:
SELECT amount FROM products AS nad WHERE amount > ( SELECT AVG(amount) FROM departments AS dov WHERE dov.id = nad.id );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06078
train
v3
Schema: managers (alias: hac)(amount, date, code, salary) projects(value, salary, level, code) Task: Find name from managers where value exceeds the count of amount from projects for the same status. SQL:
SELECT name FROM managers AS hac WHERE value > ( SELECT COUNT(amount) FROM projects AS uliv WHERE uliv.status = hac.status );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "hac", "inner_alias": "uliv", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06079
train
v1
Schema: orders (alias: kab)(level, salary, name, code) staff(id, amount, salary, level) Task: Find salary from orders where id appears in staff entries with matching code. SQL:
SELECT salary FROM orders AS kab WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.code = kab.code );
{ "outer_table": "orders", "inner_table": "staff", "outer_alias": "kab", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "id", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06080
train
v2
Schema: items (alias: ikob)(name, value, code, date) shipments(value, amount, id, status) Task: Find code from items where a matching record exists in shipments with the same id. SQL:
SELECT code FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = ikob.id );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "code", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06081
train
v3
Schema: shipments (alias: vnob)(level, status, code, value) invoices(date, name, level, type) Task: Retrieve salary from shipments with salary above the SUM(amount) of invoices rows sharing the same type. SQL:
SELECT salary FROM shipments AS vnob WHERE salary > ( SELECT SUM(amount) FROM invoices AS fal WHERE fal.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "vnob", "inner_alias": "fal", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06082
train
v2
Schema: shipments (alias: vnob)(salary, type, date, amount) sales(amount, code, id, name) Task: Find id from shipments where a matching record exists in sales with the same id. SQL:
SELECT id FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "id", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06083
train
v3
Schema: departments (alias: dov)(date, amount, name, code) orders(amount, id, status, code) Task: Find id from departments where amount exceeds the maximum salary from orders for the same code. SQL:
SELECT id FROM departments AS dov WHERE amount > ( SELECT MAX(salary) FROM orders AS kab WHERE kab.code = dov.code );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dov", "inner_alias": "kab", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06084
train
v1
Schema: departments (alias: dov)(name, id, value, amount) items(id, value, amount, date) Task: Select salary from departments where status exists in items for the same type. SQL:
SELECT salary FROM departments AS dov WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.type = dov.type );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "status", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06085
train
v2
Schema: branches (alias: agov)(level, amount, status, name) staff(type, id, amount, level) Task: Find name from branches where a matching record exists in staff with the same id. SQL:
SELECT name FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = agov.id );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "name", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06086
train
v1
Schema: requests (alias: ejof)(amount, name, id, type) employees(value, level, salary, type) Task: Select value from requests where type exists in employees for the same type. SQL:
SELECT value FROM requests AS ejof WHERE type IN ( SELECT type FROM employees AS bev WHERE bev.type = ejof.type );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ejof", "inner_alias": "bev", "proj_col": "value", "filter_col": "type", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06087
train
v3
Schema: schedules (alias: vmob)(status, salary, type, value) invoices(status, id, salary, date) Task: Retrieve id from schedules with salary above the MIN(value) of invoices rows sharing the same code. SQL:
SELECT id FROM schedules AS vmob WHERE salary > ( SELECT MIN(value) FROM invoices AS fal WHERE fal.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "vmob", "inner_alias": "fal", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06088
train
v3
Schema: employees (alias: bev)(value, level, status, amount) branches(date, level, value, status) Task: Retrieve value from employees with amount above the MIN(value) of branches rows sharing the same level. SQL:
SELECT value FROM employees AS bev WHERE amount > ( SELECT MIN(value) FROM branches AS agov WHERE agov.level = bev.level );
{ "outer_table": "employees", "inner_table": "branches", "outer_alias": "bev", "inner_alias": "agov", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06089
train
v1
Schema: regions (alias: okiv)(status, type, date, salary) branches(name, value, amount, code) Task: Select amount from regions where id exists in branches for the same level. SQL:
SELECT amount FROM regions AS okiv WHERE id IN ( SELECT id FROM branches AS agov WHERE agov.level = okiv.level );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "okiv", "inner_alias": "agov", "proj_col": "amount", "filter_col": "id", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06090
train
v1
Schema: staff (alias: xnob)(name, type, id, value) products(id, type, status, salary) Task: Find value from staff where type appears in products entries with matching status. SQL:
SELECT value FROM staff AS xnob WHERE type IN ( SELECT type FROM products AS nad WHERE nad.status = xnob.status );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06091
train
v2
Schema: employees (alias: bev)(status, code, name, level) customers(value, name, status, id) Task: Retrieve code from employees that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = bev.type );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "bev", "inner_alias": "lex", "proj_col": "code", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06092
train
v1
Schema: projects (alias: uliv)(id, type, date, value) employees(status, value, date, type) Task: Retrieve salary from projects whose id is found in employees rows where level matches the outer record. SQL:
SELECT salary FROM projects AS uliv WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.level = uliv.level );
{ "outer_table": "projects", "inner_table": "employees", "outer_alias": "uliv", "inner_alias": "bev", "proj_col": "salary", "filter_col": "id", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06093
train
v1
Schema: categories (alias: egiv)(date, status, type, name) requests(value, name, salary, type) Task: Find salary from categories where id appears in requests entries with matching status. SQL:
SELECT salary FROM categories AS egiv WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.status = egiv.status );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "egiv", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06094
train
v3
Schema: staff (alias: xnob)(date, id, value, code) transactions(salary, name, id, level) Task: Find salary from staff where amount exceeds the count of amount from transactions for the same type. SQL:
SELECT salary FROM staff AS xnob WHERE amount > ( SELECT COUNT(amount) FROM transactions AS gev WHERE gev.type = xnob.type );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "xnob", "inner_alias": "gev", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06095
train
v1
Schema: invoices (alias: fal)(id, salary, code, level) branches(value, id, name, code) Task: Retrieve name from invoices whose status is found in branches rows where status matches the outer record. SQL:
SELECT name FROM invoices AS fal WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.status = fal.status );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06096
train
v1
Schema: accounts (alias: jac)(type, level, status, salary) shipments(level, salary, code, value) Task: Select name from accounts where level exists in shipments for the same type. SQL:
SELECT name FROM accounts AS jac WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06097
train
v3
Schema: accounts (alias: jac)(salary, date, code, status) tasks(type, salary, level, status) Task: Find salary from accounts where salary exceeds the minimum value from tasks for the same type. SQL:
SELECT salary FROM accounts AS jac WHERE salary > ( SELECT MIN(value) FROM tasks AS znob WHERE znob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "tasks", "outer_alias": "jac", "inner_alias": "znob", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06098
train
v3
Schema: tasks (alias: znob)(name, level, amount, id) invoices(type, date, name, code) Task: Find name from tasks where amount exceeds the total salary from invoices for the same code. SQL:
SELECT name FROM tasks AS znob WHERE amount > ( SELECT SUM(salary) FROM invoices AS fal WHERE fal.code = znob.code );
{ "outer_table": "tasks", "inner_table": "invoices", "outer_alias": "znob", "inner_alias": "fal", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06099
train