variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v1
Schema: managers (alias: hac)(status, value, id, salary) requests(salary, value, name, amount) Task: Find id from managers where type appears in requests entries with matching type. SQL:
SELECT id FROM managers AS hac WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.type = hac.type );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "id", "filter_col": "type", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02400
train
v1
Schema: requests (alias: ejof)(id, value, status, salary) employees(type, code, salary, date) Task: Select amount from requests where level exists in employees for the same type. SQL:
SELECT amount FROM requests AS ejof WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.type = ejof.type );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ejof", "inner_alias": "bev", "proj_col": "amount", "filter_col": "level", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02401
train
v2
Schema: employees (alias: bev)(code, status, id, type) tasks(value, code, salary, amount) Task: Retrieve name from employees that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = bev.id );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "name", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02402
train
v1
Schema: invoices (alias: fal)(date, name, salary, type) transactions(level, amount, code, value) Task: Retrieve value from invoices whose level is found in transactions rows where code matches the outer record. SQL:
SELECT value FROM invoices AS fal WHERE level IN ( SELECT level FROM transactions AS gev WHERE gev.code = fal.code );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02403
train
v2
Schema: staff (alias: xnob)(date, amount, name, salary) managers(date, id, amount, type) Task: Retrieve amount from staff that have at least one corresponding entry in managers sharing the same status. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = xnob.status );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "xnob", "inner_alias": "hac", "proj_col": "amount", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02404
train
v1
Schema: projects (alias: uliv)(code, value, id, status) sales(id, name, code, amount) Task: Select amount from projects where id exists in sales for the same status. SQL:
SELECT amount FROM projects AS uliv WHERE id IN ( SELECT id FROM sales AS cif WHERE cif.status = uliv.status );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02405
train
v2
Schema: sales (alias: cif)(id, date, code, type) transactions(name, date, id, level) Task: Retrieve amount from sales that have at least one corresponding entry in transactions sharing the same id. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = cif.id );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "amount", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02406
train
v3
Schema: branches (alias: agov)(code, date, name, id) shipments(value, name, amount, code) Task: Find value from branches where amount exceeds the minimum salary from shipments for the same code. SQL:
SELECT value FROM branches AS agov WHERE amount > ( SELECT MIN(salary) FROM shipments AS vnob WHERE vnob.code = agov.code );
{ "outer_table": "branches", "inner_table": "shipments", "outer_alias": "agov", "inner_alias": "vnob", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02407
train
v2
Schema: schedules (alias: vmob)(type, value, code, status) regions(status, type, id, amount) Task: Find code from schedules where a matching record exists in regions with the same id. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "code", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02408
train
v1
Schema: items (alias: ikob)(salary, status, id, code) departments(code, status, level, type) Task: Find code from items where status appears in departments entries with matching level. SQL:
SELECT code FROM items AS ikob WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.level = ikob.level );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "ikob", "inner_alias": "dov", "proj_col": "code", "filter_col": "status", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02409
train
v2
Schema: invoices (alias: fal)(type, amount, salary, name) shipments(level, salary, value, amount) Task: Find name from invoices where a matching record exists in shipments with the same id. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = fal.id );
{ "outer_table": "invoices", "inner_table": "shipments", "outer_alias": "fal", "inner_alias": "vnob", "proj_col": "name", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02410
train
v3
Schema: departments (alias: dov)(status, id, level, salary) invoices(id, name, level, salary) Task: Find value from departments where value exceeds the count of amount from invoices for the same status. SQL:
SELECT value FROM departments AS dov WHERE value > ( SELECT COUNT(amount) FROM invoices AS fal WHERE fal.status = dov.status );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02411
train
v1
Schema: transactions (alias: gev)(value, status, salary, amount) categories(date, salary, code, type) Task: Select value from transactions where level exists in categories for the same id. SQL:
SELECT value FROM transactions AS gev WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.id = gev.id );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "value", "filter_col": "level", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02412
train
v3
Schema: tasks (alias: znob)(code, type, level, status) orders(name, code, amount, value) Task: Retrieve value from tasks with salary above the SUM(salary) of orders rows sharing the same level. SQL:
SELECT value FROM tasks AS znob WHERE salary > ( SELECT SUM(salary) FROM orders AS kab WHERE kab.level = znob.level );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02413
train
v2
Schema: schedules (alias: vmob)(value, salary, name, status) staff(amount, level, code, value) Task: Find amount from schedules where a matching record exists in staff with the same id. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "amount", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02414
train
v1
Schema: shipments (alias: vnob)(status, code, salary, name) staff(code, status, amount, level) Task: Find value from shipments where type appears in staff entries with matching status. SQL:
SELECT value FROM shipments AS vnob WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02415
train
v1
Schema: managers (alias: hac)(date, type, name, value) regions(value, level, status, id) Task: Select id from managers where code exists in regions for the same code. SQL:
SELECT id FROM managers AS hac WHERE code IN ( SELECT code FROM regions AS okiv WHERE okiv.code = hac.code );
{ "outer_table": "managers", "inner_table": "regions", "outer_alias": "hac", "inner_alias": "okiv", "proj_col": "id", "filter_col": "code", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02416
train
v2
Schema: staff (alias: xnob)(type, code, name, value) products(salary, id, level, type) Task: Find name from staff where a matching record exists in products with the same status. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = xnob.status );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "name", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02417
train
v2
Schema: schedules (alias: vmob)(level, name, value, type) staff(date, type, amount, level) Task: Retrieve salary from schedules that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "salary", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02418
train
v1
Schema: categories (alias: egiv)(name, level, date, salary) schedules(salary, date, id, amount) Task: Find name from categories where level appears in schedules entries with matching status. SQL:
SELECT name FROM categories AS egiv WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "egiv", "inner_alias": "vmob", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02419
train
v3
Schema: staff (alias: xnob)(salary, status, date, level) branches(salary, level, amount, code) Task: Find name from staff where amount exceeds the maximum amount from branches for the same code. SQL:
SELECT name FROM staff AS xnob WHERE amount > ( SELECT MAX(amount) FROM branches AS agov WHERE agov.code = xnob.code );
{ "outer_table": "staff", "inner_table": "branches", "outer_alias": "xnob", "inner_alias": "agov", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02420
train
v2
Schema: schedules (alias: vmob)(level, name, code, amount) products(salary, name, status, value) Task: Find name from schedules where a matching record exists in products with the same type. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "name", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02421
train
v1
Schema: products (alias: nad)(type, status, amount, date) staff(value, amount, type, id) Task: Retrieve value from products whose id is found in staff rows where level matches the outer record. SQL:
SELECT value FROM products AS nad WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.level = nad.level );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02422
train
v2
Schema: regions (alias: okiv)(value, type, name, amount) schedules(level, id, salary, status) Task: Find amount from regions where a matching record exists in schedules with the same id. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.id = okiv.id );
{ "outer_table": "regions", "inner_table": "schedules", "outer_alias": "okiv", "inner_alias": "vmob", "proj_col": "amount", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02423
train
v1
Schema: employees (alias: bev)(name, code, amount, date) projects(amount, level, date, id) Task: Find code from employees where type appears in projects entries with matching code. SQL:
SELECT code FROM employees AS bev WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.code = bev.code );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02424
train
v2
Schema: projects (alias: uliv)(status, id, salary, level) accounts(status, name, id, date) Task: Retrieve value from projects that have at least one corresponding entry in accounts sharing the same status. SQL:
SELECT value FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = uliv.status );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "value", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02425
train
v3
Schema: customers (alias: lex)(date, value, amount, id) tasks(type, level, value, name) Task: Retrieve value from customers with amount above the MAX(value) of tasks rows sharing the same level. SQL:
SELECT value FROM customers AS lex WHERE amount > ( 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": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02426
train
v1
Schema: tasks (alias: znob)(name, date, salary, amount) branches(name, status, level, date) Task: Retrieve id from tasks whose type is found in branches rows where status matches the outer record. SQL:
SELECT id FROM tasks AS znob WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.status = znob.status );
{ "outer_table": "tasks", "inner_table": "branches", "outer_alias": "znob", "inner_alias": "agov", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02427
train
v3
Schema: customers (alias: lex)(type, date, level, value) managers(status, id, salary, amount) Task: Retrieve name from customers with salary above the MAX(salary) of managers rows sharing the same level. SQL:
SELECT name FROM customers AS lex WHERE salary > ( SELECT MAX(salary) FROM managers AS hac WHERE hac.level = lex.level );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02428
train
v2
Schema: shipments (alias: vnob)(name, salary, date, amount) orders(level, salary, type, name) Task: Retrieve id from shipments that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT id 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": "id", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02429
train
v1
Schema: transactions (alias: gev)(value, name, date, code) customers(name, status, code, id) Task: Select amount from transactions where level exists in customers for the same level. SQL:
SELECT amount FROM transactions AS gev WHERE level IN ( SELECT level FROM customers AS lex WHERE lex.level = gev.level );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "gev", "inner_alias": "lex", "proj_col": "amount", "filter_col": "level", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02430
train
v3
Schema: regions (alias: okiv)(name, value, date, level) sales(type, salary, code, name) Task: Find name from regions where value exceeds the count of salary from sales for the same status. SQL:
SELECT name FROM regions AS okiv WHERE value > ( SELECT COUNT(salary) FROM sales AS cif WHERE cif.status = okiv.status );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02431
train
v1
Schema: departments (alias: dov)(id, amount, salary, value) products(name, value, date, code) Task: Select amount from departments where level exists in products for the same status. SQL:
SELECT amount FROM departments AS dov WHERE level IN ( SELECT level FROM products AS nad WHERE nad.status = dov.status );
{ "outer_table": "departments", "inner_table": "products", "outer_alias": "dov", "inner_alias": "nad", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02432
train
v2
Schema: staff (alias: xnob)(salary, code, level, id) products(type, date, level, status) Task: Retrieve value from staff that have at least one corresponding entry in products sharing the same status. SQL:
SELECT value FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = xnob.status );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "value", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02433
train
v1
Schema: schedules (alias: vmob)(salary, level, value, amount) orders(status, code, amount, type) Task: Select salary from schedules where code exists in orders for the same status. SQL:
SELECT salary FROM schedules AS vmob WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "orders", "outer_alias": "vmob", "inner_alias": "kab", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02434
train
v2
Schema: departments (alias: dov)(id, salary, status, value) shipments(value, type, id, status) Task: Retrieve salary from departments that have at least one corresponding entry in shipments sharing the same level. SQL:
SELECT salary FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.level = dov.level );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "salary", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02435
train
v3
Schema: sales (alias: cif)(date, amount, level, salary) requests(code, value, date, status) Task: Retrieve amount from sales with amount above the MIN(amount) of requests rows sharing the same code. SQL:
SELECT amount FROM sales AS cif WHERE amount > ( SELECT MIN(amount) FROM requests AS ejof WHERE ejof.code = cif.code );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02436
train
v3
Schema: managers (alias: hac)(level, amount, value, id) orders(type, value, date, status) Task: Retrieve name from managers with amount above the MAX(amount) of orders rows sharing the same id. SQL:
SELECT name FROM managers AS hac WHERE amount > ( SELECT MAX(amount) FROM orders AS kab WHERE kab.id = hac.id );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02437
train
v2
Schema: customers (alias: lex)(name, salary, value, status) managers(type, value, id, status) Task: Retrieve value from customers that have at least one corresponding entry in managers sharing the same id. SQL:
SELECT value FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = lex.id );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "value", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02438
train
v1
Schema: categories (alias: egiv)(amount, value, level, id) departments(date, salary, name, level) Task: Select name from categories where level exists in departments for the same id. SQL:
SELECT name FROM categories AS egiv WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.id = egiv.id );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "name", "filter_col": "level", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02439
train
v3
Schema: staff (alias: xnob)(name, status, type, amount) categories(code, name, status, type) Task: Find value from staff where value exceeds the average amount from categories for the same level. SQL:
SELECT value FROM staff AS xnob WHERE value > ( SELECT AVG(amount) FROM categories AS egiv WHERE egiv.level = xnob.level );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02440
train
v1
Schema: accounts (alias: jac)(salary, code, name, date) invoices(code, type, id, value) Task: Retrieve id from accounts whose type is found in invoices rows where id matches the outer record. SQL:
SELECT id FROM accounts AS jac WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.id = jac.id );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "id", "filter_col": "type", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02441
train
v3
Schema: transactions (alias: gev)(name, level, value, type) orders(id, level, type, salary) Task: Find value from transactions where value exceeds the count of salary from orders for the same type. SQL:
SELECT value FROM transactions AS gev WHERE value > ( SELECT COUNT(salary) FROM orders AS kab WHERE kab.type = gev.type );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "gev", "inner_alias": "kab", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02442
train
v2
Schema: staff (alias: xnob)(status, value, id, date) products(level, status, amount, id) Task: Find salary from staff where a matching record exists in products with the same type. SQL:
SELECT salary FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = xnob.type );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "salary", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02443
train
v1
Schema: categories (alias: egiv)(amount, status, code, date) departments(name, value, salary, date) Task: Retrieve code from categories whose id is found in departments rows where code matches the outer record. SQL:
SELECT code FROM categories AS egiv WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.code = egiv.code );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "code", "filter_col": "id", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02444
train
v1
Schema: transactions (alias: gev)(date, amount, salary, id) accounts(value, name, type, code) Task: Select id from transactions where level exists in accounts for the same status. SQL:
SELECT id FROM transactions AS gev WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.status = gev.status );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "gev", "inner_alias": "jac", "proj_col": "id", "filter_col": "level", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02445
train
v3
Schema: customers (alias: lex)(value, name, code, id) regions(salary, code, status, value) Task: Retrieve code from customers with value above the AVG(amount) of regions rows sharing the same id. SQL:
SELECT code FROM customers AS lex WHERE value > ( SELECT AVG(amount) FROM regions AS okiv WHERE okiv.id = lex.id );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02446
train
v2
Schema: items (alias: ikob)(code, salary, status, date) customers(id, status, salary, code) Task: Find code from items where a matching record exists in customers with the same code. SQL:
SELECT code FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = ikob.code );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "code", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02447
train
v3
Schema: branches (alias: agov)(status, level, id, value) sales(type, status, code, amount) Task: Find name from branches where amount exceeds the total value from sales for the same id. SQL:
SELECT name FROM branches AS agov WHERE amount > ( SELECT SUM(value) FROM sales AS cif WHERE cif.id = agov.id );
{ "outer_table": "branches", "inner_table": "sales", "outer_alias": "agov", "inner_alias": "cif", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02448
train
v2
Schema: accounts (alias: jac)(salary, code, amount, name) schedules(code, name, amount, value) Task: Find name from accounts where a matching record exists in schedules with the same level. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "name", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02449
train
v3
Schema: regions (alias: okiv)(status, name, id, value) categories(value, name, id, status) Task: Retrieve value from regions with salary above the MIN(value) of categories rows sharing the same level. SQL:
SELECT value FROM regions AS okiv WHERE salary > ( SELECT MIN(value) FROM categories AS egiv WHERE egiv.level = okiv.level );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02450
train
v3
Schema: products (alias: nad)(amount, status, id, value) shipments(level, type, amount, code) Task: Retrieve code from products with salary above the SUM(value) of shipments rows sharing the same type. SQL:
SELECT code FROM products AS nad WHERE salary > ( SELECT SUM(value) FROM shipments AS vnob WHERE vnob.type = nad.type );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02451
train
v3
Schema: customers (alias: lex)(amount, name, value, date) schedules(id, salary, date, amount) Task: Retrieve amount from customers with value above the COUNT(amount) of schedules rows sharing the same type. SQL:
SELECT amount FROM customers AS lex WHERE value > ( SELECT COUNT(amount) FROM schedules AS vmob WHERE vmob.type = lex.type );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02452
train
v3
Schema: invoices (alias: fal)(level, value, salary, id) categories(value, salary, amount, name) Task: Retrieve salary from invoices with amount above the MAX(value) of categories rows sharing the same code. SQL:
SELECT salary FROM invoices AS fal WHERE amount > ( SELECT MAX(value) FROM categories AS egiv WHERE egiv.code = fal.code );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02453
train
v3
Schema: requests (alias: ejof)(level, salary, code, amount) accounts(id, amount, code, level) Task: Find code from requests where salary exceeds the maximum amount from accounts for the same code. SQL:
SELECT code FROM requests AS ejof WHERE salary > ( SELECT MAX(amount) FROM accounts AS jac WHERE jac.code = ejof.code );
{ "outer_table": "requests", "inner_table": "accounts", "outer_alias": "ejof", "inner_alias": "jac", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02454
train
v3
Schema: projects (alias: uliv)(status, code, amount, date) requests(type, id, salary, value) Task: Find code from projects where amount exceeds the average salary from requests for the same type. SQL:
SELECT code FROM projects AS uliv WHERE amount > ( SELECT AVG(salary) FROM requests AS ejof WHERE ejof.type = uliv.type );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02455
train
v1
Schema: staff (alias: xnob)(value, salary, level, amount) products(amount, status, code, date) Task: Retrieve salary from staff whose status is found in products rows where id matches the outer record. SQL:
SELECT salary FROM staff AS xnob WHERE status IN ( SELECT status FROM products AS nad WHERE nad.id = xnob.id );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02456
train
v2
Schema: tasks (alias: znob)(level, type, value, amount) shipments(salary, id, status, name) Task: Find id from tasks where a matching record exists in shipments with the same code. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = znob.code );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "id", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02457
train
v3
Schema: categories (alias: egiv)(code, type, id, value) shipments(status, name, amount, salary) Task: Retrieve name from categories with amount above the MIN(salary) of shipments rows sharing the same code. SQL:
SELECT name FROM categories AS egiv WHERE amount > ( SELECT MIN(salary) FROM shipments AS vnob WHERE vnob.code = egiv.code );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02458
train
v3
Schema: branches (alias: agov)(amount, id, type, value) employees(salary, level, amount, value) Task: Retrieve id from branches with salary above the MIN(salary) of employees rows sharing the same id. SQL:
SELECT id FROM branches AS agov WHERE salary > ( SELECT MIN(salary) FROM employees AS bev WHERE bev.id = agov.id );
{ "outer_table": "branches", "inner_table": "employees", "outer_alias": "agov", "inner_alias": "bev", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02459
train
v2
Schema: tasks (alias: znob)(name, level, type, value) shipments(value, salary, type, id) Task: Retrieve id from tasks that have at least one corresponding entry in shipments sharing the same type. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = znob.type );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "id", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02460
train
v3
Schema: managers (alias: hac)(code, value, salary, date) products(value, status, level, date) Task: Retrieve amount from managers with salary above the MIN(value) of products rows sharing the same status. SQL:
SELECT amount FROM managers AS hac WHERE salary > ( SELECT MIN(value) FROM products AS nad WHERE nad.status = hac.status );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "hac", "inner_alias": "nad", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02461
train
v3
Schema: invoices (alias: fal)(salary, code, value, type) customers(status, salary, level, value) Task: Retrieve id from invoices with salary above the COUNT(amount) of customers rows sharing the same id. SQL:
SELECT id FROM invoices AS fal WHERE salary > ( SELECT COUNT(amount) FROM customers AS lex WHERE lex.id = fal.id );
{ "outer_table": "invoices", "inner_table": "customers", "outer_alias": "fal", "inner_alias": "lex", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02462
train
v1
Schema: requests (alias: ejof)(salary, date, name, id) items(type, value, id, name) Task: Retrieve amount from requests whose type is found in items rows where status matches the outer record. SQL:
SELECT amount FROM requests AS ejof WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "items", "outer_alias": "ejof", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "type", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02463
train
v1
Schema: transactions (alias: gev)(type, code, level, status) categories(status, date, code, amount) Task: Retrieve value from transactions whose id is found in categories rows where level matches the outer record. SQL:
SELECT value FROM transactions AS gev WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.level = gev.level );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02464
train
v2
Schema: requests (alias: ejof)(id, salary, level, status) customers(salary, status, code, level) Task: Find amount from requests where a matching record exists in customers with the same type. SQL:
SELECT amount FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = ejof.type );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "amount", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02465
train
v1
Schema: managers (alias: hac)(code, amount, date, status) requests(salary, id, code, type) Task: Retrieve salary from managers whose code is found in requests rows where code matches the outer record. SQL:
SELECT salary FROM managers AS hac WHERE code IN ( SELECT code FROM requests AS ejof WHERE ejof.code = hac.code );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02466
train
v1
Schema: requests (alias: ejof)(level, amount, salary, name) categories(date, type, amount, value) Task: Retrieve code from requests whose code is found in categories rows where code matches the outer record. SQL:
SELECT code FROM requests AS ejof WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "categories", "outer_alias": "ejof", "inner_alias": "egiv", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02467
train
v3
Schema: managers (alias: hac)(level, name, type, value) employees(status, salary, value, date) Task: Retrieve name from managers with salary above the SUM(salary) of employees rows sharing the same type. SQL:
SELECT name FROM managers AS hac WHERE salary > ( SELECT SUM(salary) FROM employees AS bev WHERE bev.type = hac.type );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02468
train
v1
Schema: projects (alias: uliv)(amount, level, salary, id) branches(name, type, id, value) Task: Retrieve salary from projects whose id is found in branches rows where level matches the outer record. SQL:
SELECT salary FROM projects AS uliv WHERE id IN ( SELECT id 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": "id", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02469
train
v1
Schema: orders (alias: kab)(name, amount, level, date) products(name, date, amount, level) Task: Find name from orders where id appears in products entries with matching code. SQL:
SELECT name FROM orders AS kab WHERE id IN ( SELECT id FROM products AS nad WHERE nad.code = kab.code );
{ "outer_table": "orders", "inner_table": "products", "outer_alias": "kab", "inner_alias": "nad", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02470
train
v1
Schema: schedules (alias: vmob)(status, type, level, id) departments(amount, date, code, value) Task: Retrieve salary from schedules whose level is found in departments rows where level matches the outer record. SQL:
SELECT salary FROM schedules AS vmob WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "vmob", "inner_alias": "dov", "proj_col": "salary", "filter_col": "level", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02471
train
v3
Schema: staff (alias: xnob)(salary, status, name, code) schedules(level, amount, id, date) Task: Find id from staff where salary exceeds the maximum value from schedules for the same level. SQL:
SELECT id FROM staff AS xnob WHERE salary > ( SELECT MAX(value) FROM schedules AS vmob WHERE vmob.level = xnob.level );
{ "outer_table": "staff", "inner_table": "schedules", "outer_alias": "xnob", "inner_alias": "vmob", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02472
train
v3
Schema: transactions (alias: gev)(code, salary, amount, name) employees(level, id, status, type) Task: Retrieve salary from transactions with value above the AVG(salary) of employees rows sharing the same code. SQL:
SELECT salary FROM transactions AS gev WHERE value > ( SELECT AVG(salary) FROM employees AS bev WHERE bev.code = gev.code );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "gev", "inner_alias": "bev", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02473
train
v3
Schema: customers (alias: lex)(status, amount, date, id) categories(status, level, value, salary) Task: Retrieve salary from customers with salary above the SUM(value) of categories rows sharing the same code. SQL:
SELECT salary FROM customers AS lex WHERE salary > ( SELECT SUM(value) FROM categories AS egiv WHERE egiv.code = lex.code );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02474
train
v2
Schema: sales (alias: cif)(salary, value, type, amount) schedules(amount, name, status, date) Task: Find amount from sales where a matching record exists in schedules with the same status. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = cif.status );
{ "outer_table": "sales", "inner_table": "schedules", "outer_alias": "cif", "inner_alias": "vmob", "proj_col": "amount", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02475
train
v1
Schema: branches (alias: agov)(value, status, name, amount) orders(date, level, salary, name) Task: Find value from branches where level appears in orders entries with matching code. SQL:
SELECT value FROM branches AS agov WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.code = agov.code );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02476
train
v2
Schema: sales (alias: cif)(amount, code, date, level) regions(type, level, code, name) Task: Find salary from sales where a matching record exists in regions with the same level. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = cif.level );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "salary", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02477
train
v1
Schema: items (alias: ikob)(amount, id, type, salary) branches(name, status, salary, level) Task: Select value from items where code exists in branches for the same id. SQL:
SELECT value FROM items AS ikob WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.id = ikob.id );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "value", "filter_col": "code", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02478
train
v3
Schema: tasks (alias: znob)(id, name, level, date) projects(name, amount, level, date) Task: Retrieve amount from tasks with salary above the MAX(amount) of projects rows sharing the same id. SQL:
SELECT amount FROM tasks AS znob WHERE salary > ( SELECT MAX(amount) FROM projects AS uliv WHERE uliv.id = znob.id );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02479
train
v2
Schema: departments (alias: dov)(status, name, code, type) branches(id, salary, value, type) Task: Find name from departments where a matching record exists in branches with the same status. SQL:
SELECT name FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = dov.status );
{ "outer_table": "departments", "inner_table": "branches", "outer_alias": "dov", "inner_alias": "agov", "proj_col": "name", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02480
train
v1
Schema: staff (alias: xnob)(level, amount, value, date) managers(amount, status, date, id) Task: Select id from staff where type exists in managers for the same status. SQL:
SELECT id FROM staff AS xnob WHERE type IN ( SELECT type FROM managers AS hac WHERE hac.status = xnob.status );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "xnob", "inner_alias": "hac", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02481
train
v2
Schema: regions (alias: okiv)(name, id, amount, value) orders(id, amount, value, code) Task: Find salary from regions where a matching record exists in orders with the same id. SQL:
SELECT salary FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = okiv.id );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "salary", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02482
train
v3
Schema: categories (alias: egiv)(id, value, date, salary) items(salary, status, type, date) Task: Retrieve code from categories with amount above the MAX(amount) of items rows sharing the same status. SQL:
SELECT code FROM categories AS egiv WHERE amount > ( SELECT MAX(amount) FROM items AS ikob WHERE ikob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "items", "outer_alias": "egiv", "inner_alias": "ikob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02483
train
v3
Schema: employees (alias: bev)(level, status, amount, value) items(salary, name, level, status) Task: Retrieve amount from employees with amount above the AVG(salary) of items rows sharing the same status. SQL:
SELECT amount FROM employees AS bev WHERE amount > ( SELECT AVG(salary) FROM items AS ikob WHERE ikob.status = bev.status );
{ "outer_table": "employees", "inner_table": "items", "outer_alias": "bev", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02484
train
v3
Schema: tasks (alias: znob)(id, name, salary, level) staff(value, status, salary, date) Task: Retrieve name from tasks with value above the MIN(value) of staff rows sharing the same status. SQL:
SELECT name FROM tasks AS znob WHERE value > ( SELECT MIN(value) FROM staff AS xnob WHERE xnob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02485
train
v1
Schema: customers (alias: lex)(type, amount, status, salary) schedules(name, type, id, date) Task: Select salary from customers where level exists in schedules for the same id. SQL:
SELECT salary FROM customers AS lex WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.id = lex.id );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02486
train
v1
Schema: requests (alias: ejof)(id, date, amount, value) staff(level, status, salary, value) Task: Select id from requests where status exists in staff for the same level. SQL:
SELECT id FROM requests AS ejof WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.level = ejof.level );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ejof", "inner_alias": "xnob", "proj_col": "id", "filter_col": "status", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02487
train
v1
Schema: transactions (alias: gev)(date, id, status, salary) departments(name, status, type, id) Task: Retrieve code from transactions whose level is found in departments rows where level matches the outer record. SQL:
SELECT code FROM transactions AS gev WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.level = gev.level );
{ "outer_table": "transactions", "inner_table": "departments", "outer_alias": "gev", "inner_alias": "dov", "proj_col": "code", "filter_col": "level", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02488
train
v1
Schema: requests (alias: ejof)(date, name, status, amount) transactions(date, name, id, salary) Task: Retrieve amount from requests whose id is found in transactions rows where id matches the outer record. SQL:
SELECT amount FROM requests AS ejof WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.id = ejof.id );
{ "outer_table": "requests", "inner_table": "transactions", "outer_alias": "ejof", "inner_alias": "gev", "proj_col": "amount", "filter_col": "id", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02489
train
v2
Schema: orders (alias: kab)(type, id, level, salary) departments(value, id, type, level) Task: Find code from orders where a matching record exists in departments with the same status. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = kab.status );
{ "outer_table": "orders", "inner_table": "departments", "outer_alias": "kab", "inner_alias": "dov", "proj_col": "code", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02490
train
v2
Schema: categories (alias: egiv)(code, date, type, salary) schedules(status, id, level, salary) Task: Retrieve id from categories that have at least one corresponding entry in schedules sharing the same type. SQL:
SELECT id FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "egiv", "inner_alias": "vmob", "proj_col": "id", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02491
train
v1
Schema: transactions (alias: gev)(level, salary, code, date) schedules(type, level, value, code) Task: Find name from transactions where level appears in schedules entries with matching code. SQL:
SELECT name FROM transactions AS gev WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.code = gev.code );
{ "outer_table": "transactions", "inner_table": "schedules", "outer_alias": "gev", "inner_alias": "vmob", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02492
train
v1
Schema: customers (alias: lex)(amount, name, type, status) branches(value, type, date, name) Task: Find name from customers where code appears in branches entries with matching code. SQL:
SELECT name FROM customers AS lex WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.code = lex.code );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02493
train
v3
Schema: customers (alias: lex)(date, salary, amount, type) departments(status, value, salary, name) Task: Find id from customers where amount exceeds the minimum salary from departments for the same type. SQL:
SELECT id FROM customers AS lex WHERE amount > ( SELECT MIN(salary) FROM departments AS dov WHERE dov.type = lex.type );
{ "outer_table": "customers", "inner_table": "departments", "outer_alias": "lex", "inner_alias": "dov", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02494
train
v2
Schema: accounts (alias: jac)(name, date, value, amount) customers(id, status, date, name) Task: Find name from accounts where a matching record exists in customers with the same id. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = jac.id );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "name", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02495
train
v2
Schema: customers (alias: lex)(value, level, date, status) projects(type, id, date, status) Task: Retrieve code from customers that have at least one corresponding entry in projects sharing the same type. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = lex.type );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "code", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02496
train
v1
Schema: categories (alias: egiv)(id, value, status, salary) tasks(code, amount, id, type) Task: Select amount from categories where status exists in tasks for the same type. SQL:
SELECT amount FROM categories AS egiv WHERE status IN ( SELECT status FROM tasks AS znob WHERE znob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "tasks", "outer_alias": "egiv", "inner_alias": "znob", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02497
train
v3
Schema: employees (alias: bev)(amount, id, date, status) accounts(salary, amount, level, name) Task: Find salary from employees where salary exceeds the maximum value from accounts for the same type. SQL:
SELECT salary FROM employees AS bev WHERE salary > ( SELECT MAX(value) FROM accounts AS jac WHERE jac.type = bev.type );
{ "outer_table": "employees", "inner_table": "accounts", "outer_alias": "bev", "inner_alias": "jac", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02498
train
v2
Schema: invoices (alias: fal)(type, id, level, date) orders(name, status, id, type) Task: Retrieve value from invoices that have at least one corresponding entry in orders sharing the same code. SQL:
SELECT value FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.code = fal.code );
{ "outer_table": "invoices", "inner_table": "orders", "outer_alias": "fal", "inner_alias": "kab", "proj_col": "value", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02499
train