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: managers (alias: hac)(type, value, id, name) accounts(date, value, type, level) Task: Find value from managers where level appears in accounts entries with matching level. SQL:
SELECT value FROM managers AS hac WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.level = hac.level );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "value", "filter_col": "level", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02600
train
v3
Schema: sales (alias: cif)(date, type, salary, name) orders(type, amount, level, date) Task: Retrieve name from sales with salary above the SUM(salary) of orders rows sharing the same id. SQL:
SELECT name FROM sales AS cif WHERE salary > ( SELECT SUM(salary) FROM orders AS kab WHERE kab.id = cif.id );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02601
train
v2
Schema: managers (alias: hac)(type, level, name, value) shipments(id, salary, name, type) Task: Retrieve code from managers that have at least one corresponding entry in shipments sharing the same type. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = hac.type );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "hac", "inner_alias": "vnob", "proj_col": "code", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02602
train
v3
Schema: sales (alias: cif)(id, value, level, status) accounts(salary, amount, name, code) Task: Retrieve salary from sales with salary above the COUNT(value) of accounts rows sharing the same type. SQL:
SELECT salary FROM sales AS cif WHERE salary > ( SELECT COUNT(value) FROM accounts AS jac WHERE jac.type = cif.type );
{ "outer_table": "sales", "inner_table": "accounts", "outer_alias": "cif", "inner_alias": "jac", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02603
train
v2
Schema: projects (alias: uliv)(status, amount, id, salary) items(level, value, code, type) Task: Retrieve value from projects that have at least one corresponding entry in items sharing the same level. SQL:
SELECT value FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "value", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02604
train
v3
Schema: departments (alias: dov)(id, status, salary, code) projects(id, amount, status, value) Task: Find id from departments where value exceeds the minimum salary from projects for the same code. SQL:
SELECT id FROM departments AS dov WHERE value > ( SELECT MIN(salary) FROM projects AS uliv WHERE uliv.code = dov.code );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02605
train
v3
Schema: schedules (alias: vmob)(amount, code, date, salary) tasks(date, id, level, value) Task: Retrieve code from schedules with amount above the MAX(amount) of tasks rows sharing the same type. SQL:
SELECT code FROM schedules AS vmob WHERE amount > ( SELECT MAX(amount) FROM tasks AS znob WHERE znob.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02606
train
v1
Schema: tasks (alias: znob)(level, type, amount, date) accounts(status, amount, salary, name) Task: Retrieve value from tasks whose code is found in accounts rows where type matches the outer record. SQL:
SELECT value FROM tasks AS znob WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.type = znob.type );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02607
train
v3
Schema: branches (alias: agov)(value, salary, id, level) invoices(code, name, amount, type) Task: Retrieve id from branches with salary above the COUNT(salary) of invoices rows sharing the same level. SQL:
SELECT id FROM branches AS agov WHERE salary > ( SELECT COUNT(salary) FROM invoices AS fal WHERE fal.level = agov.level );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02608
train
v3
Schema: items (alias: ikob)(code, level, salary, value) transactions(value, id, type, salary) Task: Retrieve salary from items with amount above the SUM(amount) of transactions rows sharing the same level. SQL:
SELECT salary FROM items AS ikob WHERE amount > ( SELECT SUM(amount) FROM transactions AS gev WHERE gev.level = ikob.level );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "ikob", "inner_alias": "gev", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02609
train
v2
Schema: schedules (alias: vmob)(amount, value, type, code) items(salary, name, type, status) Task: Retrieve value from schedules that have at least one corresponding entry in items sharing the same type. SQL:
SELECT value FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "vmob", "inner_alias": "ikob", "proj_col": "value", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02610
train
v1
Schema: products (alias: nad)(status, date, name, id) items(status, value, level, type) Task: Retrieve code from products whose id is found in items rows where type matches the outer record. SQL:
SELECT code 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": "code", "filter_col": "id", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02611
train
v3
Schema: departments (alias: dov)(salary, amount, value, id) invoices(level, id, name, amount) Task: Retrieve value from departments with value above the SUM(salary) of invoices rows sharing the same id. SQL:
SELECT value FROM departments AS dov WHERE value > ( SELECT SUM(salary) FROM invoices AS fal WHERE fal.id = dov.id );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02612
train
v1
Schema: transactions (alias: gev)(value, amount, date, id) categories(status, type, amount, id) Task: Find value from transactions where type appears in categories entries with matching status. SQL:
SELECT value FROM transactions AS gev WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.status = gev.status );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02613
train
v3
Schema: schedules (alias: vmob)(date, type, code, status) invoices(id, value, date, level) Task: Retrieve name from schedules with value above the COUNT(salary) of invoices rows sharing the same level. SQL:
SELECT name FROM schedules AS vmob WHERE value > ( SELECT COUNT(salary) FROM invoices AS fal WHERE fal.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "vmob", "inner_alias": "fal", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02614
train
v3
Schema: products (alias: nad)(type, salary, code, name) departments(salary, id, status, type) Task: Retrieve code from products with salary above the AVG(salary) of departments rows sharing the same level. SQL:
SELECT code FROM products AS nad WHERE salary > ( SELECT AVG(salary) FROM departments AS dov WHERE dov.level = nad.level );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02615
train
v2
Schema: categories (alias: egiv)(name, type, status, code) invoices(code, level, salary, amount) Task: Find id from categories where a matching record exists in invoices with the same level. SQL:
SELECT id FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = egiv.level );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "id", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02616
train
v2
Schema: employees (alias: bev)(name, amount, level, type) orders(id, date, type, status) Task: Find value from employees where a matching record exists in orders with the same status. SQL:
SELECT value FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = bev.status );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "value", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02617
train
v1
Schema: invoices (alias: fal)(name, date, value, level) branches(amount, type, salary, code) Task: Find name from invoices where status appears in branches entries with matching status. 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_02618
train
v3
Schema: categories (alias: egiv)(value, date, type, salary) staff(salary, type, status, level) Task: Find value from categories where amount exceeds the total salary from staff for the same type. SQL:
SELECT value FROM categories AS egiv WHERE amount > ( SELECT SUM(salary) FROM staff AS xnob WHERE xnob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "staff", "outer_alias": "egiv", "inner_alias": "xnob", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02619
train
v1
Schema: regions (alias: okiv)(id, date, amount, code) invoices(name, amount, status, level) Task: Find value from regions where status appears in invoices entries with matching type. SQL:
SELECT value FROM regions AS okiv WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.type = okiv.type );
{ "outer_table": "regions", "inner_table": "invoices", "outer_alias": "okiv", "inner_alias": "fal", "proj_col": "value", "filter_col": "status", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02620
train
v2
Schema: customers (alias: lex)(level, value, salary, id) sales(amount, code, level, status) Task: Retrieve id from customers that have at least one corresponding entry in sales sharing the same level. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = lex.level );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "id", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02621
train
v2
Schema: employees (alias: bev)(level, value, salary, name) customers(status, code, salary, date) Task: Find code from employees where a matching record exists in customers with the same status. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = bev.status );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "bev", "inner_alias": "lex", "proj_col": "code", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02622
train
v3
Schema: managers (alias: hac)(amount, salary, date, type) tasks(status, amount, level, name) Task: Find name from managers where value exceeds the maximum salary from tasks for the same type. SQL:
SELECT name FROM managers AS hac WHERE value > ( SELECT MAX(salary) FROM tasks AS znob WHERE znob.type = hac.type );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02623
train
v1
Schema: customers (alias: lex)(name, salary, level, date) schedules(value, id, amount, level) Task: Retrieve id from customers whose type is found in schedules rows where type matches the outer record. SQL:
SELECT id FROM customers AS lex WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.type = lex.type );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "id", "filter_col": "type", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02624
train
v2
Schema: products (alias: nad)(code, salary, value, status) tasks(level, date, status, id) Task: Find code from products where a matching record exists in tasks with the same level. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.level = nad.level );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "code", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02625
train
v1
Schema: managers (alias: hac)(type, code, date, status) categories(type, id, name, amount) Task: Select value from managers where code exists in categories for the same level. SQL:
SELECT value FROM managers AS hac WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.level = hac.level );
{ "outer_table": "managers", "inner_table": "categories", "outer_alias": "hac", "inner_alias": "egiv", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02626
train
v3
Schema: invoices (alias: fal)(level, value, status, salary) transactions(type, amount, id, date) Task: Find id from invoices where amount exceeds the count of amount from transactions for the same code. SQL:
SELECT id FROM invoices AS fal WHERE amount > ( SELECT COUNT(amount) FROM transactions AS gev WHERE gev.code = fal.code );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02627
train
v1
Schema: transactions (alias: gev)(salary, status, type, name) sales(level, date, type, value) Task: Retrieve amount from transactions whose type is found in sales rows where status matches the outer record. SQL:
SELECT amount FROM transactions AS gev WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.status = gev.status );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "amount", "filter_col": "type", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02628
train
v3
Schema: regions (alias: okiv)(code, status, type, name) items(type, code, value, amount) Task: Find code from regions where value exceeds the maximum salary from items for the same type. SQL:
SELECT code FROM regions AS okiv WHERE value > ( SELECT MAX(salary) FROM items AS ikob WHERE ikob.type = okiv.type );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02629
train
v3
Schema: customers (alias: lex)(type, salary, status, date) branches(status, value, type, amount) Task: Find salary from customers where value exceeds the minimum amount from branches for the same level. SQL:
SELECT salary FROM customers AS lex WHERE value > ( SELECT MIN(amount) FROM branches AS agov WHERE agov.level = lex.level );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02630
train
v2
Schema: departments (alias: dov)(level, status, name, value) requests(code, id, level, salary) Task: Find name from departments where a matching record exists in requests with the same code. SQL:
SELECT name FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = dov.code );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "name", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02631
train
v2
Schema: branches (alias: agov)(id, date, name, code) sales(salary, id, value, date) Task: Retrieve salary from branches that have at least one corresponding entry in sales sharing the same type. SQL:
SELECT salary FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = agov.type );
{ "outer_table": "branches", "inner_table": "sales", "outer_alias": "agov", "inner_alias": "cif", "proj_col": "salary", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02632
train
v3
Schema: projects (alias: uliv)(amount, salary, code, status) invoices(name, amount, code, value) Task: Retrieve salary from projects with amount above the AVG(amount) of invoices rows sharing the same level. SQL:
SELECT salary FROM projects AS uliv WHERE amount > ( SELECT AVG(amount) FROM invoices AS fal WHERE fal.level = uliv.level );
{ "outer_table": "projects", "inner_table": "invoices", "outer_alias": "uliv", "inner_alias": "fal", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02633
train
v3
Schema: customers (alias: lex)(id, amount, name, code) projects(salary, type, status, amount) Task: Find amount from customers where amount exceeds the count of salary from projects for the same status. SQL:
SELECT amount FROM customers AS lex WHERE amount > ( SELECT COUNT(salary) FROM projects AS uliv WHERE uliv.status = lex.status );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02634
train
v3
Schema: categories (alias: egiv)(name, salary, date, id) accounts(status, salary, value, code) Task: Retrieve code from categories with value above the MIN(salary) of accounts rows sharing the same level. SQL:
SELECT code FROM categories AS egiv WHERE value > ( SELECT MIN(salary) FROM accounts AS jac WHERE jac.level = egiv.level );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "egiv", "inner_alias": "jac", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02635
train
v3
Schema: shipments (alias: vnob)(level, code, type, amount) managers(status, type, id, level) Task: Find value from shipments where value exceeds the minimum amount from managers for the same id. SQL:
SELECT value FROM shipments AS vnob WHERE value > ( SELECT MIN(amount) FROM managers AS hac WHERE hac.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02636
train
v1
Schema: transactions (alias: gev)(name, date, value, amount) staff(amount, salary, status, id) Task: Retrieve amount from transactions whose level is found in staff rows where status matches the outer record. SQL:
SELECT amount FROM transactions AS gev WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.status = gev.status );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02637
train
v3
Schema: schedules (alias: vmob)(date, amount, level, salary) managers(amount, date, type, salary) Task: Retrieve name from schedules with amount above the SUM(amount) of managers rows sharing the same code. SQL:
SELECT name FROM schedules AS vmob WHERE amount > ( SELECT SUM(amount) FROM managers AS hac WHERE hac.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02638
train
v2
Schema: categories (alias: egiv)(id, amount, status, name) departments(amount, value, name, code) Task: Retrieve code from categories that have at least one corresponding entry in departments sharing the same level. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = egiv.level );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "code", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02639
train
v1
Schema: schedules (alias: vmob)(level, code, name, type) invoices(name, type, status, code) Task: Retrieve name from schedules whose status is found in invoices rows where level matches the outer record. SQL:
SELECT name FROM schedules AS vmob WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "vmob", "inner_alias": "fal", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02640
train
v2
Schema: requests (alias: ejof)(name, status, date, type) tasks(date, type, status, salary) Task: Retrieve salary from requests that have at least one corresponding entry in tasks sharing the same code. SQL:
SELECT salary FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "salary", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02641
train
v1
Schema: customers (alias: lex)(id, date, code, type) sales(value, level, name, status) Task: Retrieve amount from customers whose status is found in sales rows where code matches the outer record. SQL:
SELECT amount FROM customers AS lex WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.code = lex.code );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "amount", "filter_col": "status", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02642
train
v2
Schema: shipments (alias: vnob)(code, type, date, amount) accounts(name, date, level, id) Task: Find name from shipments where a matching record exists in accounts with the same level. SQL:
SELECT name FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "accounts", "outer_alias": "vnob", "inner_alias": "jac", "proj_col": "name", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02643
train
v1
Schema: transactions (alias: gev)(code, type, name, value) items(salary, amount, status, level) Task: Retrieve value from transactions whose type is found in items rows where code matches the outer record. SQL:
SELECT value FROM transactions AS gev WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.code = gev.code );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "gev", "inner_alias": "ikob", "proj_col": "value", "filter_col": "type", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02644
train
v3
Schema: customers (alias: lex)(level, value, id, salary) staff(status, level, type, id) Task: Find id from customers where salary exceeds the minimum amount from staff for the same code. SQL:
SELECT id FROM customers AS lex WHERE salary > ( SELECT MIN(amount) FROM staff AS xnob WHERE xnob.code = lex.code );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02645
train
v3
Schema: schedules (alias: vmob)(date, name, level, id) shipments(name, salary, type, date) Task: Find id from schedules where value exceeds the maximum value from shipments for the same id. SQL:
SELECT id FROM schedules AS vmob WHERE value > ( SELECT MAX(value) FROM shipments AS vnob WHERE vnob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "shipments", "outer_alias": "vmob", "inner_alias": "vnob", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02646
train
v3
Schema: customers (alias: lex)(status, type, id, amount) invoices(level, id, type, amount) Task: Retrieve salary from customers with amount above the AVG(amount) of invoices rows sharing the same id. SQL:
SELECT salary FROM customers AS lex WHERE amount > ( SELECT AVG(amount) FROM invoices AS fal WHERE fal.id = lex.id );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "lex", "inner_alias": "fal", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02647
train
v3
Schema: orders (alias: kab)(salary, type, code, value) schedules(name, salary, status, code) Task: Find code from orders where amount exceeds the maximum salary from schedules for the same code. SQL:
SELECT code FROM orders AS kab WHERE amount > ( SELECT MAX(salary) FROM schedules AS vmob WHERE vmob.code = kab.code );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02648
train
v1
Schema: departments (alias: dov)(name, status, id, salary) sales(status, amount, level, name) Task: Retrieve salary from departments whose level is found in sales rows where type matches the outer record. SQL:
SELECT salary FROM departments AS dov WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.type = dov.type );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "salary", "filter_col": "level", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02649
train
v2
Schema: accounts (alias: jac)(level, date, salary, name) items(level, type, value, salary) Task: Retrieve amount from accounts that have at least one corresponding entry in items sharing the same type. SQL:
SELECT amount FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "amount", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02650
train
v1
Schema: sales (alias: cif)(amount, id, type, code) categories(value, type, id, level) Task: Retrieve value from sales whose type is found in categories rows where code matches the outer record. SQL:
SELECT value FROM sales AS cif WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.code = cif.code );
{ "outer_table": "sales", "inner_table": "categories", "outer_alias": "cif", "inner_alias": "egiv", "proj_col": "value", "filter_col": "type", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02651
train
v2
Schema: managers (alias: hac)(level, code, id, status) accounts(id, value, amount, salary) Task: Retrieve salary from managers that have at least one corresponding entry in accounts sharing the same status. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = hac.status );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "salary", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02652
train
v3
Schema: projects (alias: uliv)(name, salary, status, level) schedules(salary, level, code, value) Task: Find code from projects where salary exceeds the maximum salary from schedules for the same code. SQL:
SELECT code FROM projects AS uliv WHERE salary > ( SELECT MAX(salary) FROM schedules AS vmob WHERE vmob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02653
train
v3
Schema: schedules (alias: vmob)(name, code, id, level) departments(date, value, id, name) Task: Find name from schedules where value exceeds the count of amount from departments for the same level. SQL:
SELECT name FROM schedules AS vmob WHERE value > ( SELECT COUNT(amount) FROM departments AS dov WHERE dov.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "vmob", "inner_alias": "dov", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02654
train
v3
Schema: accounts (alias: jac)(level, type, amount, id) regions(status, code, date, id) Task: Find amount from accounts where amount exceeds the minimum value from regions for the same status. SQL:
SELECT amount FROM accounts AS jac WHERE amount > ( SELECT MIN(value) FROM regions AS okiv WHERE okiv.status = jac.status );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02655
train
v1
Schema: requests (alias: ejof)(salary, status, type, name) items(type, status, salary, id) Task: Select name from requests where level exists in items for the same status. SQL:
SELECT name FROM requests AS ejof WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "items", "outer_alias": "ejof", "inner_alias": "ikob", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02656
train
v1
Schema: branches (alias: agov)(salary, amount, value, status) managers(name, id, code, amount) Task: Retrieve code from branches whose code is found in managers rows where code matches the outer record. SQL:
SELECT code FROM branches AS agov WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.code = agov.code );
{ "outer_table": "branches", "inner_table": "managers", "outer_alias": "agov", "inner_alias": "hac", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02657
train
v2
Schema: requests (alias: ejof)(type, salary, date, status) orders(type, status, amount, level) Task: Retrieve id from requests that have at least one corresponding entry in orders sharing the same code. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.code = ejof.code );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "id", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02658
train
v3
Schema: transactions (alias: gev)(amount, id, type, code) schedules(salary, value, status, id) Task: Find id from transactions where salary exceeds the count of value from schedules for the same id. SQL:
SELECT id FROM transactions AS gev WHERE salary > ( SELECT COUNT(value) FROM schedules AS vmob WHERE vmob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "schedules", "outer_alias": "gev", "inner_alias": "vmob", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02659
train
v1
Schema: sales (alias: cif)(code, amount, level, type) regions(id, date, amount, status) Task: Retrieve id from sales whose level is found in regions rows where type matches the outer record. SQL:
SELECT id FROM sales AS cif WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.type = cif.type );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02660
train
v3
Schema: managers (alias: hac)(status, level, value, type) accounts(status, date, name, level) Task: Retrieve code from managers with salary above the AVG(amount) of accounts rows sharing the same status. SQL:
SELECT code FROM managers AS hac WHERE salary > ( SELECT AVG(amount) FROM accounts AS jac WHERE jac.status = hac.status );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02661
train
v1
Schema: transactions (alias: gev)(code, type, date, level) customers(id, status, amount, code) Task: Retrieve code from transactions whose code is found in customers rows where code matches the outer record. SQL:
SELECT code FROM transactions AS gev WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.code = gev.code );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "gev", "inner_alias": "lex", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02662
train
v2
Schema: departments (alias: dov)(name, code, id, type) tasks(code, name, amount, value) Task: Retrieve code from departments that have at least one corresponding entry in tasks sharing the same type. SQL:
SELECT code FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = dov.type );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dov", "inner_alias": "znob", "proj_col": "code", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02663
train
v3
Schema: managers (alias: hac)(status, value, level, salary) accounts(value, type, amount, id) Task: Find id from managers where salary exceeds the average salary from accounts for the same id. SQL:
SELECT id FROM managers AS hac WHERE salary > ( SELECT AVG(salary) FROM accounts AS jac WHERE jac.id = hac.id );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02664
train
v3
Schema: accounts (alias: jac)(value, type, code, status) staff(id, value, name, type) Task: Find code from accounts where salary exceeds the count of salary from staff for the same id. SQL:
SELECT code FROM accounts AS jac WHERE salary > ( SELECT COUNT(salary) FROM staff AS xnob WHERE xnob.id = jac.id );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "jac", "inner_alias": "xnob", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02665
train
v2
Schema: transactions (alias: gev)(level, name, amount, type) customers(date, value, amount, code) Task: Retrieve amount from transactions that have at least one corresponding entry in customers sharing the same id. SQL:
SELECT amount FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = gev.id );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "gev", "inner_alias": "lex", "proj_col": "amount", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02666
train
v3
Schema: accounts (alias: jac)(id, type, name, date) tasks(salary, status, date, name) Task: Retrieve code from accounts with salary above the SUM(value) of tasks rows sharing the same level. SQL:
SELECT code FROM accounts AS jac WHERE salary > ( SELECT SUM(value) FROM tasks AS znob WHERE znob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "tasks", "outer_alias": "jac", "inner_alias": "znob", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02667
train
v2
Schema: schedules (alias: vmob)(amount, level, date, name) managers(status, code, type, level) Task: Find id from schedules where a matching record exists in managers with the same level. SQL:
SELECT id FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "id", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02668
train
v2
Schema: invoices (alias: fal)(salary, id, status, level) items(level, status, id, type) Task: Retrieve salary from invoices that have at least one corresponding entry in items sharing the same level. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = fal.level );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "fal", "inner_alias": "ikob", "proj_col": "salary", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02669
train
v3
Schema: tasks (alias: znob)(value, type, name, status) staff(name, value, type, amount) Task: Find name from tasks where value exceeds the average amount from staff for the same code. SQL:
SELECT name FROM tasks AS znob WHERE value > ( SELECT AVG(amount) FROM staff AS xnob WHERE xnob.code = znob.code );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02670
train
v2
Schema: departments (alias: dov)(amount, type, level, code) staff(id, status, type, name) Task: Find value from departments where a matching record exists in staff with the same level. SQL:
SELECT value FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = dov.level );
{ "outer_table": "departments", "inner_table": "staff", "outer_alias": "dov", "inner_alias": "xnob", "proj_col": "value", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02671
train
v1
Schema: regions (alias: okiv)(amount, level, name, code) products(code, name, date, id) Task: Select amount from regions where status exists in products for the same status. SQL:
SELECT amount FROM regions AS okiv WHERE status IN ( SELECT status FROM products AS nad WHERE nad.status = okiv.status );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02672
train
v2
Schema: products (alias: nad)(code, amount, level, salary) requests(type, amount, date, id) Task: Find value from products where a matching record exists in requests with the same id. SQL:
SELECT value FROM products AS nad WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = nad.id );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "value", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02673
train
v1
Schema: shipments (alias: vnob)(type, amount, level, date) managers(type, name, status, code) Task: Retrieve name from shipments whose id is found in managers rows where code matches the outer record. SQL:
SELECT name FROM shipments AS vnob WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02674
train
v3
Schema: customers (alias: lex)(amount, date, code, level) staff(code, salary, id, value) Task: Retrieve amount from customers with amount above the SUM(amount) of staff rows sharing the same type. SQL:
SELECT amount FROM customers AS lex WHERE amount > ( SELECT SUM(amount) FROM staff AS xnob WHERE xnob.type = lex.type );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02675
train
v3
Schema: schedules (alias: vmob)(date, type, name, id) tasks(type, date, amount, level) Task: Retrieve value from schedules with salary above the MIN(salary) of tasks rows sharing the same level. SQL:
SELECT value FROM schedules AS vmob WHERE salary > ( SELECT MIN(salary) FROM tasks AS znob WHERE znob.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02676
train
v1
Schema: items (alias: ikob)(status, type, name, amount) managers(type, amount, date, value) Task: Retrieve id from items whose level is found in managers rows where status matches the outer record. SQL:
SELECT id FROM items AS ikob WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.status = ikob.status );
{ "outer_table": "items", "inner_table": "managers", "outer_alias": "ikob", "inner_alias": "hac", "proj_col": "id", "filter_col": "level", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02677
train
v1
Schema: employees (alias: bev)(value, code, salary, amount) invoices(level, salary, name, type) Task: Find code from employees where type appears in invoices entries with matching code. SQL:
SELECT code FROM employees AS bev WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.code = bev.code );
{ "outer_table": "employees", "inner_table": "invoices", "outer_alias": "bev", "inner_alias": "fal", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02678
train
v1
Schema: sales (alias: cif)(date, salary, amount, type) tasks(id, level, status, code) Task: Retrieve name from sales whose id is found in tasks rows where id matches the outer record. SQL:
SELECT name FROM sales AS cif WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.id = cif.id );
{ "outer_table": "sales", "inner_table": "tasks", "outer_alias": "cif", "inner_alias": "znob", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02679
train
v1
Schema: tasks (alias: znob)(level, type, status, salary) customers(date, status, code, value) Task: Find code from tasks where status appears in customers entries with matching level. SQL:
SELECT code FROM tasks AS znob WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.level = znob.level );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "znob", "inner_alias": "lex", "proj_col": "code", "filter_col": "status", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02680
train
v3
Schema: departments (alias: dov)(amount, date, type, value) schedules(type, code, name, status) Task: Find value from departments where salary exceeds the minimum value from schedules for the same type. SQL:
SELECT value FROM departments AS dov WHERE salary > ( SELECT MIN(value) FROM schedules AS vmob WHERE vmob.type = dov.type );
{ "outer_table": "departments", "inner_table": "schedules", "outer_alias": "dov", "inner_alias": "vmob", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02681
train
v2
Schema: shipments (alias: vnob)(date, name, salary, code) employees(id, type, status, amount) Task: Find amount from shipments where a matching record exists in employees with the same status. SQL:
SELECT amount FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "amount", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02682
train
v3
Schema: sales (alias: cif)(type, amount, name, code) customers(level, code, name, date) Task: Retrieve id from sales with salary above the SUM(salary) of customers rows sharing the same type. SQL:
SELECT id FROM sales AS cif WHERE salary > ( SELECT SUM(salary) FROM customers AS lex WHERE lex.type = cif.type );
{ "outer_table": "sales", "inner_table": "customers", "outer_alias": "cif", "inner_alias": "lex", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02683
train
v1
Schema: regions (alias: okiv)(code, status, name, level) orders(value, code, status, id) Task: Select value from regions where code exists in orders for the same level. SQL:
SELECT value FROM regions AS okiv WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.level = okiv.level );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02684
train
v3
Schema: customers (alias: lex)(date, value, status, type) sales(amount, value, id, date) Task: Retrieve value from customers with value above the MIN(salary) of sales rows sharing the same level. SQL:
SELECT value FROM customers AS lex WHERE value > ( SELECT MIN(salary) FROM sales AS cif WHERE cif.level = lex.level );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02685
train
v1
Schema: requests (alias: ejof)(code, value, type, salary) departments(code, date, id, level) Task: Select amount from requests where code exists in departments for the same level. SQL:
SELECT amount FROM requests AS ejof WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.level = ejof.level );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "amount", "filter_col": "code", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02686
train
v3
Schema: schedules (alias: vmob)(date, type, value, status) sales(level, name, type, status) Task: Retrieve name from schedules with value above the SUM(amount) of sales rows sharing the same level. SQL:
SELECT name FROM schedules AS vmob WHERE value > ( SELECT SUM(amount) FROM sales AS cif WHERE cif.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "vmob", "inner_alias": "cif", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02687
train
v1
Schema: transactions (alias: gev)(name, date, status, value) schedules(code, status, level, type) Task: Find value from transactions where code appears in schedules entries with matching code. SQL:
SELECT value FROM transactions AS gev WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.code = gev.code );
{ "outer_table": "transactions", "inner_table": "schedules", "outer_alias": "gev", "inner_alias": "vmob", "proj_col": "value", "filter_col": "code", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02688
train
v2
Schema: orders (alias: kab)(type, amount, value, code) products(id, salary, code, value) Task: Retrieve amount from orders that have at least one corresponding entry in products sharing the same code. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = kab.code );
{ "outer_table": "orders", "inner_table": "products", "outer_alias": "kab", "inner_alias": "nad", "proj_col": "amount", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02689
train
v1
Schema: requests (alias: ejof)(salary, id, value, code) customers(date, amount, name, level) Task: Select id from requests where type exists in customers for the same status. SQL:
SELECT id FROM requests AS ejof WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.status = ejof.status );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02690
train
v2
Schema: managers (alias: hac)(level, amount, status, name) orders(level, name, amount, status) Task: Retrieve id from managers that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT id FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = hac.type );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "id", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02691
train
v2
Schema: transactions (alias: gev)(date, id, amount, type) products(level, code, status, name) Task: Find value from transactions where a matching record exists in products with the same type. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = gev.type );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "value", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02692
train
v2
Schema: categories (alias: egiv)(code, name, date, value) managers(status, value, date, salary) Task: Find salary from categories where a matching record exists in managers with the same status. SQL:
SELECT salary FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = egiv.status );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "salary", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02693
train
v1
Schema: departments (alias: dov)(level, date, code, salary) sales(type, level, status, date) Task: Retrieve amount from departments whose level is found in sales rows where id matches the outer record. SQL:
SELECT amount FROM departments AS dov WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.id = dov.id );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02694
train
v3
Schema: orders (alias: kab)(salary, code, date, status) requests(id, amount, level, name) Task: Find id from orders where value exceeds the average value from requests for the same level. SQL:
SELECT id FROM orders AS kab WHERE value > ( SELECT AVG(value) FROM requests AS ejof WHERE ejof.level = kab.level );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02695
train
v1
Schema: shipments (alias: vnob)(name, value, status, type) customers(level, amount, value, salary) Task: Retrieve value from shipments whose id is found in customers rows where type matches the outer record. SQL:
SELECT value FROM shipments AS vnob WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02696
train
v2
Schema: tasks (alias: znob)(status, date, salary, code) accounts(salary, level, amount, value) Task: Find value from tasks where a matching record exists in accounts with the same code. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = znob.code );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "value", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02697
train
v3
Schema: shipments (alias: vnob)(code, name, value, level) schedules(type, name, salary, date) Task: Retrieve id from shipments with amount above the AVG(salary) of schedules rows sharing the same type. SQL:
SELECT id FROM shipments AS vnob WHERE amount > ( SELECT AVG(salary) FROM schedules AS vmob WHERE vmob.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02698
train
v2
Schema: projects (alias: uliv)(status, value, code, name) managers(salary, level, name, type) Task: Find salary from projects where a matching record exists in managers with the same level. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = uliv.level );
{ "outer_table": "projects", "inner_table": "managers", "outer_alias": "uliv", "inner_alias": "hac", "proj_col": "salary", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02699
train