variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v1
Schema: accounts (alias: jac)(date, id, type, name) sales(name, code, level, type) Task: Retrieve amount from accounts whose level is found in sales rows where level matches the outer record. SQL:
SELECT amount FROM accounts AS jac WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.level = jac.level );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "amount", "filter_col": "level", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07600
train
v1
Schema: transactions (alias: gev)(code, value, type, id) accounts(id, salary, status, name) Task: Retrieve name from transactions whose level is found in accounts rows where id matches the outer record. SQL:
SELECT name FROM transactions AS gev WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.id = gev.id );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "gev", "inner_alias": "jac", "proj_col": "name", "filter_col": "level", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07601
train
v2
Schema: requests (alias: ejof)(level, name, type, salary) schedules(type, value, date, amount) Task: Find salary from requests where a matching record exists in schedules with the same code. SQL:
SELECT salary FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "schedules", "outer_alias": "ejof", "inner_alias": "vmob", "proj_col": "salary", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07602
train
v2
Schema: invoices (alias: fal)(name, code, value, date) schedules(status, type, date, value) Task: Find amount from invoices where a matching record exists in schedules with the same level. SQL:
SELECT amount FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.level = fal.level );
{ "outer_table": "invoices", "inner_table": "schedules", "outer_alias": "fal", "inner_alias": "vmob", "proj_col": "amount", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07603
train
v2
Schema: projects (alias: uliv)(status, level, salary, code) orders(status, date, level, type) Task: Find amount from projects where a matching record exists in orders with the same status. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = uliv.status );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "amount", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07604
train
v1
Schema: requests (alias: ejof)(amount, value, name, date) orders(status, amount, type, value) Task: Select value from requests where type exists in orders for the same code. SQL:
SELECT value FROM requests AS ejof WHERE type IN ( SELECT type FROM orders AS kab WHERE kab.code = ejof.code );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "value", "filter_col": "type", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07605
train
v1
Schema: departments (alias: dov)(date, id, status, level) transactions(id, value, amount, date) Task: Find name from departments where status appears in transactions entries with matching id. SQL:
SELECT name FROM departments AS dov WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.id = dov.id );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dov", "inner_alias": "gev", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07606
train
v2
Schema: regions (alias: okiv)(date, level, code, type) customers(id, salary, status, type) Task: Retrieve value from regions that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = okiv.type );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "value", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07607
train
v2
Schema: schedules (alias: vmob)(value, amount, type, date) products(type, salary, level, amount) Task: Retrieve name from schedules that have at least one corresponding entry in products sharing the same level. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "name", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07608
train
v1
Schema: products (alias: nad)(date, id, amount, name) branches(amount, name, value, status) Task: Find code from products where type appears in branches entries with matching status. SQL:
SELECT code FROM products AS nad WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.status = nad.status );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07609
train
v3
Schema: employees (alias: bev)(status, id, type, salary) tasks(value, name, code, status) Task: Find value from employees where salary exceeds the total amount from tasks for the same code. SQL:
SELECT value FROM employees AS bev WHERE salary > ( SELECT SUM(amount) FROM tasks AS znob WHERE znob.code = bev.code );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07610
train
v2
Schema: accounts (alias: jac)(level, amount, status, id) orders(type, salary, level, value) Task: Retrieve name from accounts that have at least one corresponding entry in orders sharing the same id. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = jac.id );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "name", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07611
train
v2
Schema: departments (alias: dov)(level, date, type, id) branches(value, level, id, amount) Task: Retrieve salary from departments that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT salary FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = dov.code );
{ "outer_table": "departments", "inner_table": "branches", "outer_alias": "dov", "inner_alias": "agov", "proj_col": "salary", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07612
train
v2
Schema: regions (alias: okiv)(value, status, level, date) departments(level, id, amount, value) Task: Retrieve id from regions that have at least one corresponding entry in departments sharing the same status. SQL:
SELECT id FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = okiv.status );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "okiv", "inner_alias": "dov", "proj_col": "id", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07613
train
v2
Schema: sales (alias: cif)(status, type, date, name) regions(id, amount, salary, value) Task: Find id from sales where a matching record exists in regions with the same code. SQL:
SELECT id FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = cif.code );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "id", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07614
train
v2
Schema: transactions (alias: gev)(name, value, id, salary) requests(type, status, id, level) Task: Find name from transactions where a matching record exists in requests with the same status. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = gev.status );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "name", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07615
train
v1
Schema: accounts (alias: jac)(id, amount, status, value) orders(amount, name, status, date) Task: Select salary from accounts where id exists in orders for the same id. SQL:
SELECT salary FROM accounts AS jac WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.id = jac.id );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "salary", "filter_col": "id", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07616
train
v1
Schema: sales (alias: cif)(status, amount, name, date) departments(code, salary, id, status) Task: Retrieve salary from sales whose level is found in departments rows where id matches the outer record. SQL:
SELECT salary FROM sales AS cif WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.id = cif.id );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07617
train
v1
Schema: managers (alias: hac)(code, id, salary, level) orders(salary, value, id, type) Task: Select salary from managers where type exists in orders for the same id. SQL:
SELECT salary FROM managers AS hac WHERE type IN ( SELECT type FROM orders AS kab WHERE kab.id = hac.id );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "salary", "filter_col": "type", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07618
train
v3
Schema: projects (alias: uliv)(id, value, type, status) employees(code, id, date, level) Task: Retrieve amount from projects with value above the MIN(salary) of employees rows sharing the same type. SQL:
SELECT amount FROM projects AS uliv WHERE value > ( SELECT MIN(salary) FROM employees AS bev WHERE bev.type = uliv.type );
{ "outer_table": "projects", "inner_table": "employees", "outer_alias": "uliv", "inner_alias": "bev", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07619
train
v1
Schema: schedules (alias: vmob)(date, value, status, type) managers(status, code, date, amount) Task: Find name from schedules where code appears in managers entries with matching id. SQL:
SELECT name FROM schedules AS vmob WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07620
train
v3
Schema: customers (alias: lex)(date, salary, amount, name) categories(name, amount, type, value) Task: Retrieve id from customers with amount above the MAX(value) of categories rows sharing the same type. SQL:
SELECT id FROM customers AS lex WHERE amount > ( SELECT MAX(value) FROM categories AS egiv WHERE egiv.type = lex.type );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07621
train
v3
Schema: employees (alias: bev)(value, amount, code, salary) regions(level, amount, code, type) Task: Find code from employees where amount exceeds the maximum salary from regions for the same code. SQL:
SELECT code FROM employees AS bev WHERE amount > ( SELECT MAX(salary) FROM regions AS okiv WHERE okiv.code = bev.code );
{ "outer_table": "employees", "inner_table": "regions", "outer_alias": "bev", "inner_alias": "okiv", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07622
train
v1
Schema: transactions (alias: gev)(amount, salary, type, code) items(name, value, salary, status) Task: Select value from transactions where code exists in items for the same id. SQL:
SELECT value FROM transactions AS gev WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "gev", "inner_alias": "ikob", "proj_col": "value", "filter_col": "code", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07623
train
v2
Schema: departments (alias: dov)(id, level, salary, amount) transactions(value, code, date, type) Task: Find value from departments where a matching record exists in transactions with the same id. SQL:
SELECT value FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = dov.id );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dov", "inner_alias": "gev", "proj_col": "value", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07624
train
v2
Schema: departments (alias: dov)(date, type, amount, value) items(name, salary, date, code) Task: Find value from departments where a matching record exists in items with the same status. SQL:
SELECT value FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = dov.status );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "value", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07625
train
v2
Schema: branches (alias: agov)(level, salary, value, type) customers(code, value, date, type) Task: Retrieve amount from branches that have at least one corresponding entry in customers sharing the same id. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = agov.id );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "amount", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07626
train
v3
Schema: items (alias: ikob)(id, status, type, date) branches(value, status, id, type) Task: Find amount from items where salary exceeds the count of salary from branches for the same code. SQL:
SELECT amount FROM items AS ikob WHERE salary > ( SELECT COUNT(salary) FROM branches AS agov WHERE agov.code = ikob.code );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07627
train
v1
Schema: employees (alias: bev)(type, id, value, salary) schedules(type, salary, amount, status) Task: Select id from employees where code exists in schedules for the same id. SQL:
SELECT id FROM employees AS bev WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.id = bev.id );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "id", "filter_col": "code", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07628
train
v1
Schema: products (alias: nad)(status, date, type, level) customers(status, name, type, level) Task: Retrieve name from products whose type is found in customers rows where status matches the outer record. SQL:
SELECT name FROM products AS nad WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.status = nad.status );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "name", "filter_col": "type", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07629
train
v2
Schema: branches (alias: agov)(status, level, value, id) customers(salary, status, value, code) Task: Find amount from branches where a matching record exists in customers with the same id. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = agov.id );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "amount", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07630
train
v3
Schema: products (alias: nad)(type, id, amount, level) requests(salary, level, date, value) Task: Retrieve amount from products with amount above the MIN(salary) of requests rows sharing the same type. SQL:
SELECT amount FROM products AS nad WHERE amount > ( SELECT MIN(salary) FROM requests AS ejof WHERE ejof.type = nad.type );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07631
train
v3
Schema: departments (alias: dov)(value, level, status, amount) shipments(status, name, amount, date) Task: Find name from departments where salary exceeds the total salary from shipments for the same id. SQL:
SELECT name FROM departments AS dov WHERE salary > ( SELECT SUM(salary) FROM shipments AS vnob WHERE vnob.id = dov.id );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07632
train
v3
Schema: products (alias: nad)(id, name, value, salary) orders(id, status, value, amount) Task: Retrieve id from products with value above the MAX(amount) of orders rows sharing the same code. SQL:
SELECT id FROM products AS nad WHERE value > ( SELECT MAX(amount) FROM orders AS kab WHERE kab.code = nad.code );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "nad", "inner_alias": "kab", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07633
train
v1
Schema: branches (alias: agov)(level, name, type, value) employees(date, name, type, salary) Task: Find value from branches where id appears in employees entries with matching type. SQL:
SELECT value FROM branches AS agov WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.type = agov.type );
{ "outer_table": "branches", "inner_table": "employees", "outer_alias": "agov", "inner_alias": "bev", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07634
train
v2
Schema: employees (alias: bev)(type, code, status, name) schedules(amount, salary, level, status) Task: Retrieve value from employees that have at least one corresponding entry in schedules sharing the same status. SQL:
SELECT value FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = bev.status );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "value", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07635
train
v1
Schema: departments (alias: dov)(value, status, amount, id) employees(value, status, name, code) Task: Select name from departments where code exists in employees for the same code. SQL:
SELECT name FROM departments AS dov WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.code = dov.code );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07636
train
v2
Schema: requests (alias: ejof)(type, name, date, amount) invoices(code, amount, id, type) Task: Find amount from requests where a matching record exists in invoices with the same level. SQL:
SELECT amount FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = ejof.level );
{ "outer_table": "requests", "inner_table": "invoices", "outer_alias": "ejof", "inner_alias": "fal", "proj_col": "amount", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07637
train
v2
Schema: tasks (alias: znob)(amount, id, code, level) regions(type, salary, id, value) Task: Retrieve code from tasks that have at least one corresponding entry in regions sharing the same level. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = znob.level );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "code", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07638
train
v1
Schema: employees (alias: bev)(id, level, salary, code) projects(name, status, value, level) Task: Select amount from employees where level exists in projects for the same level. SQL:
SELECT amount FROM employees AS bev WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.level = bev.level );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "level", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07639
train
v1
Schema: products (alias: nad)(id, type, level, code) items(code, type, name, salary) Task: Find amount from products where id appears in items entries with matching type. SQL:
SELECT amount FROM products AS nad WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.type = nad.type );
{ "outer_table": "products", "inner_table": "items", "outer_alias": "nad", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07640
train
v3
Schema: departments (alias: dov)(salary, code, status, type) items(status, code, date, id) Task: Retrieve salary from departments with value above the COUNT(salary) of items rows sharing the same id. SQL:
SELECT salary FROM departments AS dov WHERE value > ( SELECT COUNT(salary) FROM items AS ikob WHERE ikob.id = dov.id );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07641
train
v2
Schema: projects (alias: uliv)(amount, name, type, salary) customers(amount, value, status, level) Task: Retrieve id from projects that have at least one corresponding entry in customers sharing the same status. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = uliv.status );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "uliv", "inner_alias": "lex", "proj_col": "id", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07642
train
v3
Schema: categories (alias: egiv)(value, name, id, date) projects(status, type, code, value) Task: Find name from categories where salary exceeds the count of amount from projects for the same code. SQL:
SELECT name FROM categories AS egiv WHERE salary > ( SELECT COUNT(amount) FROM projects AS uliv WHERE uliv.code = egiv.code );
{ "outer_table": "categories", "inner_table": "projects", "outer_alias": "egiv", "inner_alias": "uliv", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07643
train
v1
Schema: staff (alias: xnob)(type, level, name, status) managers(level, id, amount, date) Task: Select salary from staff where status exists in managers for the same level. SQL:
SELECT salary FROM staff AS xnob WHERE status IN ( SELECT status FROM managers AS hac WHERE hac.level = xnob.level );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "xnob", "inner_alias": "hac", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07644
train
v3
Schema: accounts (alias: jac)(date, name, status, amount) staff(status, code, type, name) Task: Find value from accounts where amount exceeds the total value from staff for the same level. SQL:
SELECT value FROM accounts AS jac WHERE amount > ( SELECT SUM(value) FROM staff AS xnob WHERE xnob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "jac", "inner_alias": "xnob", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07645
train
v2
Schema: tasks (alias: znob)(status, amount, type, value) transactions(salary, status, name, type) Task: Retrieve value from tasks that have at least one corresponding entry in transactions sharing the same id. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = znob.id );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "value", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07646
train
v1
Schema: regions (alias: okiv)(code, status, type, date) requests(status, name, salary, id) Task: Retrieve amount from regions whose status is found in requests rows where status matches the outer record. SQL:
SELECT amount FROM regions AS okiv WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.status = okiv.status );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07647
train
v1
Schema: sales (alias: cif)(name, type, date, amount) branches(id, name, level, date) Task: Retrieve name from sales whose status is found in branches rows where level matches the outer record. SQL:
SELECT name FROM sales AS cif WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.level = cif.level );
{ "outer_table": "sales", "inner_table": "branches", "outer_alias": "cif", "inner_alias": "agov", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07648
train
v3
Schema: products (alias: nad)(type, date, code, level) accounts(salary, code, status, level) Task: Find amount from products where amount exceeds the count of salary from accounts for the same level. SQL:
SELECT amount FROM products AS nad WHERE amount > ( SELECT COUNT(salary) FROM accounts AS jac WHERE jac.level = nad.level );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07649
train
v3
Schema: products (alias: nad)(status, level, code, value) staff(date, level, salary, id) Task: Retrieve id from products with value above the COUNT(salary) of staff rows sharing the same level. SQL:
SELECT id FROM products AS nad WHERE value > ( SELECT COUNT(salary) FROM staff AS xnob WHERE xnob.level = nad.level );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07650
train
v3
Schema: items (alias: ikob)(level, date, value, name) branches(date, salary, type, id) Task: Retrieve salary from items with amount above the MIN(salary) of branches rows sharing the same status. SQL:
SELECT salary FROM items AS ikob WHERE amount > ( SELECT MIN(salary) FROM branches AS agov WHERE agov.status = ikob.status );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07651
train
v1
Schema: accounts (alias: jac)(code, salary, value, name) departments(name, level, code, value) Task: Select amount from accounts where code exists in departments for the same type. SQL:
SELECT amount FROM accounts AS jac WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.type = jac.type );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07652
train
v3
Schema: orders (alias: kab)(name, salary, amount, id) projects(level, id, value, salary) Task: Retrieve id from orders with value above the SUM(value) of projects rows sharing the same id. SQL:
SELECT id FROM orders AS kab WHERE value > ( SELECT SUM(value) FROM projects AS uliv WHERE uliv.id = kab.id );
{ "outer_table": "orders", "inner_table": "projects", "outer_alias": "kab", "inner_alias": "uliv", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07653
train
v2
Schema: products (alias: nad)(code, id, amount, type) items(id, code, status, amount) Task: Retrieve salary from products that have at least one corresponding entry in items sharing the same status. SQL:
SELECT salary FROM products AS nad WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = nad.status );
{ "outer_table": "products", "inner_table": "items", "outer_alias": "nad", "inner_alias": "ikob", "proj_col": "salary", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07654
train
v1
Schema: shipments (alias: vnob)(status, type, amount, salary) categories(salary, name, code, level) Task: Select amount from shipments where type exists in categories for the same id. SQL:
SELECT amount FROM shipments AS vnob WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "categories", "outer_alias": "vnob", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07655
train
v1
Schema: projects (alias: uliv)(level, type, id, amount) sales(name, id, code, date) Task: Select id from projects where code exists in sales for the same level. SQL:
SELECT id FROM projects AS uliv WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.level = uliv.level );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07656
train
v1
Schema: requests (alias: ejof)(name, type, amount, value) categories(id, level, date, value) Task: Select id from requests where type exists in categories for the same id. SQL:
SELECT id FROM requests AS ejof WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.id = ejof.id );
{ "outer_table": "requests", "inner_table": "categories", "outer_alias": "ejof", "inner_alias": "egiv", "proj_col": "id", "filter_col": "type", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07657
train
v2
Schema: accounts (alias: jac)(status, type, amount, level) schedules(id, name, level, date) Task: Find id from accounts where a matching record exists in schedules with the same code. SQL:
SELECT id FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = jac.code );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "id", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07658
train
v2
Schema: accounts (alias: jac)(name, status, salary, value) customers(date, salary, amount, level) Task: Retrieve code from accounts that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT code FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = jac.type );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "code", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07659
train
v1
Schema: projects (alias: uliv)(level, type, id, name) schedules(id, salary, level, status) Task: Retrieve id from projects whose status is found in schedules rows where type matches the outer record. SQL:
SELECT id FROM projects AS uliv WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07660
train
v1
Schema: staff (alias: xnob)(status, date, type, amount) employees(name, amount, date, salary) Task: Retrieve name from staff whose status is found in employees rows where status matches the outer record. SQL:
SELECT name FROM staff AS xnob WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.status = xnob.status );
{ "outer_table": "staff", "inner_table": "employees", "outer_alias": "xnob", "inner_alias": "bev", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07661
train
v3
Schema: products (alias: nad)(type, level, id, code) accounts(date, type, salary, id) Task: Find code from products where salary exceeds the maximum salary from accounts for the same code. SQL:
SELECT code FROM products AS nad WHERE salary > ( SELECT MAX(salary) FROM accounts AS jac WHERE jac.code = nad.code );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07662
train
v3
Schema: tasks (alias: znob)(status, value, amount, id) staff(status, code, level, type) Task: Retrieve id from tasks with salary above the AVG(value) of staff rows sharing the same code. SQL:
SELECT id FROM tasks AS znob WHERE salary > ( SELECT AVG(value) FROM staff AS xnob WHERE xnob.code = znob.code );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07663
train
v2
Schema: staff (alias: xnob)(status, value, type, code) requests(type, value, date, status) Task: Find code from staff where a matching record exists in requests with the same code. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = xnob.code );
{ "outer_table": "staff", "inner_table": "requests", "outer_alias": "xnob", "inner_alias": "ejof", "proj_col": "code", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07664
train
v3
Schema: accounts (alias: jac)(code, value, type, level) projects(name, level, date, code) Task: Find name from accounts where value exceeds the count of amount from projects for the same type. SQL:
SELECT name FROM accounts AS jac WHERE value > ( SELECT COUNT(amount) FROM projects AS uliv WHERE uliv.type = jac.type );
{ "outer_table": "accounts", "inner_table": "projects", "outer_alias": "jac", "inner_alias": "uliv", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07665
train
v1
Schema: customers (alias: lex)(value, type, name, code) transactions(salary, code, date, amount) Task: Select id from customers where type exists in transactions for the same id. SQL:
SELECT id FROM customers AS lex WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.id = lex.id );
{ "outer_table": "customers", "inner_table": "transactions", "outer_alias": "lex", "inner_alias": "gev", "proj_col": "id", "filter_col": "type", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07666
train
v3
Schema: transactions (alias: gev)(date, name, code, status) invoices(code, level, amount, value) Task: Retrieve amount from transactions with amount above the MIN(amount) of invoices rows sharing the same code. SQL:
SELECT amount FROM transactions AS gev WHERE amount > ( SELECT MIN(amount) FROM invoices AS fal WHERE fal.code = gev.code );
{ "outer_table": "transactions", "inner_table": "invoices", "outer_alias": "gev", "inner_alias": "fal", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07667
train
v3
Schema: requests (alias: ejof)(amount, name, value, id) projects(value, id, amount, name) Task: Retrieve code from requests with value above the MIN(value) of projects rows sharing the same level. SQL:
SELECT code FROM requests AS ejof WHERE value > ( SELECT MIN(value) FROM projects AS uliv WHERE uliv.level = ejof.level );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07668
train
v1
Schema: schedules (alias: vmob)(status, amount, level, value) invoices(status, code, type, level) Task: Retrieve code from schedules whose id is found in invoices rows where status matches the outer record. SQL:
SELECT code FROM schedules AS vmob WHERE id IN ( SELECT id FROM invoices AS fal WHERE fal.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "vmob", "inner_alias": "fal", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07669
train
v1
Schema: sales (alias: cif)(name, type, status, date) transactions(salary, type, date, id) Task: Find salary from sales where code appears in transactions entries with matching level. SQL:
SELECT salary FROM sales AS cif WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.level = cif.level );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "salary", "filter_col": "code", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07670
train
v1
Schema: products (alias: nad)(status, code, name, amount) requests(name, value, id, salary) Task: Select value from products where type exists in requests for the same code. SQL:
SELECT value FROM products AS nad WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.code = nad.code );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "value", "filter_col": "type", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07671
train
v3
Schema: shipments (alias: vnob)(value, level, status, id) projects(id, status, salary, level) Task: Retrieve salary from shipments with amount above the SUM(salary) of projects rows sharing the same level. SQL:
SELECT salary FROM shipments AS vnob WHERE amount > ( SELECT SUM(salary) FROM projects AS uliv WHERE uliv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "projects", "outer_alias": "vnob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07672
train
v3
Schema: requests (alias: ejof)(amount, value, id, salary) branches(date, salary, amount, name) Task: Retrieve value from requests with value above the MIN(value) of branches rows sharing the same code. SQL:
SELECT value FROM requests AS ejof WHERE value > ( SELECT MIN(value) FROM branches AS agov WHERE agov.code = ejof.code );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07673
train
v2
Schema: staff (alias: xnob)(date, name, status, salary) tasks(date, amount, code, salary) Task: Retrieve amount from staff that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "tasks", "outer_alias": "xnob", "inner_alias": "znob", "proj_col": "amount", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07674
train
v3
Schema: managers (alias: hac)(value, level, status, code) orders(amount, level, name, code) Task: Retrieve id from managers with amount above the MAX(salary) of orders rows sharing the same type. SQL:
SELECT id FROM managers AS hac WHERE amount > ( SELECT MAX(salary) FROM orders AS kab WHERE kab.type = hac.type );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07675
train
v2
Schema: categories (alias: egiv)(code, date, amount, name) orders(amount, type, status, id) Task: Retrieve value from categories that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT value FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = egiv.type );
{ "outer_table": "categories", "inner_table": "orders", "outer_alias": "egiv", "inner_alias": "kab", "proj_col": "value", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07676
train
v1
Schema: employees (alias: bev)(date, name, status, type) shipments(value, type, id, date) Task: Select code from employees where type exists in shipments for the same type. SQL:
SELECT code FROM employees AS bev WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.type = bev.type );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "code", "filter_col": "type", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07677
train
v3
Schema: orders (alias: kab)(code, value, status, name) categories(date, name, salary, amount) Task: Retrieve value from orders with value above the MAX(value) of categories rows sharing the same id. SQL:
SELECT value FROM orders AS kab WHERE value > ( SELECT MAX(value) FROM categories AS egiv WHERE egiv.id = kab.id );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07678
train
v1
Schema: staff (alias: xnob)(date, status, code, amount) items(value, status, type, date) Task: Find amount from staff where id appears in items entries with matching status. SQL:
SELECT amount FROM staff AS xnob WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "items", "outer_alias": "xnob", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07679
train
v2
Schema: accounts (alias: jac)(date, amount, status, level) categories(id, name, status, level) Task: Find value from accounts where a matching record exists in categories with the same status. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = jac.status );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "jac", "inner_alias": "egiv", "proj_col": "value", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07680
train
v1
Schema: regions (alias: okiv)(salary, id, date, code) departments(salary, status, id, amount) Task: Retrieve id from regions whose id is found in departments rows where level matches the outer record. SQL:
SELECT id FROM regions AS okiv WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.level = okiv.level );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "okiv", "inner_alias": "dov", "proj_col": "id", "filter_col": "id", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07681
train
v1
Schema: branches (alias: agov)(name, code, salary, level) managers(code, salary, name, id) Task: Find id from branches where code appears in managers entries with matching level. SQL:
SELECT id FROM branches AS agov WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.level = agov.level );
{ "outer_table": "branches", "inner_table": "managers", "outer_alias": "agov", "inner_alias": "hac", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07682
train
v1
Schema: sales (alias: cif)(amount, code, level, type) staff(status, type, id, level) Task: Select salary from sales where code exists in staff for the same status. SQL:
SELECT salary FROM sales AS cif WHERE code IN ( SELECT code FROM staff AS xnob WHERE xnob.status = cif.status );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07683
train
v2
Schema: employees (alias: bev)(code, status, amount, type) projects(name, id, amount, code) Task: Retrieve code from employees that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = bev.code );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "code", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07684
train
v2
Schema: products (alias: nad)(code, type, value, salary) shipments(name, level, status, salary) Task: Retrieve code from products that have at least one corresponding entry in shipments sharing the same type. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = nad.type );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "code", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07685
train
v1
Schema: products (alias: nad)(level, id, type, value) shipments(name, type, amount, code) Task: Retrieve id from products whose level is found in shipments rows where code matches the outer record. SQL:
SELECT id FROM products AS nad WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.code = nad.code );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07686
train
v2
Schema: items (alias: ikob)(date, name, value, amount) accounts(name, code, value, date) Task: Retrieve amount from items that have at least one corresponding entry in accounts sharing the same level. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = ikob.level );
{ "outer_table": "items", "inner_table": "accounts", "outer_alias": "ikob", "inner_alias": "jac", "proj_col": "amount", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07687
train
v3
Schema: sales (alias: cif)(id, level, code, value) employees(level, status, type, amount) Task: Retrieve salary from sales with value above the COUNT(salary) of employees rows sharing the same status. SQL:
SELECT salary FROM sales AS cif WHERE value > ( SELECT COUNT(salary) FROM employees AS bev WHERE bev.status = cif.status );
{ "outer_table": "sales", "inner_table": "employees", "outer_alias": "cif", "inner_alias": "bev", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07688
train
v1
Schema: accounts (alias: jac)(name, salary, id, type) customers(salary, code, status, value) Task: Retrieve value from accounts whose status is found in customers rows where id matches the outer record. SQL:
SELECT value FROM accounts AS jac WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.id = jac.id );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "value", "filter_col": "status", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07689
train
v2
Schema: orders (alias: kab)(status, date, level, id) customers(code, value, name, id) Task: Find code from orders where a matching record exists in customers with the same code. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = kab.code );
{ "outer_table": "orders", "inner_table": "customers", "outer_alias": "kab", "inner_alias": "lex", "proj_col": "code", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07690
train
v2
Schema: orders (alias: kab)(value, amount, id, name) managers(code, value, id, salary) Task: Retrieve amount from orders that have at least one corresponding entry in managers sharing the same status. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = kab.status );
{ "outer_table": "orders", "inner_table": "managers", "outer_alias": "kab", "inner_alias": "hac", "proj_col": "amount", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07691
train
v1
Schema: products (alias: nad)(status, type, date, id) employees(type, amount, code, value) Task: Select salary from products where status exists in employees for the same type. SQL:
SELECT salary FROM products AS nad WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.type = nad.type );
{ "outer_table": "products", "inner_table": "employees", "outer_alias": "nad", "inner_alias": "bev", "proj_col": "salary", "filter_col": "status", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07692
train
v1
Schema: employees (alias: bev)(type, level, code, date) projects(value, code, level, date) Task: Retrieve name from employees whose type is found in projects rows where level matches the outer record. SQL:
SELECT name FROM employees AS bev WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.level = bev.level );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "name", "filter_col": "type", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07693
train
v1
Schema: categories (alias: egiv)(salary, level, status, amount) schedules(amount, name, date, code) Task: Retrieve salary from categories whose type is found in schedules rows where status matches the outer record. SQL:
SELECT salary FROM categories AS egiv WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "egiv", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "type", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07694
train
v2
Schema: branches (alias: agov)(status, value, type, date) employees(salary, level, status, name) Task: Retrieve amount from branches that have at least one corresponding entry in employees sharing the same level. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = agov.level );
{ "outer_table": "branches", "inner_table": "employees", "outer_alias": "agov", "inner_alias": "bev", "proj_col": "amount", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07695
train
v3
Schema: branches (alias: agov)(type, value, level, status) sales(code, level, date, name) Task: Find code from branches where salary exceeds the maximum amount from sales for the same code. SQL:
SELECT code FROM branches AS agov WHERE salary > ( SELECT MAX(amount) FROM sales AS cif WHERE cif.code = agov.code );
{ "outer_table": "branches", "inner_table": "sales", "outer_alias": "agov", "inner_alias": "cif", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07696
train
v1
Schema: categories (alias: egiv)(status, name, amount, value) invoices(status, type, amount, salary) Task: Select value from categories where id exists in invoices for the same type. SQL:
SELECT value FROM categories AS egiv WHERE id IN ( SELECT id FROM invoices AS fal WHERE fal.type = egiv.type );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07697
train
v2
Schema: sales (alias: cif)(level, amount, name, id) accounts(name, id, level, value) Task: Find value from sales where a matching record exists in accounts with the same status. SQL:
SELECT value FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = cif.status );
{ "outer_table": "sales", "inner_table": "accounts", "outer_alias": "cif", "inner_alias": "jac", "proj_col": "value", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07698
train
v1
Schema: branches (alias: agov)(id, amount, level, code) managers(amount, status, type, level) Task: Find code from branches where status appears in managers entries with matching id. SQL:
SELECT code FROM branches AS agov WHERE status IN ( SELECT status FROM managers AS hac WHERE hac.id = agov.id );
{ "outer_table": "branches", "inner_table": "managers", "outer_alias": "agov", "inner_alias": "hac", "proj_col": "code", "filter_col": "status", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07699
train