variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v1
Schema: accounts (alias: jac)(code, amount, id, name) items(name, type, status, level) Task: Find name from accounts where code appears in items entries with matching level. SQL:
SELECT name FROM accounts AS jac WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "name", "filter_col": "code", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03400
train
v1
Schema: shipments (alias: vnob)(name, code, salary, date) tasks(amount, date, salary, level) Task: Retrieve value from shipments whose type is found in tasks rows where level matches the outer record. SQL:
SELECT value FROM shipments AS vnob WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "tasks", "outer_alias": "vnob", "inner_alias": "znob", "proj_col": "value", "filter_col": "type", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03401
train
v1
Schema: transactions (alias: gev)(type, date, status, code) products(value, amount, name, id) Task: Retrieve id from transactions whose id is found in products rows where type matches the outer record. SQL:
SELECT id FROM transactions AS gev WHERE id IN ( SELECT id FROM products AS nad WHERE nad.type = gev.type );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03402
train
v3
Schema: branches (alias: agov)(status, salary, name, amount) staff(value, level, date, code) Task: Find value from branches where value exceeds the maximum value from staff for the same type. SQL:
SELECT value FROM branches AS agov WHERE value > ( SELECT MAX(value) FROM staff AS xnob WHERE xnob.type = agov.type );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03403
train
v2
Schema: departments (alias: dov)(status, level, type, value) shipments(status, id, type, salary) Task: Retrieve amount from departments that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT amount FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = dov.code );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "amount", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03404
train
v3
Schema: tasks (alias: znob)(code, status, name, level) accounts(status, code, date, salary) Task: Retrieve value from tasks with amount above the MIN(value) of accounts rows sharing the same status. SQL:
SELECT value FROM tasks AS znob WHERE amount > ( SELECT MIN(value) FROM accounts AS jac WHERE jac.status = znob.status );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03405
train
v3
Schema: departments (alias: dov)(salary, date, id, amount) products(level, id, salary, status) Task: Find code from departments where value exceeds the total salary from products for the same code. SQL:
SELECT code FROM departments AS dov WHERE value > ( SELECT SUM(salary) FROM products AS nad WHERE nad.code = dov.code );
{ "outer_table": "departments", "inner_table": "products", "outer_alias": "dov", "inner_alias": "nad", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03406
train
v1
Schema: schedules (alias: vmob)(status, type, salary, value) managers(date, value, level, salary) Task: Select id from schedules where code exists in managers for the same id. SQL:
SELECT id FROM schedules AS vmob WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "id", "filter_col": "code", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03407
train
v3
Schema: sales (alias: cif)(salary, date, name, status) requests(level, amount, code, salary) Task: Find name from sales where amount exceeds the total salary from requests for the same code. SQL:
SELECT name FROM sales AS cif WHERE amount > ( SELECT SUM(salary) FROM requests AS ejof WHERE ejof.code = cif.code );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03408
train
v3
Schema: categories (alias: egiv)(status, type, value, code) products(code, salary, status, level) Task: Find value from categories where salary exceeds the total amount from products for the same type. SQL:
SELECT value FROM categories AS egiv WHERE salary > ( SELECT SUM(amount) FROM products AS nad WHERE nad.type = egiv.type );
{ "outer_table": "categories", "inner_table": "products", "outer_alias": "egiv", "inner_alias": "nad", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03409
train
v1
Schema: projects (alias: uliv)(name, level, amount, salary) products(value, level, amount, code) Task: Find name from projects where level appears in products entries with matching status. SQL:
SELECT name FROM projects AS uliv WHERE level IN ( SELECT level FROM products AS nad WHERE nad.status = uliv.status );
{ "outer_table": "projects", "inner_table": "products", "outer_alias": "uliv", "inner_alias": "nad", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_03410
train
v3
Schema: items (alias: ikob)(status, code, value, level) regions(value, type, name, status) Task: Find value from items where value exceeds the total amount from regions for the same code. SQL:
SELECT value FROM items AS ikob WHERE value > ( SELECT SUM(amount) FROM regions AS okiv WHERE okiv.code = ikob.code );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03411
train
v1
Schema: managers (alias: hac)(code, id, name, status) customers(value, status, id, name) Task: Select amount from managers where type exists in customers for the same status. SQL:
SELECT amount FROM managers AS hac WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.status = hac.status );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "amount", "filter_col": "type", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03412
train
v1
Schema: employees (alias: bev)(salary, level, id, code) shipments(value, id, level, amount) Task: Find amount from employees where status appears in shipments entries with matching level. SQL:
SELECT amount FROM employees AS bev WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.level = bev.level );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03413
train
v3
Schema: managers (alias: hac)(code, id, amount, type) transactions(status, level, type, name) Task: Find salary from managers where salary exceeds the count of amount from transactions for the same id. SQL:
SELECT salary FROM managers AS hac WHERE salary > ( SELECT COUNT(amount) FROM transactions AS gev WHERE gev.id = hac.id );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03414
train
v3
Schema: tasks (alias: znob)(value, salary, amount, name) staff(amount, name, level, code) Task: Retrieve code from tasks with amount above the MAX(amount) of staff rows sharing the same id. SQL:
SELECT code FROM tasks AS znob WHERE amount > ( SELECT MAX(amount) FROM staff AS xnob WHERE xnob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03415
train
v2
Schema: transactions (alias: gev)(name, code, id, amount) tasks(date, level, status, type) Task: Find amount from transactions where a matching record exists in tasks with the same type. SQL:
SELECT amount FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = gev.type );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "amount", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03416
train
v1
Schema: categories (alias: egiv)(status, type, level, value) customers(id, status, code, level) Task: Retrieve id from categories whose code is found in customers rows where status matches the outer record. SQL:
SELECT id FROM categories AS egiv WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.status = egiv.status );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "id", "filter_col": "code", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03417
train
v3
Schema: employees (alias: bev)(status, date, code, name) categories(name, id, salary, level) Task: Retrieve amount from employees with amount above the COUNT(value) of categories rows sharing the same level. SQL:
SELECT amount FROM employees AS bev WHERE amount > ( SELECT COUNT(value) FROM categories AS egiv WHERE egiv.level = bev.level );
{ "outer_table": "employees", "inner_table": "categories", "outer_alias": "bev", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03418
train
v1
Schema: accounts (alias: jac)(name, value, salary, date) schedules(name, salary, id, amount) Task: Find value from accounts where code appears in schedules entries with matching type. SQL:
SELECT value FROM accounts AS jac WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03419
train
v1
Schema: departments (alias: dov)(amount, id, status, type) products(value, type, name, code) Task: Retrieve amount from departments whose id is found in products rows where type matches the outer record. SQL:
SELECT amount FROM departments AS dov WHERE id IN ( SELECT id FROM products AS nad WHERE nad.type = dov.type );
{ "outer_table": "departments", "inner_table": "products", "outer_alias": "dov", "inner_alias": "nad", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03420
train
v2
Schema: employees (alias: bev)(level, amount, status, code) categories(date, value, id, salary) Task: Find salary from employees where a matching record exists in categories with the same level. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = bev.level );
{ "outer_table": "employees", "inner_table": "categories", "outer_alias": "bev", "inner_alias": "egiv", "proj_col": "salary", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03421
train
v3
Schema: orders (alias: kab)(name, salary, level, date) departments(amount, type, level, id) Task: Find salary from orders where salary exceeds the count of salary from departments for the same id. SQL:
SELECT salary FROM orders AS kab WHERE salary > ( SELECT COUNT(salary) FROM departments AS dov WHERE dov.id = kab.id );
{ "outer_table": "orders", "inner_table": "departments", "outer_alias": "kab", "inner_alias": "dov", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03422
train
v1
Schema: departments (alias: dov)(amount, salary, level, date) orders(code, type, name, level) Task: Retrieve name from departments whose code is found in orders rows where level matches the outer record. SQL:
SELECT name FROM departments AS dov WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.level = dov.level );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dov", "inner_alias": "kab", "proj_col": "name", "filter_col": "code", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03423
train
v2
Schema: managers (alias: hac)(amount, name, id, level) tasks(type, name, level, status) Task: Find code from managers where a matching record exists in tasks with the same level. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.level = hac.level );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "code", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03424
train
v3
Schema: sales (alias: cif)(amount, name, status, id) employees(name, status, level, date) Task: Retrieve amount from sales with salary above the MIN(salary) of employees rows sharing the same level. SQL:
SELECT amount FROM sales AS cif WHERE salary > ( SELECT MIN(salary) FROM employees AS bev WHERE bev.level = cif.level );
{ "outer_table": "sales", "inner_table": "employees", "outer_alias": "cif", "inner_alias": "bev", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03425
train
v1
Schema: tasks (alias: znob)(date, status, value, code) employees(name, level, code, date) Task: Select name from tasks where code exists in employees for the same code. SQL:
SELECT name FROM tasks AS znob WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.code = znob.code );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03426
train
v1
Schema: categories (alias: egiv)(code, level, date, amount) regions(level, status, name, code) Task: Select code from categories where level exists in regions for the same status. SQL:
SELECT code FROM categories AS egiv WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.status = egiv.status );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03427
train
v1
Schema: schedules (alias: vmob)(name, level, status, id) managers(id, code, date, type) Task: Select value from schedules where id exists in managers for the same id. SQL:
SELECT value FROM schedules AS vmob WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "value", "filter_col": "id", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03428
train
v3
Schema: transactions (alias: gev)(code, amount, type, id) departments(code, value, name, id) Task: Find salary from transactions where salary exceeds the average salary from departments for the same code. SQL:
SELECT salary FROM transactions AS gev WHERE salary > ( SELECT AVG(salary) FROM departments AS dov WHERE dov.code = gev.code );
{ "outer_table": "transactions", "inner_table": "departments", "outer_alias": "gev", "inner_alias": "dov", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03429
train
v3
Schema: accounts (alias: jac)(salary, value, status, amount) branches(type, code, value, id) Task: Retrieve value from accounts with value above the MIN(value) of branches rows sharing the same id. SQL:
SELECT value FROM accounts AS jac WHERE value > ( SELECT MIN(value) FROM branches AS agov WHERE agov.id = jac.id );
{ "outer_table": "accounts", "inner_table": "branches", "outer_alias": "jac", "inner_alias": "agov", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03430
train
v2
Schema: categories (alias: egiv)(value, salary, status, amount) shipments(level, amount, value, date) Task: Retrieve amount from categories that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = egiv.code );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "amount", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03431
train
v1
Schema: tasks (alias: znob)(salary, type, level, id) products(name, level, value, salary) Task: Retrieve amount from tasks whose code is found in products rows where type matches the outer record. SQL:
SELECT amount FROM tasks AS znob WHERE code IN ( SELECT code FROM products AS nad WHERE nad.type = znob.type );
{ "outer_table": "tasks", "inner_table": "products", "outer_alias": "znob", "inner_alias": "nad", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03432
train
v2
Schema: shipments (alias: vnob)(status, id, salary, date) managers(value, type, date, salary) Task: Find salary from shipments where a matching record exists in managers with the same status. SQL:
SELECT salary FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "salary", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03433
train
v1
Schema: orders (alias: kab)(amount, type, date, salary) branches(amount, code, level, value) Task: Find salary from orders where level appears in branches entries with matching status. SQL:
SELECT salary FROM orders AS kab WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.status = kab.status );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03434
train
v3
Schema: shipments (alias: vnob)(id, status, type, code) products(level, type, status, date) Task: Retrieve value from shipments with amount above the SUM(value) of products rows sharing the same code. SQL:
SELECT value FROM shipments AS vnob WHERE amount > ( SELECT SUM(value) FROM products AS nad WHERE nad.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03435
train
v3
Schema: invoices (alias: fal)(level, code, name, type) categories(name, salary, value, id) Task: Retrieve salary from invoices with value above the AVG(salary) of categories rows sharing the same status. SQL:
SELECT salary FROM invoices AS fal WHERE value > ( SELECT AVG(salary) FROM categories AS egiv WHERE egiv.status = fal.status );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03436
train
v3
Schema: requests (alias: ejof)(value, status, type, name) items(status, value, code, name) Task: Retrieve salary from requests with salary above the AVG(value) of items rows sharing the same id. SQL:
SELECT salary FROM requests AS ejof WHERE salary > ( SELECT AVG(value) FROM items AS ikob WHERE ikob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "items", "outer_alias": "ejof", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_03437
train
v2
Schema: items (alias: ikob)(amount, name, id, value) managers(level, amount, id, code) Task: Find name from items where a matching record exists in managers with the same level. SQL:
SELECT name FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = ikob.level );
{ "outer_table": "items", "inner_table": "managers", "outer_alias": "ikob", "inner_alias": "hac", "proj_col": "name", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03438
train
v3
Schema: managers (alias: hac)(salary, id, value, amount) accounts(name, amount, value, status) Task: Retrieve value from managers with salary above the MIN(value) of accounts rows sharing the same level. SQL:
SELECT value FROM managers AS hac WHERE salary > ( SELECT MIN(value) 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": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03439
train
v1
Schema: invoices (alias: fal)(value, type, id, amount) sales(id, salary, level, type) Task: Select amount from invoices where type exists in sales for the same id. SQL:
SELECT amount FROM invoices AS fal WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.id = fal.id );
{ "outer_table": "invoices", "inner_table": "sales", "outer_alias": "fal", "inner_alias": "cif", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03440
train
v2
Schema: departments (alias: dov)(id, code, value, status) branches(value, type, id, amount) Task: Retrieve id from departments that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = dov.code );
{ "outer_table": "departments", "inner_table": "branches", "outer_alias": "dov", "inner_alias": "agov", "proj_col": "id", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03441
train
v1
Schema: transactions (alias: gev)(date, id, amount, level) staff(status, type, code, name) Task: Select value from transactions where code exists in staff for the same level. SQL:
SELECT value FROM transactions AS gev WHERE code IN ( SELECT code FROM staff AS xnob WHERE xnob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03442
train
v3
Schema: employees (alias: bev)(type, id, date, status) requests(type, level, code, date) Task: Find id from employees where amount exceeds the count of salary from requests for the same level. SQL:
SELECT id FROM employees AS bev WHERE amount > ( SELECT COUNT(salary) FROM requests AS ejof WHERE ejof.level = bev.level );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03443
train
v3
Schema: staff (alias: xnob)(status, date, value, type) orders(amount, id, type, salary) Task: Retrieve code from staff with value above the SUM(amount) of orders rows sharing the same code. SQL:
SELECT code FROM staff AS xnob WHERE value > ( SELECT SUM(amount) FROM orders AS kab WHERE kab.code = xnob.code );
{ "outer_table": "staff", "inner_table": "orders", "outer_alias": "xnob", "inner_alias": "kab", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03444
train
v3
Schema: shipments (alias: vnob)(code, date, value, amount) regions(name, id, code, salary) Task: Find code from shipments where amount exceeds the total value from regions for the same code. SQL:
SELECT code FROM shipments AS vnob WHERE amount > ( SELECT SUM(value) FROM regions AS okiv WHERE okiv.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03445
train
v3
Schema: regions (alias: okiv)(code, amount, date, level) products(type, id, salary, code) Task: Find salary from regions where value exceeds the total amount from products for the same id. SQL:
SELECT salary FROM regions AS okiv WHERE value > ( SELECT SUM(amount) FROM products AS nad WHERE nad.id = okiv.id );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_03446
train
v3
Schema: requests (alias: ejof)(level, date, code, status) tasks(name, type, date, id) Task: Retrieve amount from requests with salary above the COUNT(salary) of tasks rows sharing the same id. SQL:
SELECT amount FROM requests AS ejof WHERE salary > ( SELECT COUNT(salary) FROM tasks AS znob WHERE znob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_03447
train
v2
Schema: accounts (alias: jac)(amount, type, name, salary) sales(status, date, name, salary) Task: Retrieve value from accounts that have at least one corresponding entry in sales sharing the same level. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = jac.level );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "value", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03448
train
v2
Schema: requests (alias: ejof)(id, amount, status, type) transactions(value, level, id, code) Task: Retrieve salary from requests that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT salary FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = ejof.code );
{ "outer_table": "requests", "inner_table": "transactions", "outer_alias": "ejof", "inner_alias": "gev", "proj_col": "salary", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_03449
train
v2
Schema: accounts (alias: jac)(type, level, salary, name) departments(code, name, date, value) Task: Find id from accounts where a matching record exists in departments with the same id. SQL:
SELECT id 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": "id", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03450
train
v3
Schema: staff (alias: xnob)(type, name, amount, id) transactions(value, salary, name, amount) Task: Find code from staff where amount exceeds the maximum amount from transactions for the same status. SQL:
SELECT code FROM staff AS xnob WHERE amount > ( SELECT MAX(amount) FROM transactions AS gev WHERE gev.status = xnob.status );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "xnob", "inner_alias": "gev", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03451
train
v3
Schema: branches (alias: agov)(value, id, date, name) orders(id, code, amount, date) Task: Find name from branches where salary exceeds the maximum value from orders for the same status. SQL:
SELECT name FROM branches AS agov WHERE salary > ( SELECT MAX(value) FROM orders AS kab WHERE kab.status = agov.status );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03452
train
v2
Schema: branches (alias: agov)(type, salary, code, name) accounts(status, level, salary, value) Task: Find name from branches where a matching record exists in accounts with the same type. SQL:
SELECT name FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = agov.type );
{ "outer_table": "branches", "inner_table": "accounts", "outer_alias": "agov", "inner_alias": "jac", "proj_col": "name", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03453
train
v1
Schema: orders (alias: kab)(code, id, amount, type) sales(date, code, type, salary) Task: Retrieve id from orders whose type is found in sales rows where level matches the outer record. SQL:
SELECT id FROM orders AS kab WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.level = kab.level );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03454
train
v1
Schema: shipments (alias: vnob)(level, date, value, amount) schedules(name, amount, id, type) Task: Find value from shipments where code appears in schedules entries with matching id. SQL:
SELECT value FROM shipments AS vnob WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "value", "filter_col": "code", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03455
train
v1
Schema: accounts (alias: jac)(salary, level, name, date) invoices(salary, code, level, value) Task: Retrieve amount from accounts whose level is found in invoices rows where status matches the outer record. SQL:
SELECT amount FROM accounts AS jac WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.status = jac.status );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03456
train
v1
Schema: sales (alias: cif)(status, code, date, type) departments(level, type, code, id) Task: Retrieve name from sales whose code is found in departments rows where id matches the outer record. SQL:
SELECT name FROM sales AS cif WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.id = cif.id );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03457
train
v3
Schema: orders (alias: kab)(amount, level, id, value) sales(level, type, code, value) Task: Retrieve value from orders with salary above the AVG(salary) of sales rows sharing the same type. SQL:
SELECT value FROM orders AS kab WHERE salary > ( SELECT AVG(salary) FROM sales AS cif WHERE cif.type = kab.type );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03458
train
v2
Schema: schedules (alias: vmob)(id, type, value, salary) regions(status, salary, code, date) Task: Retrieve value from schedules that have at least one corresponding entry in regions sharing the same level. SQL:
SELECT value FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "value", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03459
train
v1
Schema: managers (alias: hac)(amount, status, level, date) customers(id, salary, level, code) Task: Select value from managers where type exists in customers for the same type. SQL:
SELECT value FROM managers AS hac WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.type = hac.type );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "value", "filter_col": "type", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03460
train
v1
Schema: projects (alias: uliv)(date, code, type, status) items(date, salary, value, name) Task: Find salary from projects where type appears in items entries with matching status. SQL:
SELECT salary FROM projects AS uliv WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.status = uliv.status );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "type", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_03461
train
v2
Schema: products (alias: nad)(name, level, amount, id) invoices(level, date, name, code) Task: Find value from products where a matching record exists in invoices with the same type. SQL:
SELECT value FROM products AS nad WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = nad.type );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "value", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03462
train
v3
Schema: departments (alias: dov)(date, value, salary, code) items(value, salary, date, code) Task: Find code from departments where amount exceeds the count of salary from items for the same type. SQL:
SELECT code FROM departments AS dov WHERE amount > ( SELECT COUNT(salary) FROM items AS ikob WHERE ikob.type = dov.type );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03463
train
v2
Schema: invoices (alias: fal)(level, amount, id, code) items(type, value, id, amount) Task: Retrieve value from invoices that have at least one corresponding entry in items sharing the same level. SQL:
SELECT value 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": "value", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03464
train
v3
Schema: branches (alias: agov)(salary, status, level, name) invoices(amount, type, value, salary) Task: Retrieve salary from branches with salary above the MAX(value) of invoices rows sharing the same code. SQL:
SELECT salary FROM branches AS agov WHERE salary > ( SELECT MAX(value) FROM invoices AS fal WHERE fal.code = agov.code );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03465
train
v1
Schema: categories (alias: egiv)(amount, name, type, level) requests(level, status, value, date) Task: Find name from categories where type appears in requests entries with matching type. SQL:
SELECT name FROM categories AS egiv WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.type = egiv.type );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "egiv", "inner_alias": "ejof", "proj_col": "name", "filter_col": "type", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03466
train
v3
Schema: transactions (alias: gev)(code, status, name, amount) accounts(id, name, amount, level) Task: Find salary from transactions where value exceeds the average amount from accounts for the same status. SQL:
SELECT salary FROM transactions AS gev WHERE value > ( SELECT AVG(amount) FROM accounts AS jac WHERE jac.status = gev.status );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "gev", "inner_alias": "jac", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03467
train
v1
Schema: accounts (alias: jac)(level, code, type, salary) shipments(value, id, salary, amount) Task: Select name from accounts where level exists in shipments for the same type. SQL:
SELECT name FROM accounts AS jac WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03468
train
v3
Schema: items (alias: ikob)(date, type, amount, status) employees(salary, date, value, type) Task: Find value from items where amount exceeds the maximum salary from employees for the same status. SQL:
SELECT value FROM items AS ikob WHERE amount > ( SELECT MAX(salary) FROM employees AS bev WHERE bev.status = ikob.status );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03469
train
v1
Schema: accounts (alias: jac)(amount, salary, code, name) customers(level, status, salary, amount) Task: Retrieve name from accounts whose type is found in customers rows where id matches the outer record. SQL:
SELECT name FROM accounts AS jac WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.id = jac.id );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "name", "filter_col": "type", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03470
train
v2
Schema: shipments (alias: vnob)(type, salary, id, value) categories(name, value, date, salary) Task: Find name from shipments where a matching record exists in categories with the same status. SQL:
SELECT name FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "categories", "outer_alias": "vnob", "inner_alias": "egiv", "proj_col": "name", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03471
train
v2
Schema: items (alias: ikob)(status, date, id, type) categories(code, date, type, level) Task: Retrieve value from items that have at least one corresponding entry in categories sharing the same code. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = ikob.code );
{ "outer_table": "items", "inner_table": "categories", "outer_alias": "ikob", "inner_alias": "egiv", "proj_col": "value", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03472
train
v3
Schema: products (alias: nad)(salary, status, level, date) requests(name, code, status, salary) Task: Retrieve amount from products with value above the COUNT(value) of requests rows sharing the same id. SQL:
SELECT amount FROM products AS nad WHERE value > ( SELECT COUNT(value) FROM requests AS ejof WHERE ejof.id = nad.id );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03473
train
v2
Schema: schedules (alias: vmob)(value, id, date, salary) projects(amount, value, status, code) Task: Retrieve value from schedules that have at least one corresponding entry in projects sharing the same status. SQL:
SELECT value FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "value", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03474
train
v3
Schema: managers (alias: hac)(id, status, code, type) departments(value, salary, id, date) Task: Retrieve code from managers with amount above the COUNT(amount) of departments rows sharing the same type. SQL:
SELECT code FROM managers AS hac WHERE amount > ( SELECT COUNT(amount) FROM departments AS dov WHERE dov.type = hac.type );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03475
train
v1
Schema: transactions (alias: gev)(amount, date, salary, status) shipments(date, salary, id, level) Task: Find salary from transactions where type appears in shipments entries with matching type. SQL:
SELECT salary FROM transactions AS gev WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.type = gev.type );
{ "outer_table": "transactions", "inner_table": "shipments", "outer_alias": "gev", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03476
train
v3
Schema: managers (alias: hac)(amount, name, code, status) employees(type, level, amount, salary) Task: Find amount from managers where value exceeds the count of value from employees for the same id. SQL:
SELECT amount FROM managers AS hac WHERE value > ( SELECT COUNT(value) FROM employees AS bev WHERE bev.id = hac.id );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03477
train
v3
Schema: projects (alias: uliv)(amount, code, name, id) branches(name, type, code, value) Task: Find salary from projects where salary exceeds the maximum salary from branches for the same level. SQL:
SELECT salary FROM projects AS uliv WHERE salary > ( SELECT MAX(salary) FROM branches AS agov WHERE agov.level = uliv.level );
{ "outer_table": "projects", "inner_table": "branches", "outer_alias": "uliv", "inner_alias": "agov", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_03478
train
v1
Schema: managers (alias: hac)(type, value, amount, salary) staff(value, salary, type, id) Task: Select code from managers where status exists in staff for the same id. SQL:
SELECT code FROM managers AS hac WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.id = hac.id );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "hac", "inner_alias": "xnob", "proj_col": "code", "filter_col": "status", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03479
train
v1
Schema: departments (alias: dov)(salary, level, code, status) sales(value, id, date, status) Task: Find amount from departments where code appears in sales entries with matching code. SQL:
SELECT amount FROM departments AS dov WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.code = dov.code );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03480
train
v2
Schema: customers (alias: lex)(value, type, id, name) branches(amount, id, level, name) Task: Find id from customers where a matching record exists in branches with the same status. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = lex.status );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "id", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03481
train
v3
Schema: customers (alias: lex)(name, value, id, level) tasks(id, amount, status, salary) Task: Retrieve id from customers with salary above the MAX(value) of tasks rows sharing the same level. SQL:
SELECT id FROM customers AS lex WHERE salary > ( SELECT MAX(value) FROM tasks AS znob WHERE znob.level = lex.level );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03482
train
v2
Schema: projects (alias: uliv)(value, name, code, status) tasks(level, status, code, type) Task: Find salary from projects where a matching record exists in tasks with the same type. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "uliv", "inner_alias": "znob", "proj_col": "salary", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_03483
train
v2
Schema: shipments (alias: vnob)(type, value, date, level) customers(date, salary, name, value) Task: Retrieve id from shipments that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT id FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "id", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03484
train
v1
Schema: staff (alias: xnob)(amount, id, type, date) tasks(code, status, amount, id) Task: Retrieve amount from staff whose level is found in tasks rows where status matches the outer record. SQL:
SELECT amount FROM staff AS xnob WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "tasks", "outer_alias": "xnob", "inner_alias": "znob", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03485
train
v1
Schema: employees (alias: bev)(id, name, status, value) projects(salary, id, amount, name) Task: Select amount from employees where type exists in projects for the same level. SQL:
SELECT amount FROM employees AS bev WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.level = bev.level );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "type", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03486
train
v1
Schema: categories (alias: egiv)(type, id, amount, date) regions(status, value, name, level) Task: Retrieve code from categories whose level is found in regions rows where type matches the outer record. SQL:
SELECT code FROM categories AS egiv WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.type = egiv.type );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03487
train
v3
Schema: regions (alias: okiv)(status, level, type, amount) invoices(amount, type, id, value) Task: Find value from regions where salary exceeds the count of value from invoices for the same type. SQL:
SELECT value FROM regions AS okiv WHERE salary > ( SELECT COUNT(value) 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": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_03488
train
v1
Schema: tasks (alias: znob)(name, value, amount, level) branches(level, value, code, name) Task: Select name from tasks where type exists in branches for the same type. SQL:
SELECT name FROM tasks AS znob WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.type = znob.type );
{ "outer_table": "tasks", "inner_table": "branches", "outer_alias": "znob", "inner_alias": "agov", "proj_col": "name", "filter_col": "type", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03489
train
v2
Schema: products (alias: nad)(amount, salary, name, level) tasks(value, type, name, date) Task: Retrieve code from products that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = nad.status );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "code", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03490
train
v1
Schema: transactions (alias: gev)(salary, id, code, type) invoices(date, amount, status, value) Task: Retrieve name from transactions whose level is found in invoices rows where type matches the outer record. SQL:
SELECT name FROM transactions AS gev WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.type = gev.type );
{ "outer_table": "transactions", "inner_table": "invoices", "outer_alias": "gev", "inner_alias": "fal", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03491
train
v2
Schema: items (alias: ikob)(id, name, amount, status) shipments(code, type, name, value) Task: Find id from items where a matching record exists in shipments with the same id. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = ikob.id );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "id", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03492
train
v3
Schema: categories (alias: egiv)(id, name, type, code) staff(status, type, amount, code) Task: Find salary from categories where amount exceeds the count of amount from staff for the same status. SQL:
SELECT salary FROM categories AS egiv WHERE amount > ( SELECT COUNT(amount) FROM staff AS xnob WHERE xnob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "staff", "outer_alias": "egiv", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03493
train
v2
Schema: schedules (alias: vmob)(amount, code, value, date) items(id, type, date, status) Task: Find name from schedules where a matching record exists in items with the same code. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "vmob", "inner_alias": "ikob", "proj_col": "name", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03494
train
v2
Schema: tasks (alias: znob)(status, id, value, salary) invoices(level, value, id, salary) Task: Find salary from tasks where a matching record exists in invoices with the same level. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = znob.level );
{ "outer_table": "tasks", "inner_table": "invoices", "outer_alias": "znob", "inner_alias": "fal", "proj_col": "salary", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03495
train
v1
Schema: invoices (alias: fal)(code, id, date, value) regions(name, value, status, id) Task: Find code from invoices where code appears in regions entries with matching type. SQL:
SELECT code FROM invoices AS fal WHERE code IN ( SELECT code FROM regions AS okiv WHERE okiv.type = fal.type );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "code", "filter_col": "code", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03496
train
v2
Schema: managers (alias: hac)(type, salary, name, id) accounts(code, value, status, id) Task: Find value from managers where a matching record exists in accounts with the same status. SQL:
SELECT value 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": "value", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03497
train
v2
Schema: accounts (alias: jac)(value, status, code, date) orders(status, type, name, amount) Task: Find amount from accounts where a matching record exists in orders with the same level. SQL:
SELECT amount FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = jac.level );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "amount", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03498
train
v2
Schema: transactions (alias: gev)(salary, code, amount, value) customers(amount, date, status, name) Task: Retrieve amount from transactions that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT amount FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = gev.type );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "gev", "inner_alias": "lex", "proj_col": "amount", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03499
train