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
v3
Schema: transactions (alias: gev)(code, status, value, salary) accounts(name, level, code, value) Task: Retrieve value from transactions with salary above the COUNT(value) of accounts rows sharing the same status. SQL:
SELECT value FROM transactions AS gev WHERE salary > ( SELECT COUNT(value) FROM accounts AS jac WHERE jac.status = gev.status );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "gev", "inner_alias": "jac", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01600
train
v2
Schema: transactions (alias: gev)(name, amount, code, value) projects(amount, salary, status, name) Task: Retrieve amount from transactions that have at least one corresponding entry in projects sharing the same status. SQL:
SELECT amount FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = gev.status );
{ "outer_table": "transactions", "inner_table": "projects", "outer_alias": "gev", "inner_alias": "uliv", "proj_col": "amount", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01601
train
v1
Schema: tasks (alias: znob)(code, type, name, id) products(code, type, salary, level) Task: Retrieve value from tasks whose type is found in products rows where status matches the outer record. SQL:
SELECT value FROM tasks AS znob WHERE type IN ( SELECT type FROM products AS nad WHERE nad.status = znob.status );
{ "outer_table": "tasks", "inner_table": "products", "outer_alias": "znob", "inner_alias": "nad", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01602
train
v3
Schema: items (alias: ikob)(id, type, code, salary) employees(date, status, level, id) Task: Find code from items where salary exceeds the total salary from employees for the same id. SQL:
SELECT code FROM items AS ikob WHERE salary > ( SELECT SUM(salary) FROM employees AS bev WHERE bev.id = ikob.id );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01603
train
v2
Schema: invoices (alias: fal)(code, date, salary, amount) regions(name, level, id, code) Task: Retrieve id from invoices that have at least one corresponding entry in regions sharing the same id. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = fal.id );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "id", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01604
train
v3
Schema: requests (alias: ejof)(level, date, salary, name) projects(type, date, id, status) Task: Retrieve code from requests with salary above the AVG(amount) of projects rows sharing the same level. SQL:
SELECT code FROM requests AS ejof WHERE salary > ( SELECT AVG(amount) 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": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_01605
train
v2
Schema: branches (alias: agov)(level, salary, name, date) products(name, date, amount, code) Task: Find name from branches where a matching record exists in products with the same type. SQL:
SELECT name FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = agov.type );
{ "outer_table": "branches", "inner_table": "products", "outer_alias": "agov", "inner_alias": "nad", "proj_col": "name", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01606
train
v1
Schema: employees (alias: bev)(value, name, status, date) shipments(amount, code, level, value) Task: Find id from employees where level appears in shipments entries with matching level. SQL:
SELECT id FROM employees AS bev WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.level = bev.level );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "id", "filter_col": "level", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01607
train
v3
Schema: invoices (alias: fal)(date, code, type, amount) shipments(level, salary, value, status) Task: Find name from invoices where value exceeds the maximum salary from shipments for the same type. SQL:
SELECT name FROM invoices AS fal WHERE value > ( SELECT MAX(salary) FROM shipments AS vnob WHERE vnob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "shipments", "outer_alias": "fal", "inner_alias": "vnob", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01608
train
v1
Schema: tasks (alias: znob)(status, name, salary, type) schedules(date, salary, status, level) Task: Retrieve salary from tasks whose code is found in schedules rows where code matches the outer record. SQL:
SELECT salary FROM tasks AS znob WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.code = znob.code );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01609
train
v2
Schema: schedules (alias: vmob)(type, status, date, level) branches(id, type, value, name) Task: Find name from schedules where a matching record exists in branches with the same type. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "branches", "outer_alias": "vmob", "inner_alias": "agov", "proj_col": "name", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01610
train
v1
Schema: regions (alias: okiv)(level, name, value, date) staff(value, date, status, level) Task: Retrieve id from regions whose status is found in staff rows where code matches the outer record. SQL:
SELECT id FROM regions AS okiv WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.code = okiv.code );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "okiv", "inner_alias": "xnob", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01611
train
v1
Schema: orders (alias: kab)(id, status, salary, value) customers(salary, date, level, type) Task: Find name from orders where level appears in customers entries with matching type. SQL:
SELECT name FROM orders AS kab WHERE level IN ( SELECT level FROM customers AS lex WHERE lex.type = kab.type );
{ "outer_table": "orders", "inner_table": "customers", "outer_alias": "kab", "inner_alias": "lex", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01612
train
v3
Schema: shipments (alias: vnob)(value, name, status, salary) staff(value, salary, status, id) Task: Find amount from shipments where salary exceeds the minimum amount from staff for the same status. SQL:
SELECT amount FROM shipments AS vnob WHERE salary > ( SELECT MIN(amount) FROM staff AS xnob WHERE xnob.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01613
train
v2
Schema: employees (alias: bev)(status, salary, amount, id) items(name, value, date, code) Task: Retrieve name from employees that have at least one corresponding entry in items sharing the same code. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = bev.code );
{ "outer_table": "employees", "inner_table": "items", "outer_alias": "bev", "inner_alias": "ikob", "proj_col": "name", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01614
train
v1
Schema: shipments (alias: vnob)(code, name, level, type) schedules(status, id, name, salary) Task: Select amount from shipments where status exists in schedules for the same id. SQL:
SELECT amount FROM shipments AS vnob WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01615
train
v3
Schema: departments (alias: dov)(type, name, code, level) transactions(id, level, status, value) Task: Find salary from departments where value exceeds the maximum amount from transactions for the same type. SQL:
SELECT salary FROM departments AS dov WHERE value > ( SELECT MAX(amount) FROM transactions AS gev WHERE gev.type = dov.type );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dov", "inner_alias": "gev", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01616
train
v1
Schema: customers (alias: lex)(salary, type, date, code) schedules(value, type, name, id) Task: Select name from customers where code exists in schedules for the same id. SQL:
SELECT name FROM customers AS lex WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.id = lex.id );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01617
train
v2
Schema: sales (alias: cif)(date, salary, value, code) customers(code, value, name, status) Task: Retrieve amount from sales that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = cif.type );
{ "outer_table": "sales", "inner_table": "customers", "outer_alias": "cif", "inner_alias": "lex", "proj_col": "amount", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01618
train
v2
Schema: categories (alias: egiv)(status, id, type, salary) customers(date, type, status, salary) Task: Find salary from categories where a matching record exists in customers with the same status. SQL:
SELECT salary FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = egiv.status );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "salary", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01619
train
v3
Schema: requests (alias: ejof)(salary, value, code, type) regions(level, status, id, value) Task: Retrieve salary from requests with value above the SUM(amount) of regions rows sharing the same level. SQL:
SELECT salary FROM requests AS ejof WHERE value > ( SELECT SUM(amount) FROM regions AS okiv WHERE okiv.level = ejof.level );
{ "outer_table": "requests", "inner_table": "regions", "outer_alias": "ejof", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_01620
train
v1
Schema: projects (alias: uliv)(salary, status, level, amount) orders(type, id, amount, status) Task: Retrieve name from projects whose id is found in orders rows where id matches the outer record. SQL:
SELECT name FROM projects AS uliv WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.id = uliv.id );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01621
train
v2
Schema: categories (alias: egiv)(type, id, name, status) departments(id, name, level, date) Task: Find amount from categories where a matching record exists in departments with the same level. SQL:
SELECT amount 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": "amount", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01622
train
v3
Schema: branches (alias: agov)(value, level, name, id) transactions(type, id, amount, code) Task: Find name from branches where amount exceeds the maximum amount from transactions for the same level. SQL:
SELECT name FROM branches AS agov WHERE amount > ( SELECT MAX(amount) FROM transactions AS gev WHERE gev.level = agov.level );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01623
train
v1
Schema: shipments (alias: vnob)(salary, status, date, value) departments(name, status, code, level) Task: Find id from shipments where type appears in departments entries with matching type. SQL:
SELECT id FROM shipments AS vnob WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "id", "filter_col": "type", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01624
train
v2
Schema: shipments (alias: vnob)(salary, code, type, name) orders(code, type, id, level) Task: Find value from shipments where a matching record exists in orders with the same type. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "value", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01625
train
v2
Schema: tasks (alias: znob)(date, amount, id, status) items(code, type, salary, id) Task: Retrieve name from tasks that have at least one corresponding entry in items sharing the same type. SQL:
SELECT name FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = znob.type );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "name", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01626
train
v3
Schema: managers (alias: hac)(name, code, date, id) employees(code, level, status, name) Task: Find code from managers where amount exceeds the total amount from employees for the same status. SQL:
SELECT code FROM managers AS hac WHERE amount > ( SELECT SUM(amount) FROM employees AS bev WHERE bev.status = hac.status );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01627
train
v3
Schema: invoices (alias: fal)(code, value, id, salary) categories(value, name, status, code) Task: Retrieve name from invoices with value above the AVG(salary) of categories rows sharing the same level. SQL:
SELECT name FROM invoices AS fal WHERE value > ( SELECT AVG(salary) FROM categories AS egiv WHERE egiv.level = fal.level );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01628
train
v2
Schema: schedules (alias: vmob)(id, salary, value, date) employees(id, date, name, amount) Task: Find code from schedules where a matching record exists in employees with the same code. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "vmob", "inner_alias": "bev", "proj_col": "code", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01629
train
v2
Schema: items (alias: ikob)(status, name, level, value) departments(name, type, status, salary) Task: Find name from items where a matching record exists in departments with the same status. SQL:
SELECT name FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = ikob.status );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "ikob", "inner_alias": "dov", "proj_col": "name", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01630
train
v2
Schema: tasks (alias: znob)(type, amount, id, value) departments(salary, date, amount, status) Task: Find name from tasks where a matching record exists in departments with the same code. SQL:
SELECT name FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = znob.code );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "name", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01631
train
v1
Schema: invoices (alias: fal)(salary, code, level, value) staff(id, salary, value, level) Task: Find amount from invoices where code appears in staff entries with matching level. SQL:
SELECT amount FROM invoices AS fal WHERE code IN ( SELECT code FROM staff AS xnob WHERE xnob.level = fal.level );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "code", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01632
train
v1
Schema: projects (alias: uliv)(date, value, id, code) transactions(date, name, level, code) Task: Retrieve salary from projects whose level is found in transactions rows where level matches the outer record. SQL:
SELECT salary FROM projects AS uliv WHERE level IN ( SELECT level FROM transactions AS gev WHERE gev.level = uliv.level );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "salary", "filter_col": "level", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01633
train
v1
Schema: products (alias: nad)(amount, type, level, code) staff(code, amount, id, type) Task: Find code from products where id appears in staff entries with matching type. SQL:
SELECT code FROM products AS nad WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.type = nad.type );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "code", "filter_col": "id", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01634
train
v1
Schema: items (alias: ikob)(name, status, code, level) transactions(id, status, type, value) Task: Select code from items where type exists in transactions for the same id. SQL:
SELECT code FROM items AS ikob WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.id = ikob.id );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "ikob", "inner_alias": "gev", "proj_col": "code", "filter_col": "type", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01635
train
v2
Schema: invoices (alias: fal)(id, name, code, level) branches(code, name, status, date) Task: Retrieve salary from invoices that have at least one corresponding entry in branches sharing the same status. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = fal.status );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "salary", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01636
train
v1
Schema: tasks (alias: znob)(status, value, type, salary) regions(code, salary, level, date) Task: Select amount from tasks where status exists in regions for the same level. SQL:
SELECT amount FROM tasks AS znob WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.level = znob.level );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01637
train
v2
Schema: regions (alias: okiv)(level, id, code, date) sales(id, name, level, salary) Task: Retrieve value from regions that have at least one corresponding entry in sales sharing the same code. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = okiv.code );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "value", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01638
train
v2
Schema: accounts (alias: jac)(value, level, status, id) staff(salary, code, name, amount) Task: Find salary from accounts where a matching record exists in staff with the same type. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "jac", "inner_alias": "xnob", "proj_col": "salary", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01639
train
v2
Schema: schedules (alias: vmob)(value, level, code, salary) projects(type, name, status, date) Task: Find amount from schedules where a matching record exists in projects with the same id. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "amount", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01640
train
v3
Schema: schedules (alias: vmob)(code, id, status, level) employees(name, type, value, code) Task: Retrieve amount from schedules with value above the MIN(amount) of employees rows sharing the same level. SQL:
SELECT amount FROM schedules AS vmob WHERE value > ( SELECT MIN(amount) FROM employees AS bev WHERE bev.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "vmob", "inner_alias": "bev", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01641
train
v3
Schema: regions (alias: okiv)(level, type, status, value) orders(level, value, salary, status) Task: Retrieve id from regions with amount above the MIN(amount) of orders rows sharing the same id. SQL:
SELECT id FROM regions AS okiv WHERE amount > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.id = okiv.id );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01642
train
v3
Schema: tasks (alias: znob)(amount, level, status, value) requests(amount, salary, name, code) Task: Find code from tasks where amount exceeds the average salary from requests for the same status. SQL:
SELECT code FROM tasks AS znob WHERE amount > ( SELECT AVG(salary) FROM requests AS ejof WHERE ejof.status = znob.status );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01643
train
v1
Schema: products (alias: nad)(value, status, level, date) staff(code, status, id, level) Task: Select name from products where level exists in staff for the same code. SQL:
SELECT name FROM products AS nad WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.code = nad.code );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01644
train
v1
Schema: staff (alias: xnob)(value, name, type, level) accounts(amount, status, type, salary) Task: Find name from staff where status appears in accounts entries with matching id. SQL:
SELECT name FROM staff AS xnob WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.id = xnob.id );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_01645
train
v1
Schema: orders (alias: kab)(id, amount, name, value) managers(status, date, value, type) Task: Find amount from orders where id appears in managers entries with matching type. SQL:
SELECT amount FROM orders AS kab WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.type = kab.type );
{ "outer_table": "orders", "inner_table": "managers", "outer_alias": "kab", "inner_alias": "hac", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01646
train
v2
Schema: requests (alias: ejof)(id, salary, status, level) sales(type, name, level, code) Task: Find code from requests where a matching record exists in sales with the same type. SQL:
SELECT code FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = ejof.type );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "code", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_01647
train
v2
Schema: accounts (alias: jac)(name, status, code, amount) projects(name, code, id, salary) Task: Find salary from accounts where a matching record exists in projects with the same code. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = jac.code );
{ "outer_table": "accounts", "inner_table": "projects", "outer_alias": "jac", "inner_alias": "uliv", "proj_col": "salary", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01648
train
v1
Schema: departments (alias: dov)(status, salary, amount, name) regions(salary, code, date, status) Task: Select amount from departments where code exists in regions for the same status. SQL:
SELECT amount FROM departments AS dov WHERE code IN ( SELECT code FROM regions AS okiv WHERE okiv.status = dov.status );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dov", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "code", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01649
train
v2
Schema: projects (alias: uliv)(code, amount, value, type) orders(level, value, id, status) Task: Retrieve value from projects that have at least one corresponding entry in orders sharing the same status. SQL:
SELECT value 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": "value", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01650
train
v1
Schema: employees (alias: bev)(code, status, level, type) shipments(status, salary, value, amount) Task: Find code from employees where code appears in shipments entries with matching level. SQL:
SELECT code FROM employees AS bev WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.level = bev.level );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01651
train
v1
Schema: projects (alias: uliv)(name, date, id, status) accounts(date, status, type, level) Task: Retrieve id from projects whose status is found in accounts rows where id matches the outer record. SQL:
SELECT id FROM projects AS uliv WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.id = uliv.id );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01652
train
v3
Schema: managers (alias: hac)(value, id, status, date) sales(id, value, salary, code) Task: Find code from managers where value exceeds the minimum salary from sales for the same type. SQL:
SELECT code FROM managers AS hac WHERE value > ( SELECT MIN(salary) FROM sales AS cif WHERE cif.type = hac.type );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01653
train
v1
Schema: branches (alias: agov)(amount, type, level, code) schedules(status, date, id, amount) Task: Select amount from branches where code exists in schedules for the same code. SQL:
SELECT amount FROM branches AS agov WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.code = agov.code );
{ "outer_table": "branches", "inner_table": "schedules", "outer_alias": "agov", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01654
train
v1
Schema: categories (alias: egiv)(salary, amount, level, code) transactions(name, id, amount, type) Task: Find salary from categories where level appears in transactions entries with matching id. SQL:
SELECT salary FROM categories AS egiv WHERE level IN ( SELECT level FROM transactions AS gev WHERE gev.id = egiv.id );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "egiv", "inner_alias": "gev", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01655
train
v1
Schema: employees (alias: bev)(salary, status, level, amount) tasks(level, id, name, code) Task: Find code from employees where type appears in tasks entries with matching type. SQL:
SELECT code FROM employees AS bev WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.type = bev.type );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "code", "filter_col": "type", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01656
train
v3
Schema: shipments (alias: vnob)(code, amount, name, id) customers(date, value, name, level) Task: Retrieve id from shipments with value above the SUM(salary) of customers rows sharing the same type. SQL:
SELECT id FROM shipments AS vnob WHERE value > ( SELECT SUM(salary) FROM customers AS lex WHERE lex.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01657
train
v3
Schema: tasks (alias: znob)(amount, value, date, name) regions(salary, date, id, value) Task: Retrieve value from tasks with amount above the MIN(value) of regions rows sharing the same id. SQL:
SELECT value FROM tasks AS znob WHERE amount > ( SELECT MIN(value) FROM regions AS okiv WHERE okiv.id = znob.id );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01658
train
v3
Schema: invoices (alias: fal)(id, status, level, date) managers(salary, level, date, amount) Task: Retrieve code from invoices with amount above the MAX(salary) of managers rows sharing the same level. SQL:
SELECT code FROM invoices AS fal WHERE amount > ( SELECT MAX(salary) FROM managers AS hac WHERE hac.level = fal.level );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01659
train
v1
Schema: employees (alias: bev)(status, date, value, level) products(date, code, level, amount) Task: Find id from employees where level appears in products entries with matching id. SQL:
SELECT id FROM employees AS bev WHERE level IN ( SELECT level FROM products AS nad WHERE nad.id = bev.id );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "id", "filter_col": "level", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01660
train
v1
Schema: branches (alias: agov)(date, salary, level, status) regions(value, code, date, type) Task: Retrieve value from branches whose status is found in regions rows where type matches the outer record. SQL:
SELECT value FROM branches AS agov WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.type = agov.type );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "value", "filter_col": "status", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01661
train
v1
Schema: items (alias: ikob)(date, amount, id, status) orders(type, id, name, code) Task: Select code from items where level exists in orders for the same id. SQL:
SELECT code FROM items AS ikob WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.id = ikob.id );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "code", "filter_col": "level", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01662
train
v2
Schema: shipments (alias: vnob)(value, name, code, salary) customers(id, value, code, type) Task: Find name from shipments where a matching record exists in customers with the same code. SQL:
SELECT name FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "name", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01663
train
v2
Schema: products (alias: nad)(salary, date, code, level) regions(id, value, level, amount) Task: Retrieve name from products that have at least one corresponding entry in regions sharing the same level. SQL:
SELECT name FROM products AS nad WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = nad.level );
{ "outer_table": "products", "inner_table": "regions", "outer_alias": "nad", "inner_alias": "okiv", "proj_col": "name", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01664
train
v2
Schema: regions (alias: okiv)(date, salary, name, id) staff(amount, type, salary, level) Task: Find salary from regions where a matching record exists in staff with the same code. SQL:
SELECT salary FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = okiv.code );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "okiv", "inner_alias": "xnob", "proj_col": "salary", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01665
train
v1
Schema: categories (alias: egiv)(amount, type, date, value) products(name, value, status, date) Task: Select value from categories where type exists in products for the same id. SQL:
SELECT value FROM categories AS egiv WHERE type IN ( SELECT type FROM products AS nad WHERE nad.id = egiv.id );
{ "outer_table": "categories", "inner_table": "products", "outer_alias": "egiv", "inner_alias": "nad", "proj_col": "value", "filter_col": "type", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01666
train
v2
Schema: sales (alias: cif)(code, amount, level, date) employees(type, name, code, value) Task: Find salary from sales where a matching record exists in employees with the same level. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = cif.level );
{ "outer_table": "sales", "inner_table": "employees", "outer_alias": "cif", "inner_alias": "bev", "proj_col": "salary", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01667
train
v1
Schema: sales (alias: cif)(id, amount, type, salary) categories(code, value, name, date) Task: Retrieve name from sales whose id is found in categories rows where code matches the outer record. SQL:
SELECT name FROM sales AS cif WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.code = cif.code );
{ "outer_table": "sales", "inner_table": "categories", "outer_alias": "cif", "inner_alias": "egiv", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01668
train
v2
Schema: staff (alias: xnob)(date, salary, type, code) transactions(salary, status, code, type) Task: Retrieve name from staff that have at least one corresponding entry in transactions sharing the same status. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = xnob.status );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "xnob", "inner_alias": "gev", "proj_col": "name", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_01669
train
v1
Schema: regions (alias: okiv)(value, type, salary, status) items(type, status, salary, id) Task: Retrieve code from regions whose code is found in items rows where code matches the outer record. SQL:
SELECT code FROM regions AS okiv WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.code = okiv.code );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01670
train
v2
Schema: branches (alias: agov)(code, level, amount, type) orders(amount, type, name, level) Task: Find id from branches where a matching record exists in orders with the same level. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = agov.level );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "id", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01671
train
v3
Schema: products (alias: nad)(status, level, salary, id) departments(type, salary, date, level) Task: Find amount from products where value exceeds the minimum value from departments for the same level. SQL:
SELECT amount FROM products AS nad WHERE value > ( SELECT MIN(value) FROM departments AS dov WHERE dov.level = nad.level );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01672
train
v2
Schema: invoices (alias: fal)(code, value, salary, type) schedules(level, status, value, id) Task: Find amount from invoices where a matching record exists in schedules with the same id. SQL:
SELECT amount FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.id = fal.id );
{ "outer_table": "invoices", "inner_table": "schedules", "outer_alias": "fal", "inner_alias": "vmob", "proj_col": "amount", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01673
train
v3
Schema: transactions (alias: gev)(level, date, name, type) requests(name, value, type, level) Task: Find code from transactions where amount exceeds the total amount from requests for the same code. SQL:
SELECT code FROM transactions AS gev WHERE amount > ( SELECT SUM(amount) FROM requests AS ejof WHERE ejof.code = gev.code );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01674
train
v3
Schema: customers (alias: lex)(name, status, code, value) departments(name, status, date, code) Task: Find value from customers where amount exceeds the average salary from departments for the same status. SQL:
SELECT value FROM customers AS lex WHERE amount > ( SELECT AVG(salary) FROM departments AS dov WHERE dov.status = lex.status );
{ "outer_table": "customers", "inner_table": "departments", "outer_alias": "lex", "inner_alias": "dov", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01675
train
v2
Schema: products (alias: nad)(type, amount, id, name) departments(type, value, date, id) Task: Find value from products where a matching record exists in departments with the same type. SQL:
SELECT value FROM products AS nad WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = nad.type );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "value", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01676
train
v1
Schema: regions (alias: okiv)(id, type, name, amount) orders(salary, status, level, id) Task: Retrieve salary from regions whose type is found in orders rows where code matches the outer record. SQL:
SELECT salary FROM regions AS okiv WHERE type IN ( SELECT type FROM orders AS kab WHERE kab.code = okiv.code );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01677
train
v3
Schema: regions (alias: okiv)(id, name, amount, status) products(code, name, type, salary) Task: Find code from regions where value exceeds the total value from products for the same id. SQL:
SELECT code FROM regions AS okiv WHERE value > ( SELECT SUM(value) FROM products AS nad WHERE nad.id = okiv.id );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01678
train
v1
Schema: products (alias: nad)(value, code, status, type) shipments(id, date, type, value) Task: Find id from products where id appears in shipments entries with matching status. SQL:
SELECT id FROM products AS nad WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.status = nad.status );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "id", "filter_col": "id", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01679
train
v3
Schema: projects (alias: uliv)(code, level, value, name) employees(code, type, salary, id) Task: Retrieve code from projects with salary above the MAX(amount) of employees rows sharing the same level. SQL:
SELECT code FROM projects AS uliv WHERE salary > ( SELECT MAX(amount) FROM employees AS bev WHERE bev.level = uliv.level );
{ "outer_table": "projects", "inner_table": "employees", "outer_alias": "uliv", "inner_alias": "bev", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01680
train
v2
Schema: branches (alias: agov)(name, date, type, code) shipments(level, id, value, amount) Task: Find amount from branches where a matching record exists in shipments with the same type. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = agov.type );
{ "outer_table": "branches", "inner_table": "shipments", "outer_alias": "agov", "inner_alias": "vnob", "proj_col": "amount", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01681
train
v3
Schema: branches (alias: agov)(id, type, amount, level) employees(name, amount, code, status) Task: Retrieve value from branches with value above the COUNT(salary) of employees rows sharing the same type. SQL:
SELECT value FROM branches AS agov WHERE value > ( SELECT COUNT(salary) 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": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01682
train
v1
Schema: transactions (alias: gev)(amount, id, name, code) items(id, level, status, amount) Task: Find id from transactions where type appears in items entries with matching code. SQL:
SELECT id 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": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01683
train
v2
Schema: accounts (alias: jac)(level, type, status, value) departments(status, id, value, amount) Task: Retrieve name from accounts that have at least one corresponding entry in departments sharing the same id. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = jac.id );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "name", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01684
train
v1
Schema: items (alias: ikob)(level, id, status, value) projects(name, code, level, id) Task: Retrieve value from items whose type is found in projects rows where type matches the outer record. SQL:
SELECT value FROM items AS ikob WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.type = ikob.type );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "value", "filter_col": "type", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01685
train
v2
Schema: customers (alias: lex)(value, type, amount, code) requests(code, value, type, amount) Task: Find id from customers where a matching record exists in requests with the same id. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = lex.id );
{ "outer_table": "customers", "inner_table": "requests", "outer_alias": "lex", "inner_alias": "ejof", "proj_col": "id", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01686
train
v3
Schema: transactions (alias: gev)(date, id, status, type) requests(level, type, status, amount) Task: Retrieve id from transactions with salary above the AVG(value) of requests rows sharing the same id. SQL:
SELECT id FROM transactions AS gev WHERE salary > ( SELECT AVG(value) FROM requests AS ejof WHERE ejof.id = gev.id );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01687
train
v2
Schema: projects (alias: uliv)(type, status, value, code) customers(status, salary, code, id) Task: Find salary from projects where a matching record exists in customers with the same type. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = uliv.type );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "uliv", "inner_alias": "lex", "proj_col": "salary", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01688
train
v1
Schema: transactions (alias: gev)(id, status, code, salary) schedules(amount, value, status, name) Task: Retrieve id from transactions whose id is found in schedules rows where type matches the outer record. SQL:
SELECT id FROM transactions AS gev WHERE id IN ( SELECT id FROM schedules AS vmob WHERE vmob.type = gev.type );
{ "outer_table": "transactions", "inner_table": "schedules", "outer_alias": "gev", "inner_alias": "vmob", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01689
train
v3
Schema: requests (alias: ejof)(type, level, id, date) orders(code, salary, type, value) Task: Find value from requests where amount exceeds the maximum amount from orders for the same level. SQL:
SELECT value FROM requests AS ejof WHERE amount > ( SELECT MAX(amount) FROM orders AS kab WHERE kab.level = ejof.level );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_01690
train
v3
Schema: tasks (alias: znob)(date, salary, code, level) schedules(salary, level, name, status) Task: Retrieve name from tasks with salary above the MAX(value) of schedules rows sharing the same status. SQL:
SELECT name FROM tasks AS znob WHERE salary > ( SELECT MAX(value) FROM schedules AS vmob WHERE vmob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01691
train
v2
Schema: customers (alias: lex)(type, salary, amount, status) schedules(code, value, status, date) Task: Retrieve salary from customers that have at least one corresponding entry in schedules sharing the same type. SQL:
SELECT salary FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = lex.type );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "salary", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01692
train
v2
Schema: orders (alias: kab)(salary, type, value, level) regions(id, value, type, status) Task: Find name from orders where a matching record exists in regions with the same code. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = kab.code );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "kab", "inner_alias": "okiv", "proj_col": "name", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01693
train
v1
Schema: managers (alias: hac)(status, level, value, code) categories(status, salary, date, name) Task: Retrieve code from managers whose level is found in categories rows where type matches the outer record. SQL:
SELECT code FROM managers AS hac WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.type = hac.type );
{ "outer_table": "managers", "inner_table": "categories", "outer_alias": "hac", "inner_alias": "egiv", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01694
train
v2
Schema: orders (alias: kab)(date, type, code, salary) accounts(name, value, date, code) Task: Retrieve id from orders that have at least one corresponding entry in accounts sharing the same type. SQL:
SELECT id FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = kab.type );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "kab", "inner_alias": "jac", "proj_col": "id", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01695
train
v2
Schema: managers (alias: hac)(amount, code, date, level) transactions(name, salary, type, amount) Task: Retrieve code from managers that have at least one corresponding entry in transactions sharing the same status. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = hac.status );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "code", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01696
train
v1
Schema: invoices (alias: fal)(id, level, salary, value) transactions(code, amount, salary, name) Task: Retrieve value from invoices whose code is found in transactions rows where level matches the outer record. SQL:
SELECT value FROM invoices AS fal WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.level = fal.level );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01697
train
v3
Schema: shipments (alias: vnob)(value, status, name, level) projects(salary, amount, status, date) Task: Find name from shipments where value exceeds the average value from projects for the same level. SQL:
SELECT name FROM shipments AS vnob WHERE value > ( SELECT AVG(value) FROM projects AS uliv WHERE uliv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "projects", "outer_alias": "vnob", "inner_alias": "uliv", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01698
train
v3
Schema: accounts (alias: jac)(date, value, status, name) items(id, amount, status, value) Task: Retrieve name from accounts with amount above the MIN(amount) of items rows sharing the same type. SQL:
SELECT name FROM accounts AS jac WHERE amount > ( SELECT MIN(amount) FROM items AS ikob WHERE ikob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01699
train