variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v3
Schema: tasks (alias: znob)(salary, amount, name, value) staff(type, amount, status, salary) Task: Find value from tasks where value exceeds the minimum value from staff for the same id. SQL:
SELECT value FROM tasks AS znob WHERE value > ( SELECT MIN(value) FROM staff AS xnob WHERE xnob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09400
train
v1
Schema: sales (alias: cif)(name, value, type, salary) regions(status, value, level, type) Task: Retrieve id from sales whose type is found in regions rows where status matches the outer record. SQL:
SELECT id FROM sales AS cif WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.status = cif.status );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09401
train
v3
Schema: departments (alias: dov)(name, salary, status, value) categories(id, value, salary, type) Task: Retrieve salary from departments with amount above the MAX(amount) of categories rows sharing the same status. SQL:
SELECT salary FROM departments AS dov WHERE amount > ( SELECT MAX(amount) FROM categories AS egiv WHERE egiv.status = dov.status );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dov", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09402
train
v1
Schema: projects (alias: uliv)(level, date, type, value) departments(id, date, name, type) Task: Retrieve name from projects whose id is found in departments rows where code matches the outer record. SQL:
SELECT name FROM projects AS uliv WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.code = uliv.code );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "uliv", "inner_alias": "dov", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09403
train
v2
Schema: schedules (alias: vmob)(type, salary, status, amount) departments(date, name, value, level) Task: Find salary from schedules where a matching record exists in departments with the same code. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "vmob", "inner_alias": "dov", "proj_col": "salary", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09404
train
v2
Schema: departments (alias: dov)(salary, type, value, id) regions(type, value, status, code) Task: Find name from departments where a matching record exists in regions with the same status. SQL:
SELECT name FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = dov.status );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dov", "inner_alias": "okiv", "proj_col": "name", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09405
train
v2
Schema: branches (alias: agov)(amount, value, salary, code) departments(name, level, id, type) Task: Retrieve salary from branches that have at least one corresponding entry in departments sharing the same code. SQL:
SELECT salary FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = agov.code );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "salary", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09406
train
v2
Schema: staff (alias: xnob)(name, status, id, type) employees(level, type, id, value) Task: Retrieve id from staff that have at least one corresponding entry in employees sharing the same code. SQL:
SELECT id FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.code = xnob.code );
{ "outer_table": "staff", "inner_table": "employees", "outer_alias": "xnob", "inner_alias": "bev", "proj_col": "id", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09407
train
v1
Schema: tasks (alias: znob)(value, code, amount, salary) departments(value, type, level, status) Task: Retrieve id from tasks whose level is found in departments rows where type matches the outer record. SQL:
SELECT id FROM tasks AS znob WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.type = znob.type );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09408
train
v2
Schema: projects (alias: uliv)(id, amount, salary, date) tasks(salary, code, amount, value) Task: Find id from projects where a matching record exists in tasks with the same code. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "uliv", "inner_alias": "znob", "proj_col": "id", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09409
train
v3
Schema: transactions (alias: gev)(value, level, code, salary) tasks(value, amount, code, salary) Task: Retrieve value from transactions with value above the COUNT(salary) of tasks rows sharing the same level. SQL:
SELECT value FROM transactions AS gev WHERE value > ( SELECT COUNT(salary) FROM tasks AS znob WHERE znob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09410
train
v3
Schema: departments (alias: dov)(status, value, date, id) requests(name, value, id, salary) Task: Retrieve id from departments with value above the SUM(amount) of requests rows sharing the same type. SQL:
SELECT id FROM departments AS dov WHERE value > ( SELECT SUM(amount) FROM requests AS ejof WHERE ejof.type = dov.type );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09411
train
v1
Schema: products (alias: nad)(name, value, status, salary) sales(amount, value, status, code) Task: Retrieve code from products whose type is found in sales rows where status matches the outer record. SQL:
SELECT code FROM products AS nad WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.status = nad.status );
{ "outer_table": "products", "inner_table": "sales", "outer_alias": "nad", "inner_alias": "cif", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09412
train
v3
Schema: sales (alias: cif)(amount, type, value, name) transactions(name, type, salary, value) Task: Find value from sales where salary exceeds the total amount from transactions for the same code. SQL:
SELECT value FROM sales AS cif WHERE salary > ( SELECT SUM(amount) FROM transactions AS gev WHERE gev.code = cif.code );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09413
train
v3
Schema: sales (alias: cif)(code, level, status, date) invoices(salary, name, status, value) Task: Retrieve salary from sales with salary above the COUNT(amount) of invoices rows sharing the same status. SQL:
SELECT salary FROM sales AS cif WHERE salary > ( SELECT COUNT(amount) FROM invoices AS fal WHERE fal.status = cif.status );
{ "outer_table": "sales", "inner_table": "invoices", "outer_alias": "cif", "inner_alias": "fal", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09414
train
v1
Schema: tasks (alias: znob)(amount, code, salary, date) departments(code, amount, salary, level) Task: Select name from tasks where id exists in departments for the same type. SQL:
SELECT name FROM tasks AS znob WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.type = znob.type );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "name", "filter_col": "id", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09415
train
v2
Schema: transactions (alias: gev)(level, value, type, id) regions(code, amount, salary, name) Task: Find value from transactions where a matching record exists in regions with the same code. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = gev.code );
{ "outer_table": "transactions", "inner_table": "regions", "outer_alias": "gev", "inner_alias": "okiv", "proj_col": "value", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09416
train
v1
Schema: requests (alias: ejof)(status, amount, value, type) shipments(amount, value, status, salary) Task: Find amount from requests where status appears in shipments entries with matching id. SQL:
SELECT amount FROM requests AS ejof WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ejof", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09417
train
v2
Schema: managers (alias: hac)(status, salary, amount, level) accounts(value, salary, status, type) Task: Find salary from managers where a matching record exists in accounts with the same type. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = hac.type );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "salary", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09418
train
v1
Schema: products (alias: nad)(type, date, level, amount) departments(value, level, id, salary) Task: Retrieve id from products whose status is found in departments rows where type matches the outer record. SQL:
SELECT id FROM products AS nad WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.type = nad.type );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09419
train
v2
Schema: employees (alias: bev)(status, amount, id, type) invoices(type, code, salary, value) Task: Retrieve amount from employees that have at least one corresponding entry in invoices sharing the same id. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = bev.id );
{ "outer_table": "employees", "inner_table": "invoices", "outer_alias": "bev", "inner_alias": "fal", "proj_col": "amount", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09420
train
v1
Schema: orders (alias: kab)(type, code, amount, value) requests(salary, type, level, code) Task: Find value from orders where status appears in requests entries with matching id. SQL:
SELECT value FROM orders AS kab WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.id = kab.id );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "value", "filter_col": "status", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09421
train
v1
Schema: invoices (alias: fal)(code, type, name, date) products(salary, id, date, code) Task: Retrieve name from invoices whose type is found in products rows where level matches the outer record. SQL:
SELECT name FROM invoices AS fal WHERE type IN ( SELECT type FROM products AS nad WHERE nad.level = fal.level );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "name", "filter_col": "type", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09422
train
v2
Schema: orders (alias: kab)(status, value, salary, id) projects(id, amount, code, status) Task: Find value from orders where a matching record exists in projects with the same code. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = kab.code );
{ "outer_table": "orders", "inner_table": "projects", "outer_alias": "kab", "inner_alias": "uliv", "proj_col": "value", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09423
train
v3
Schema: managers (alias: hac)(type, value, name, salary) branches(name, id, date, level) Task: Retrieve value from managers with salary above the AVG(amount) of branches rows sharing the same level. SQL:
SELECT value FROM managers AS hac WHERE salary > ( SELECT AVG(amount) FROM branches AS agov WHERE agov.level = hac.level );
{ "outer_table": "managers", "inner_table": "branches", "outer_alias": "hac", "inner_alias": "agov", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09424
train
v2
Schema: employees (alias: bev)(level, type, salary, code) departments(code, date, id, name) Task: Find salary from employees where a matching record exists in departments with the same id. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = bev.id );
{ "outer_table": "employees", "inner_table": "departments", "outer_alias": "bev", "inner_alias": "dov", "proj_col": "salary", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09425
train
v3
Schema: branches (alias: agov)(status, code, value, id) items(date, value, code, type) Task: Retrieve name from branches with amount above the SUM(amount) of items rows sharing the same id. SQL:
SELECT name FROM branches AS agov WHERE amount > ( SELECT SUM(amount) FROM items AS ikob WHERE ikob.id = agov.id );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09426
train
v3
Schema: employees (alias: bev)(status, name, salary, amount) transactions(type, level, id, date) Task: Retrieve amount from employees with amount above the COUNT(value) of transactions rows sharing the same code. SQL:
SELECT amount FROM employees AS bev WHERE amount > ( SELECT COUNT(value) FROM transactions AS gev WHERE gev.code = bev.code );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "bev", "inner_alias": "gev", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09427
train
v3
Schema: accounts (alias: jac)(salary, code, id, amount) sales(status, amount, salary, code) Task: Find code from accounts where amount exceeds the minimum salary from sales for the same type. SQL:
SELECT code FROM accounts AS jac WHERE amount > ( SELECT MIN(salary) FROM sales AS cif WHERE cif.type = jac.type );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09428
train
v2
Schema: managers (alias: hac)(name, status, level, amount) products(salary, id, code, type) Task: Retrieve code from managers that have at least one corresponding entry in products sharing the same level. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = hac.level );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "hac", "inner_alias": "nad", "proj_col": "code", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09429
train
v1
Schema: products (alias: nad)(level, type, salary, code) branches(status, amount, code, name) Task: Select name from products where type exists in branches for the same code. SQL:
SELECT name FROM products AS nad WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.code = nad.code );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09430
train
v2
Schema: staff (alias: xnob)(date, value, name, salary) departments(value, level, type, date) Task: Retrieve id from staff that have at least one corresponding entry in departments sharing the same level. SQL:
SELECT id FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = xnob.level );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "id", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09431
train
v1
Schema: categories (alias: egiv)(date, code, id, value) shipments(level, id, date, status) Task: Retrieve code from categories whose level is found in shipments rows where status matches the outer record. SQL:
SELECT code FROM categories AS egiv WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09432
train
v1
Schema: staff (alias: xnob)(salary, name, amount, value) invoices(code, status, type, value) Task: Find name from staff where status appears in invoices entries with matching code. SQL:
SELECT name FROM staff AS xnob WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.code = xnob.code );
{ "outer_table": "staff", "inner_table": "invoices", "outer_alias": "xnob", "inner_alias": "fal", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09433
train
v2
Schema: invoices (alias: fal)(salary, status, level, value) schedules(code, value, salary, status) Task: Find value from invoices where a matching record exists in schedules with the same id. SQL:
SELECT value FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.id = fal.id );
{ "outer_table": "invoices", "inner_table": "schedules", "outer_alias": "fal", "inner_alias": "vmob", "proj_col": "value", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09434
train
v3
Schema: shipments (alias: vnob)(name, level, date, value) projects(date, id, code, level) Task: Find code from shipments where salary exceeds the minimum amount from projects for the same id. SQL:
SELECT code FROM shipments AS vnob WHERE salary > ( SELECT MIN(amount) FROM projects AS uliv WHERE uliv.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "projects", "outer_alias": "vnob", "inner_alias": "uliv", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09435
train
v1
Schema: employees (alias: bev)(salary, type, amount, id) staff(id, salary, value, code) Task: Select code from employees where level exists in staff for the same code. SQL:
SELECT code FROM employees AS bev WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.code = bev.code );
{ "outer_table": "employees", "inner_table": "staff", "outer_alias": "bev", "inner_alias": "xnob", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09436
train
v1
Schema: invoices (alias: fal)(level, code, type, salary) items(code, id, date, status) Task: Select name from invoices where level exists in items for the same id. SQL:
SELECT name FROM invoices AS fal WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.id = fal.id );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "fal", "inner_alias": "ikob", "proj_col": "name", "filter_col": "level", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09437
train
v1
Schema: products (alias: nad)(id, name, code, amount) requests(status, salary, level, name) Task: Retrieve code from products whose level is found in requests rows where code matches the outer record. SQL:
SELECT code FROM products AS nad WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.code = nad.code );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09438
train
v2
Schema: staff (alias: xnob)(code, salary, id, name) items(level, id, name, value) Task: Find salary from staff where a matching record exists in items with the same code. SQL:
SELECT salary FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = xnob.code );
{ "outer_table": "staff", "inner_table": "items", "outer_alias": "xnob", "inner_alias": "ikob", "proj_col": "salary", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09439
train
v2
Schema: regions (alias: okiv)(salary, date, value, type) tasks(salary, date, value, level) Task: Find amount from regions where a matching record exists in tasks with the same type. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = okiv.type );
{ "outer_table": "regions", "inner_table": "tasks", "outer_alias": "okiv", "inner_alias": "znob", "proj_col": "amount", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09440
train
v2
Schema: customers (alias: lex)(date, salary, code, id) managers(level, date, id, amount) Task: Find amount from customers where a matching record exists in managers with the same type. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = lex.type );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "amount", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09441
train
v3
Schema: projects (alias: uliv)(amount, id, name, status) requests(level, date, status, type) Task: Find id from projects where amount exceeds the count of salary from requests for the same id. SQL:
SELECT id FROM projects AS uliv WHERE amount > ( SELECT COUNT(salary) FROM requests AS ejof WHERE ejof.id = uliv.id );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09442
train
v1
Schema: invoices (alias: fal)(salary, id, amount, name) employees(date, salary, id, code) Task: Find amount from invoices where type appears in employees entries with matching type. SQL:
SELECT amount FROM invoices AS fal WHERE type IN ( SELECT type FROM employees AS bev WHERE bev.type = fal.type );
{ "outer_table": "invoices", "inner_table": "employees", "outer_alias": "fal", "inner_alias": "bev", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09443
train
v2
Schema: categories (alias: egiv)(id, value, code, salary) customers(name, salary, status, level) Task: Retrieve name from categories that have at least one corresponding entry in customers sharing the same id. SQL:
SELECT name FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = egiv.id );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "name", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09444
train
v3
Schema: staff (alias: xnob)(salary, value, status, type) schedules(name, date, value, code) Task: Find value from staff where value exceeds the average value from schedules for the same id. SQL:
SELECT value FROM staff AS xnob WHERE value > ( SELECT AVG(value) FROM schedules AS vmob WHERE vmob.id = xnob.id );
{ "outer_table": "staff", "inner_table": "schedules", "outer_alias": "xnob", "inner_alias": "vmob", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09445
train
v3
Schema: projects (alias: uliv)(id, date, type, name) staff(date, type, salary, level) Task: Find value from projects where amount exceeds the minimum salary from staff for the same id. SQL:
SELECT value FROM projects AS uliv WHERE amount > ( SELECT MIN(salary) FROM staff AS xnob WHERE xnob.id = uliv.id );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09446
train
v2
Schema: tasks (alias: znob)(level, id, date, amount) departments(salary, status, value, code) Task: Find id from tasks where a matching record exists in departments with the same id. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = znob.id );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "id", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09447
train
v1
Schema: invoices (alias: fal)(level, salary, amount, code) projects(salary, value, date, name) Task: Retrieve amount from invoices whose status is found in projects rows where status matches the outer record. SQL:
SELECT amount FROM invoices AS fal WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.status = fal.status );
{ "outer_table": "invoices", "inner_table": "projects", "outer_alias": "fal", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09448
train
v2
Schema: sales (alias: cif)(value, status, name, amount) transactions(name, date, code, type) Task: Find value from sales where a matching record exists in transactions with the same id. SQL:
SELECT value 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": "value", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09449
train
v2
Schema: products (alias: nad)(value, amount, code, id) transactions(level, salary, status, code) Task: Retrieve amount from products that have at least one corresponding entry in transactions sharing the same status. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = nad.status );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "amount", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09450
train
v1
Schema: branches (alias: agov)(level, type, name, salary) managers(level, value, code, type) Task: Select value from branches where code exists in managers for the same code. SQL:
SELECT value FROM branches AS agov WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.code = agov.code );
{ "outer_table": "branches", "inner_table": "managers", "outer_alias": "agov", "inner_alias": "hac", "proj_col": "value", "filter_col": "code", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09451
train
v2
Schema: products (alias: nad)(name, date, type, code) schedules(date, amount, value, type) Task: Retrieve id from products that have at least one corresponding entry in schedules sharing the same id. SQL:
SELECT id FROM products AS nad WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.id = nad.id );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "id", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09452
train
v1
Schema: managers (alias: hac)(level, amount, salary, type) regions(level, type, name, date) Task: Select amount from managers where type exists in regions for the same code. SQL:
SELECT amount FROM managers AS hac WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.code = hac.code );
{ "outer_table": "managers", "inner_table": "regions", "outer_alias": "hac", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09453
train
v3
Schema: products (alias: nad)(status, amount, code, id) shipments(id, value, code, status) Task: Find id from products where amount exceeds the maximum salary from shipments for the same code. SQL:
SELECT id FROM products AS nad WHERE amount > ( SELECT MAX(salary) FROM shipments AS vnob WHERE vnob.code = nad.code );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09454
train
v2
Schema: tasks (alias: znob)(date, level, code, type) regions(status, name, level, amount) Task: Find amount from tasks where a matching record exists in regions with the same status. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = znob.status );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "amount", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09455
train
v2
Schema: schedules (alias: vmob)(amount, name, id, status) managers(salary, code, status, type) Task: Retrieve id from schedules that have at least one corresponding entry in managers sharing the same id. SQL:
SELECT id FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "id", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09456
train
v2
Schema: sales (alias: cif)(amount, status, name, level) requests(date, salary, amount, value) Task: Find name from sales where a matching record exists in requests with the same code. SQL:
SELECT name FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = cif.code );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "name", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09457
train
v1
Schema: categories (alias: egiv)(status, date, id, amount) customers(id, level, type, salary) Task: Retrieve name from categories whose status is found in customers rows where code matches the outer record. SQL:
SELECT name FROM categories AS egiv WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.code = egiv.code );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09458
train
v1
Schema: schedules (alias: vmob)(type, status, value, salary) categories(value, salary, id, type) Task: Retrieve value from schedules whose id is found in categories rows where type matches the outer record. SQL:
SELECT value FROM schedules AS vmob WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09459
train
v2
Schema: regions (alias: okiv)(value, level, type, status) accounts(level, status, amount, name) Task: Retrieve amount from regions that have at least one corresponding entry in accounts sharing the same level. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = okiv.level );
{ "outer_table": "regions", "inner_table": "accounts", "outer_alias": "okiv", "inner_alias": "jac", "proj_col": "amount", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09460
train
v1
Schema: products (alias: nad)(name, date, amount, id) managers(date, value, salary, amount) Task: Find amount from products where id appears in managers entries with matching code. SQL:
SELECT amount FROM products AS nad WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.code = nad.code );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "nad", "inner_alias": "hac", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09461
train
v2
Schema: shipments (alias: vnob)(id, date, value, amount) employees(id, salary, code, amount) Task: Retrieve value from shipments that have at least one corresponding entry in employees sharing the same level. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "value", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09462
train
v3
Schema: accounts (alias: jac)(type, name, level, salary) categories(status, salary, value, level) Task: Find salary from accounts where amount exceeds the average amount from categories for the same status. SQL:
SELECT salary FROM accounts AS jac WHERE amount > ( SELECT AVG(amount) FROM categories AS egiv WHERE egiv.status = jac.status );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "jac", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09463
train
v3
Schema: projects (alias: uliv)(type, salary, level, code) categories(amount, date, id, status) Task: Retrieve salary from projects with salary above the SUM(salary) of categories rows sharing the same code. SQL:
SELECT salary FROM projects AS uliv WHERE salary > ( SELECT SUM(salary) FROM categories AS egiv WHERE egiv.code = uliv.code );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09464
train
v2
Schema: accounts (alias: jac)(code, amount, status, type) regions(value, name, type, amount) Task: Retrieve name from accounts that have at least one corresponding entry in regions sharing the same id. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = jac.id );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "name", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09465
train
v3
Schema: accounts (alias: jac)(value, status, type, code) invoices(salary, id, date, amount) Task: Retrieve name from accounts with amount above the SUM(value) of invoices rows sharing the same code. SQL:
SELECT name FROM accounts AS jac WHERE amount > ( SELECT SUM(value) FROM invoices AS fal WHERE fal.code = jac.code );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09466
train
v3
Schema: projects (alias: uliv)(status, value, date, amount) items(level, status, salary, value) Task: Retrieve salary from projects with amount above the AVG(value) of items rows sharing the same id. SQL:
SELECT salary FROM projects AS uliv WHERE amount > ( SELECT AVG(value) FROM items AS ikob WHERE ikob.id = uliv.id );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09467
train
v3
Schema: items (alias: ikob)(level, date, value, amount) sales(value, name, date, type) Task: Find amount from items where value exceeds the average value from sales for the same type. SQL:
SELECT amount FROM items AS ikob WHERE value > ( SELECT AVG(value) FROM sales AS cif WHERE cif.type = ikob.type );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09468
train
v3
Schema: projects (alias: uliv)(level, amount, id, value) managers(status, date, id, salary) Task: Retrieve amount from projects with value above the MAX(salary) of managers rows sharing the same level. SQL:
SELECT amount FROM projects AS uliv WHERE value > ( SELECT MAX(salary) FROM managers AS hac WHERE hac.level = uliv.level );
{ "outer_table": "projects", "inner_table": "managers", "outer_alias": "uliv", "inner_alias": "hac", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09469
train
v3
Schema: shipments (alias: vnob)(level, type, date, status) orders(salary, name, date, type) Task: Find name from shipments where salary exceeds the total amount from orders for the same code. SQL:
SELECT name FROM shipments AS vnob WHERE salary > ( SELECT SUM(amount) FROM orders AS kab WHERE kab.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09470
train
v1
Schema: branches (alias: agov)(amount, salary, value, type) accounts(status, salary, id, amount) Task: Retrieve id from branches whose status is found in accounts rows where type matches the outer record. SQL:
SELECT id FROM branches AS agov WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.type = agov.type );
{ "outer_table": "branches", "inner_table": "accounts", "outer_alias": "agov", "inner_alias": "jac", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09471
train
v2
Schema: shipments (alias: vnob)(value, status, level, code) accounts(type, level, amount, value) Task: Retrieve value from shipments that have at least one corresponding entry in accounts sharing the same status. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "accounts", "outer_alias": "vnob", "inner_alias": "jac", "proj_col": "value", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09472
train
v3
Schema: branches (alias: agov)(date, value, status, id) accounts(value, id, name, amount) Task: Retrieve name from branches with salary above the COUNT(amount) of accounts rows sharing the same status. SQL:
SELECT name FROM branches AS agov WHERE salary > ( SELECT COUNT(amount) FROM accounts AS jac WHERE jac.status = agov.status );
{ "outer_table": "branches", "inner_table": "accounts", "outer_alias": "agov", "inner_alias": "jac", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09473
train
v2
Schema: departments (alias: dov)(date, salary, amount, code) categories(amount, value, name, code) Task: Retrieve amount from departments that have at least one corresponding entry in categories sharing the same level. SQL:
SELECT amount FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = dov.level );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dov", "inner_alias": "egiv", "proj_col": "amount", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09474
train
v1
Schema: departments (alias: dov)(date, type, salary, amount) shipments(date, type, id, salary) Task: Retrieve code from departments whose level is found in shipments rows where status matches the outer record. SQL:
SELECT code FROM departments AS dov WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09475
train
v3
Schema: branches (alias: agov)(date, name, type, level) shipments(date, code, status, salary) Task: Find amount from branches where salary exceeds the maximum salary from shipments for the same level. SQL:
SELECT amount FROM branches AS agov WHERE salary > ( SELECT MAX(salary) FROM shipments AS vnob WHERE vnob.level = agov.level );
{ "outer_table": "branches", "inner_table": "shipments", "outer_alias": "agov", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09476
train
v1
Schema: shipments (alias: vnob)(amount, salary, type, id) departments(code, type, level, id) Task: Retrieve value from shipments whose level is found in departments rows where status matches the outer record. SQL:
SELECT value FROM shipments AS vnob WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09477
train
v3
Schema: managers (alias: hac)(value, name, amount, code) tasks(value, amount, id, type) Task: Find code from managers where value exceeds the average value from tasks for the same id. SQL:
SELECT code FROM managers AS hac WHERE value > ( SELECT AVG(value) FROM tasks AS znob WHERE znob.id = hac.id );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09478
train
v1
Schema: shipments (alias: vnob)(name, salary, code, status) departments(name, type, amount, level) Task: Select id from shipments where status exists in departments for the same id. SQL:
SELECT id FROM shipments AS vnob WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09479
train
v2
Schema: staff (alias: xnob)(code, name, type, level) accounts(status, name, amount, salary) Task: Retrieve amount from staff that have at least one corresponding entry in accounts sharing the same status. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = xnob.status );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "amount", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09480
train
v1
Schema: managers (alias: hac)(status, id, level, name) employees(salary, date, level, status) Task: Select value from managers where id exists in employees for the same type. SQL:
SELECT value FROM managers AS hac WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.type = hac.type );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09481
train
v3
Schema: products (alias: nad)(value, date, code, level) shipments(name, value, date, code) Task: Retrieve id from products with value above the AVG(value) of shipments rows sharing the same id. SQL:
SELECT id FROM products AS nad WHERE value > ( SELECT AVG(value) FROM shipments AS vnob WHERE vnob.id = nad.id );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09482
train
v1
Schema: customers (alias: lex)(level, name, type, date) products(date, id, code, level) Task: Find id from customers where code appears in products entries with matching level. SQL:
SELECT id FROM customers AS lex WHERE code IN ( SELECT code FROM products AS nad WHERE nad.level = lex.level );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09483
train
v1
Schema: orders (alias: kab)(amount, name, code, status) staff(value, status, code, level) Task: Find code from orders where level appears in staff entries with matching code. SQL:
SELECT code FROM orders AS kab WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.code = kab.code );
{ "outer_table": "orders", "inner_table": "staff", "outer_alias": "kab", "inner_alias": "xnob", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09484
train
v3
Schema: employees (alias: bev)(level, type, amount, name) transactions(value, name, level, status) Task: Find salary from employees where salary exceeds the count of value from transactions for the same level. SQL:
SELECT salary FROM employees AS bev WHERE salary > ( SELECT COUNT(value) FROM transactions AS gev WHERE gev.level = bev.level );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "bev", "inner_alias": "gev", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09485
train
v1
Schema: regions (alias: okiv)(date, code, name, id) projects(type, id, value, salary) Task: Find amount from regions where id appears in projects entries with matching type. SQL:
SELECT amount FROM regions AS okiv WHERE id IN ( SELECT id FROM projects AS uliv WHERE uliv.type = okiv.type );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09486
train
v3
Schema: managers (alias: hac)(status, amount, id, name) requests(id, date, level, salary) Task: Retrieve salary from managers with amount above the SUM(amount) of requests rows sharing the same status. SQL:
SELECT salary FROM managers AS hac WHERE amount > ( SELECT SUM(amount) FROM requests AS ejof WHERE ejof.status = hac.status );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09487
train
v1
Schema: projects (alias: uliv)(code, level, value, status) customers(code, salary, type, value) Task: Find code from projects where id appears in customers entries with matching id. SQL:
SELECT code FROM projects AS uliv WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.id = uliv.id );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "uliv", "inner_alias": "lex", "proj_col": "code", "filter_col": "id", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09488
train
v1
Schema: departments (alias: dov)(status, id, date, level) shipments(code, salary, value, name) Task: Find value from departments where code appears in shipments entries with matching status. SQL:
SELECT value FROM departments AS dov WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "value", "filter_col": "code", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09489
train
v1
Schema: employees (alias: bev)(level, date, status, value) invoices(id, status, value, name) Task: Find name from employees where id appears in invoices entries with matching type. SQL:
SELECT name FROM employees AS bev WHERE id IN ( SELECT id FROM invoices AS fal WHERE fal.type = bev.type );
{ "outer_table": "employees", "inner_table": "invoices", "outer_alias": "bev", "inner_alias": "fal", "proj_col": "name", "filter_col": "id", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09490
train
v3
Schema: projects (alias: uliv)(code, date, level, type) items(salary, name, amount, id) Task: Find id from projects where amount exceeds the average value from items for the same type. SQL:
SELECT id FROM projects AS uliv WHERE amount > ( SELECT AVG(value) FROM items AS ikob WHERE ikob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09491
train
v3
Schema: projects (alias: uliv)(type, amount, salary, status) schedules(value, status, date, code) Task: Retrieve value from projects with salary above the AVG(value) of schedules rows sharing the same status. SQL:
SELECT value FROM projects AS uliv WHERE salary > ( SELECT AVG(value) FROM schedules AS vmob WHERE vmob.status = uliv.status );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09492
train
v1
Schema: projects (alias: uliv)(type, name, date, salary) staff(level, value, id, salary) Task: Select name from projects where level exists in staff for the same code. SQL:
SELECT name FROM projects AS uliv WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09493
train
v2
Schema: tasks (alias: znob)(value, amount, code, name) schedules(salary, status, name, code) Task: Retrieve salary from tasks that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = znob.code );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "salary", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09494
train
v1
Schema: items (alias: ikob)(name, status, code, salary) branches(salary, id, amount, value) Task: Select name from items where level exists in branches for the same type. SQL:
SELECT name FROM items AS ikob WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.type = ikob.type );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09495
train
v2
Schema: branches (alias: agov)(salary, date, type, code) transactions(code, status, salary, level) Task: Retrieve id from branches that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = agov.code );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "id", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09496
train
v1
Schema: orders (alias: kab)(type, date, status, salary) sales(amount, id, status, salary) Task: Retrieve code from orders whose status is found in sales rows where code matches the outer record. SQL:
SELECT code FROM orders AS kab WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.code = kab.code );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "code", "filter_col": "status", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09497
train
v2
Schema: schedules (alias: vmob)(amount, level, name, code) items(salary, type, status, value) Task: Find name from schedules where a matching record exists in items with the same status. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "vmob", "inner_alias": "ikob", "proj_col": "name", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09498
train
v2
Schema: departments (alias: dov)(level, salary, type, amount) regions(salary, level, name, id) Task: Retrieve name from departments that have at least one corresponding entry in regions sharing the same status. SQL:
SELECT name FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = dov.status );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dov", "inner_alias": "okiv", "proj_col": "name", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09499
train