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
v2
Schema: employees (alias: bev)(id, salary, type, amount) items(level, id, status, date) Task: Find code from employees where a matching record exists in items with the same status. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = bev.status );
{ "outer_table": "employees", "inner_table": "items", "outer_alias": "bev", "inner_alias": "ikob", "proj_col": "code", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00500
train
v3
Schema: tasks (alias: znob)(status, level, type, date) branches(date, salary, name, value) Task: Retrieve amount from tasks with amount above the SUM(value) of branches rows sharing the same id. SQL:
SELECT amount FROM tasks AS znob WHERE amount > ( SELECT SUM(value) FROM branches AS agov WHERE agov.id = znob.id );
{ "outer_table": "tasks", "inner_table": "branches", "outer_alias": "znob", "inner_alias": "agov", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00501
train
v2
Schema: customers (alias: lex)(amount, salary, name, id) departments(name, value, status, salary) Task: Find code from customers where a matching record exists in departments with the same level. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = lex.level );
{ "outer_table": "customers", "inner_table": "departments", "outer_alias": "lex", "inner_alias": "dov", "proj_col": "code", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00502
train
v2
Schema: shipments (alias: vnob)(name, value, level, date) projects(type, id, level, value) Task: Retrieve amount from shipments that have at least one corresponding entry in projects sharing the same level. SQL:
SELECT amount FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "projects", "outer_alias": "vnob", "inner_alias": "uliv", "proj_col": "amount", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00503
train
v2
Schema: invoices (alias: fal)(type, status, id, value) tasks(name, level, date, salary) Task: Retrieve code from invoices that have at least one corresponding entry in tasks sharing the same type. SQL:
SELECT code FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "tasks", "outer_alias": "fal", "inner_alias": "znob", "proj_col": "code", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00504
train
v3
Schema: requests (alias: ejof)(type, name, code, date) branches(amount, status, level, value) Task: Retrieve code from requests with value above the MIN(value) of branches rows sharing the same level. SQL:
SELECT code FROM requests AS ejof WHERE value > ( SELECT MIN(value) FROM branches AS agov WHERE agov.level = ejof.level );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_00505
train
v2
Schema: projects (alias: uliv)(status, level, value, type) customers(type, status, salary, name) Task: Find id from projects where a matching record exists in customers with the same level. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = uliv.level );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "uliv", "inner_alias": "lex", "proj_col": "id", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_00506
train
v3
Schema: accounts (alias: jac)(amount, name, id, status) managers(salary, name, code, status) Task: Find id from accounts where salary exceeds the count of salary from managers for the same status. SQL:
SELECT id FROM accounts AS jac WHERE salary > ( SELECT COUNT(salary) FROM managers AS hac WHERE hac.status = jac.status );
{ "outer_table": "accounts", "inner_table": "managers", "outer_alias": "jac", "inner_alias": "hac", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00507
train
v3
Schema: regions (alias: okiv)(level, name, value, code) sales(status, value, amount, code) Task: Retrieve code from regions with amount above the MAX(salary) of sales rows sharing the same level. SQL:
SELECT code FROM regions AS okiv WHERE amount > ( SELECT MAX(salary) FROM sales AS cif WHERE cif.level = okiv.level );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00508
train
v1
Schema: regions (alias: okiv)(date, id, salary, level) managers(salary, type, id, name) Task: Find id from regions where id appears in managers entries with matching type. SQL:
SELECT id FROM regions AS okiv WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.type = okiv.type );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "okiv", "inner_alias": "hac", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00509
train
v3
Schema: products (alias: nad)(value, salary, id, status) tasks(salary, status, id, code) Task: Retrieve amount from products with salary above the SUM(amount) of tasks rows sharing the same id. SQL:
SELECT amount FROM products AS nad WHERE salary > ( SELECT SUM(amount) FROM tasks AS znob WHERE znob.id = nad.id );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00510
train
v2
Schema: shipments (alias: vnob)(value, type, id, status) products(salary, name, type, id) Task: Find id from shipments where a matching record exists in products with the same id. SQL:
SELECT id FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "id", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00511
train
v1
Schema: customers (alias: lex)(level, value, type, date) tasks(date, level, amount, type) Task: Select value from customers where status exists in tasks for the same id. SQL:
SELECT value FROM customers AS lex WHERE status IN ( SELECT status FROM tasks AS znob WHERE znob.id = lex.id );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "value", "filter_col": "status", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00512
train
v2
Schema: categories (alias: egiv)(name, value, date, code) schedules(id, name, date, status) Task: Retrieve salary from categories that have at least one corresponding entry in schedules sharing the same level. SQL:
SELECT salary FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.level = egiv.level );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "egiv", "inner_alias": "vmob", "proj_col": "salary", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_00513
train
v1
Schema: projects (alias: uliv)(amount, value, id, name) schedules(type, date, status, level) Task: Find salary from projects where status appears in schedules entries with matching level. SQL:
SELECT salary FROM projects AS uliv WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_00514
train
v3
Schema: orders (alias: kab)(value, date, type, code) branches(name, date, level, status) Task: Find code from orders where value exceeds the minimum value from branches for the same id. SQL:
SELECT code FROM orders AS kab WHERE value > ( SELECT MIN(value) FROM branches AS agov WHERE agov.id = kab.id );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00515
train
v2
Schema: staff (alias: xnob)(code, id, date, value) projects(value, code, type, level) Task: Retrieve code from staff that have at least one corresponding entry in projects sharing the same id. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.id = xnob.id );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "xnob", "inner_alias": "uliv", "proj_col": "code", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00516
train
v1
Schema: managers (alias: hac)(type, name, id, salary) schedules(value, amount, level, date) Task: Select code from managers where status exists in schedules for the same type. SQL:
SELECT code FROM managers AS hac WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.type = hac.type );
{ "outer_table": "managers", "inner_table": "schedules", "outer_alias": "hac", "inner_alias": "vmob", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00517
train
v1
Schema: staff (alias: xnob)(value, amount, level, code) employees(date, amount, type, id) Task: Select salary from staff where code exists in employees for the same level. SQL:
SELECT salary FROM staff AS xnob WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.level = xnob.level );
{ "outer_table": "staff", "inner_table": "employees", "outer_alias": "xnob", "inner_alias": "bev", "proj_col": "salary", "filter_col": "code", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00518
train
v1
Schema: staff (alias: xnob)(salary, status, value, id) regions(code, salary, amount, status) Task: Find name from staff where code appears in regions entries with matching status. SQL:
SELECT name FROM staff AS xnob WHERE code IN ( SELECT code FROM regions AS okiv WHERE okiv.status = xnob.status );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00519
train
v3
Schema: sales (alias: cif)(id, status, amount, level) products(name, type, id, salary) Task: Retrieve id from sales with salary above the MIN(amount) of products rows sharing the same id. SQL:
SELECT id FROM sales AS cif WHERE salary > ( SELECT MIN(amount) FROM products AS nad WHERE nad.id = cif.id );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00520
train
v2
Schema: schedules (alias: vmob)(value, code, id, name) tasks(date, status, id, code) Task: Find amount from schedules where a matching record exists in tasks with the same code. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "amount", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00521
train
v1
Schema: customers (alias: lex)(type, value, salary, code) invoices(id, code, type, amount) Task: Find salary from customers where type appears in invoices entries with matching status. SQL:
SELECT salary FROM customers AS lex WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.status = lex.status );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "lex", "inner_alias": "fal", "proj_col": "salary", "filter_col": "type", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00522
train
v1
Schema: staff (alias: xnob)(date, name, id, salary) employees(name, status, salary, id) Task: Retrieve name from staff whose code is found in employees rows where status matches the outer record. SQL:
SELECT name FROM staff AS xnob WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.status = xnob.status );
{ "outer_table": "staff", "inner_table": "employees", "outer_alias": "xnob", "inner_alias": "bev", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00523
train
v3
Schema: accounts (alias: jac)(amount, code, status, value) invoices(level, type, date, id) Task: Retrieve salary from accounts with salary above the AVG(amount) of invoices rows sharing the same code. SQL:
SELECT salary FROM accounts AS jac WHERE salary > ( SELECT AVG(amount) FROM invoices AS fal WHERE fal.code = jac.code );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00524
train
v3
Schema: orders (alias: kab)(status, name, salary, amount) sales(status, id, value, level) Task: Retrieve name from orders with salary above the MAX(amount) of sales rows sharing the same status. SQL:
SELECT name FROM orders AS kab WHERE salary > ( SELECT MAX(amount) FROM sales AS cif WHERE cif.status = kab.status );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00525
train
v1
Schema: branches (alias: agov)(salary, status, code, id) departments(salary, value, date, type) Task: Find id from branches where type appears in departments entries with matching id. SQL:
SELECT id FROM branches AS agov WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.id = agov.id );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "id", "filter_col": "type", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_00526
train
v3
Schema: sales (alias: cif)(type, value, code, amount) transactions(code, type, amount, date) Task: Find code from sales where salary exceeds the count of value from transactions for the same level. SQL:
SELECT code FROM sales AS cif WHERE salary > ( SELECT COUNT(value) FROM transactions AS gev WHERE gev.level = cif.level );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00527
train
v1
Schema: regions (alias: okiv)(type, level, id, salary) accounts(salary, code, type, date) Task: Select value from regions where id exists in accounts for the same level. SQL:
SELECT value FROM regions AS okiv WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.level = okiv.level );
{ "outer_table": "regions", "inner_table": "accounts", "outer_alias": "okiv", "inner_alias": "jac", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00528
train
v1
Schema: tasks (alias: znob)(status, amount, date, level) managers(code, amount, name, id) Task: Retrieve name from tasks whose id is found in managers rows where id matches the outer record. SQL:
SELECT name FROM tasks AS znob WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.id = znob.id );
{ "outer_table": "tasks", "inner_table": "managers", "outer_alias": "znob", "inner_alias": "hac", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00529
train
v2
Schema: orders (alias: kab)(name, type, amount, date) branches(status, amount, value, date) Task: Find code from orders where a matching record exists in branches with the same level. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.level = kab.level );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "code", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00530
train
v3
Schema: orders (alias: kab)(id, status, code, name) managers(date, value, level, name) Task: Find salary from orders where value exceeds the minimum amount from managers for the same code. SQL:
SELECT salary FROM orders AS kab WHERE value > ( SELECT MIN(amount) FROM managers AS hac WHERE hac.code = kab.code );
{ "outer_table": "orders", "inner_table": "managers", "outer_alias": "kab", "inner_alias": "hac", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00531
train
v2
Schema: categories (alias: egiv)(id, name, value, level) products(level, type, value, salary) Task: Retrieve salary from categories that have at least one corresponding entry in products sharing the same id. SQL:
SELECT salary FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.id = egiv.id );
{ "outer_table": "categories", "inner_table": "products", "outer_alias": "egiv", "inner_alias": "nad", "proj_col": "salary", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_00532
train
v1
Schema: schedules (alias: vmob)(amount, type, id, value) shipments(type, amount, status, salary) Task: Select code from schedules where type exists in shipments for the same code. SQL:
SELECT code FROM schedules AS vmob WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "shipments", "outer_alias": "vmob", "inner_alias": "vnob", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00533
train
v2
Schema: shipments (alias: vnob)(name, code, value, salary) schedules(code, name, level, id) Task: Retrieve code from shipments that have at least one corresponding entry in schedules sharing the same level. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "code", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00534
train
v2
Schema: tasks (alias: znob)(salary, name, date, type) accounts(value, level, date, id) Task: Retrieve name from tasks that have at least one corresponding entry in accounts sharing the same type. SQL:
SELECT name FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = znob.type );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "name", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00535
train
v2
Schema: regions (alias: okiv)(salary, id, value, level) schedules(date, status, value, id) Task: Find value from regions where a matching record exists in schedules with the same status. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = okiv.status );
{ "outer_table": "regions", "inner_table": "schedules", "outer_alias": "okiv", "inner_alias": "vmob", "proj_col": "value", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00536
train
v1
Schema: products (alias: nad)(amount, date, status, code) schedules(name, id, value, date) Task: Find amount from products where code appears in schedules entries with matching level. SQL:
SELECT amount FROM products AS nad WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.level = nad.level );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "code", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00537
train
v2
Schema: schedules (alias: vmob)(salary, amount, name, code) requests(date, amount, value, level) Task: Find salary from schedules where a matching record exists in requests with the same type. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "requests", "outer_alias": "vmob", "inner_alias": "ejof", "proj_col": "salary", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00538
train
v3
Schema: regions (alias: okiv)(date, amount, name, status) branches(amount, code, status, level) Task: Retrieve name from regions with salary above the AVG(salary) of branches rows sharing the same code. SQL:
SELECT name FROM regions AS okiv WHERE salary > ( SELECT AVG(salary) FROM branches AS agov WHERE agov.code = okiv.code );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "okiv", "inner_alias": "agov", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00539
train
v1
Schema: departments (alias: dov)(amount, value, id, type) accounts(amount, code, value, date) Task: Retrieve amount from departments whose level is found in accounts rows where code matches the outer record. SQL:
SELECT amount FROM departments AS dov WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.code = dov.code );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00540
train
v2
Schema: projects (alias: uliv)(date, amount, value, status) orders(status, level, id, value) Task: Find name from projects where a matching record exists in orders with the same id. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = uliv.id );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "name", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_00541
train
v1
Schema: accounts (alias: jac)(type, code, amount, status) regions(type, level, code, status) Task: Find amount from accounts where level appears in regions entries with matching id. SQL:
SELECT amount FROM accounts AS jac WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.id = jac.id );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00542
train
v1
Schema: customers (alias: lex)(salary, name, level, type) categories(name, status, level, id) Task: Find name from customers where code appears in categories entries with matching code. SQL:
SELECT name FROM customers AS lex WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.code = lex.code );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00543
train
v2
Schema: schedules (alias: vmob)(date, value, code, level) tasks(salary, date, id, code) Task: Retrieve code from schedules that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "code", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00544
train
v3
Schema: requests (alias: ejof)(level, name, value, date) staff(salary, amount, name, date) Task: Retrieve salary from requests with amount above the MAX(salary) of staff rows sharing the same type. SQL:
SELECT salary FROM requests AS ejof WHERE amount > ( SELECT MAX(salary) FROM staff AS xnob WHERE xnob.type = ejof.type );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ejof", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_00545
train
v3
Schema: branches (alias: agov)(value, amount, name, salary) staff(amount, type, date, id) Task: Retrieve amount from branches with value above the AVG(salary) of staff rows sharing the same type. SQL:
SELECT amount FROM branches AS agov WHERE value > ( SELECT AVG(salary) FROM staff AS xnob WHERE xnob.type = agov.type );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_00546
train
v3
Schema: items (alias: ikob)(level, salary, value, code) tasks(salary, id, amount, name) Task: Retrieve value from items with amount above the SUM(salary) of tasks rows sharing the same code. SQL:
SELECT value FROM items AS ikob WHERE amount > ( SELECT SUM(salary) FROM tasks AS znob WHERE znob.code = ikob.code );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00547
train
v3
Schema: schedules (alias: vmob)(id, status, level, code) staff(status, level, type, salary) Task: Find code from schedules where value exceeds the average amount from staff for the same code. SQL:
SELECT code FROM schedules AS vmob WHERE value > ( SELECT AVG(amount) FROM staff AS xnob WHERE xnob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00548
train
v2
Schema: customers (alias: lex)(value, salary, status, id) tasks(date, salary, amount, id) Task: Retrieve id from customers that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = lex.status );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "id", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00549
train
v2
Schema: items (alias: ikob)(code, id, name, level) transactions(amount, salary, id, status) Task: Find amount from items where a matching record exists in transactions with the same id. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = ikob.id );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "ikob", "inner_alias": "gev", "proj_col": "amount", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00550
train
v3
Schema: employees (alias: bev)(amount, name, level, id) managers(date, value, name, amount) Task: Retrieve value from employees with salary above the SUM(value) of managers rows sharing the same type. SQL:
SELECT value FROM employees AS bev WHERE salary > ( SELECT SUM(value) FROM managers AS hac WHERE hac.type = bev.type );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "bev", "inner_alias": "hac", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00551
train
v3
Schema: schedules (alias: vmob)(amount, salary, status, id) transactions(value, type, amount, code) Task: Find amount from schedules where amount exceeds the average value from transactions for the same level. SQL:
SELECT amount FROM schedules AS vmob WHERE amount > ( SELECT AVG(value) FROM transactions AS gev WHERE gev.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "transactions", "outer_alias": "vmob", "inner_alias": "gev", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00552
train
v3
Schema: accounts (alias: jac)(amount, salary, status, name) departments(salary, name, type, value) Task: Retrieve salary from accounts with amount above the MIN(amount) of departments rows sharing the same code. SQL:
SELECT salary FROM accounts AS jac WHERE amount > ( SELECT MIN(amount) FROM departments AS dov WHERE dov.code = jac.code );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00553
train
v1
Schema: projects (alias: uliv)(level, status, amount, name) departments(name, value, status, salary) Task: Select amount from projects where level exists in departments for the same type. SQL:
SELECT amount FROM projects AS uliv WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.type = uliv.type );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "uliv", "inner_alias": "dov", "proj_col": "amount", "filter_col": "level", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_00554
train
v1
Schema: customers (alias: lex)(type, status, level, name) shipments(type, date, value, id) Task: Select id from customers where id exists in shipments for the same code. SQL:
SELECT id FROM customers AS lex WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.code = lex.code );
{ "outer_table": "customers", "inner_table": "shipments", "outer_alias": "lex", "inner_alias": "vnob", "proj_col": "id", "filter_col": "id", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00555
train
v3
Schema: accounts (alias: jac)(id, value, status, type) shipments(salary, level, amount, value) Task: Find value from accounts where salary exceeds the total salary from shipments for the same code. SQL:
SELECT value FROM accounts AS jac WHERE salary > ( SELECT SUM(salary) FROM shipments AS vnob WHERE vnob.code = jac.code );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00556
train
v2
Schema: departments (alias: dov)(type, level, salary, amount) accounts(id, type, date, status) Task: Find code from departments where a matching record exists in accounts with the same status. SQL:
SELECT code FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = dov.status );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "code", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00557
train
v2
Schema: products (alias: nad)(salary, code, id, name) customers(salary, id, status, name) Task: Find amount from products where a matching record exists in customers with the same level. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = nad.level );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "amount", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00558
train
v3
Schema: transactions (alias: gev)(code, id, level, value) projects(salary, status, level, id) Task: Retrieve salary from transactions with amount above the COUNT(value) of projects rows sharing the same code. SQL:
SELECT salary FROM transactions AS gev WHERE amount > ( SELECT COUNT(value) FROM projects AS uliv WHERE uliv.code = gev.code );
{ "outer_table": "transactions", "inner_table": "projects", "outer_alias": "gev", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00559
train
v3
Schema: regions (alias: okiv)(value, level, status, date) branches(type, level, id, date) Task: Retrieve id from regions with value above the COUNT(salary) of branches rows sharing the same level. SQL:
SELECT id FROM regions AS okiv WHERE value > ( SELECT COUNT(salary) FROM branches AS agov WHERE agov.level = okiv.level );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "okiv", "inner_alias": "agov", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00560
train
v2
Schema: schedules (alias: vmob)(id, code, salary, name) products(salary, date, value, name) Task: Find id from schedules where a matching record exists in products with the same type. SQL:
SELECT id 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": "id", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00561
train
v1
Schema: items (alias: ikob)(code, date, salary, status) projects(salary, date, amount, status) Task: Retrieve salary from items whose status is found in projects rows where id matches the outer record. SQL:
SELECT salary FROM items AS ikob WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.id = ikob.id );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00562
train
v2
Schema: sales (alias: cif)(id, status, type, level) branches(amount, code, name, date) Task: Find name from sales where a matching record exists in branches with the same id. SQL:
SELECT name FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = cif.id );
{ "outer_table": "sales", "inner_table": "branches", "outer_alias": "cif", "inner_alias": "agov", "proj_col": "name", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00563
train
v1
Schema: projects (alias: uliv)(name, level, date, type) customers(salary, status, level, amount) Task: Select name from projects where type exists in customers for the same code. SQL:
SELECT name FROM projects AS uliv WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.code = uliv.code );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "uliv", "inner_alias": "lex", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_00564
train
v3
Schema: regions (alias: okiv)(id, name, status, level) requests(name, type, date, level) Task: Retrieve name from regions with salary above the MAX(amount) of requests rows sharing the same code. SQL:
SELECT name FROM regions AS okiv WHERE salary > ( SELECT MAX(amount) FROM requests AS ejof WHERE ejof.code = okiv.code );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00565
train
v3
Schema: projects (alias: uliv)(value, id, date, type) products(date, id, status, type) Task: Find salary from projects where value exceeds the total value from products for the same level. SQL:
SELECT salary FROM projects AS uliv WHERE value > ( SELECT SUM(value) FROM products AS nad WHERE nad.level = uliv.level );
{ "outer_table": "projects", "inner_table": "products", "outer_alias": "uliv", "inner_alias": "nad", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_00566
train
v1
Schema: invoices (alias: fal)(type, value, name, date) sales(value, date, code, amount) Task: Retrieve salary from invoices whose status is found in sales rows where id matches the outer record. SQL:
SELECT salary FROM invoices AS fal WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.id = fal.id );
{ "outer_table": "invoices", "inner_table": "sales", "outer_alias": "fal", "inner_alias": "cif", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00567
train
v1
Schema: shipments (alias: vnob)(value, salary, code, name) schedules(amount, status, level, name) Task: Find amount from shipments where status appears in schedules entries with matching level. SQL:
SELECT amount FROM shipments AS vnob WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00568
train
v1
Schema: staff (alias: xnob)(code, type, name, value) shipments(code, salary, type, value) Task: Select name from staff where id exists in shipments for the same status. SQL:
SELECT name FROM staff AS xnob WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00569
train
v2
Schema: tasks (alias: znob)(name, type, salary, date) items(value, id, name, salary) Task: Find salary from tasks where a matching record exists in items with the same code. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = znob.code );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "salary", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00570
train
v2
Schema: sales (alias: cif)(level, amount, type, value) schedules(type, code, salary, name) Task: Find name from sales where a matching record exists in schedules with the same status. SQL:
SELECT name 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": "name", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00571
train
v3
Schema: accounts (alias: jac)(name, level, code, salary) customers(value, amount, id, type) Task: Retrieve code from accounts with amount above the COUNT(amount) of customers rows sharing the same level. SQL:
SELECT code FROM accounts AS jac WHERE amount > ( SELECT COUNT(amount) FROM customers AS lex WHERE lex.level = jac.level );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00572
train
v2
Schema: transactions (alias: gev)(salary, value, name, status) invoices(name, id, level, code) Task: Find value from transactions where a matching record exists in invoices with the same level. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = gev.level );
{ "outer_table": "transactions", "inner_table": "invoices", "outer_alias": "gev", "inner_alias": "fal", "proj_col": "value", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00573
train
v1
Schema: employees (alias: bev)(id, value, salary, date) shipments(amount, code, salary, level) Task: Retrieve name from employees whose status is found in shipments rows where status matches the outer record. SQL:
SELECT name FROM employees AS bev WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.status = bev.status );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00574
train
v2
Schema: schedules (alias: vmob)(salary, value, level, date) products(id, type, level, amount) Task: Retrieve id from schedules that have at least one corresponding entry in products sharing the same status. SQL:
SELECT id FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "id", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00575
train
v3
Schema: employees (alias: bev)(id, date, name, amount) requests(type, salary, name, date) Task: Find name from employees where amount exceeds the average value from requests for the same id. SQL:
SELECT name FROM employees AS bev WHERE amount > ( SELECT AVG(value) FROM requests AS ejof WHERE ejof.id = bev.id );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00576
train
v2
Schema: regions (alias: okiv)(type, id, status, name) sales(salary, name, id, level) Task: Retrieve code from regions that have at least one corresponding entry in sales sharing the same level. SQL:
SELECT code FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = okiv.level );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "code", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00577
train
v1
Schema: requests (alias: ejof)(type, code, date, level) projects(amount, level, id, code) Task: Find name from requests where code appears in projects entries with matching id. SQL:
SELECT name FROM requests AS ejof WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.id = ejof.id );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_00578
train
v3
Schema: branches (alias: agov)(name, code, value, salary) regions(name, level, id, date) Task: Retrieve name from branches with salary above the MAX(value) of regions rows sharing the same type. SQL:
SELECT name FROM branches AS agov WHERE salary > ( SELECT MAX(value) FROM regions AS okiv WHERE okiv.type = agov.type );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_00579
train
v1
Schema: customers (alias: lex)(id, level, value, name) departments(status, level, id, date) Task: Select id from customers where status exists in departments for the same status. SQL:
SELECT id FROM customers AS lex WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.status = lex.status );
{ "outer_table": "customers", "inner_table": "departments", "outer_alias": "lex", "inner_alias": "dov", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00580
train
v3
Schema: departments (alias: dov)(value, status, level, id) sales(id, amount, level, status) Task: Retrieve id from departments with salary above the AVG(salary) of sales rows sharing the same type. SQL:
SELECT id FROM departments AS dov WHERE salary > ( SELECT AVG(salary) FROM sales AS cif WHERE cif.type = dov.type );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00581
train
v3
Schema: customers (alias: lex)(level, amount, date, id) staff(type, salary, code, status) Task: Retrieve salary from customers with salary above the SUM(amount) of staff rows sharing the same level. SQL:
SELECT salary FROM customers AS lex WHERE salary > ( SELECT SUM(amount) FROM staff AS xnob WHERE xnob.level = lex.level );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00582
train
v1
Schema: requests (alias: ejof)(salary, name, date, id) managers(id, type, name, code) Task: Retrieve code from requests whose code is found in managers rows where status matches the outer record. SQL:
SELECT code FROM requests AS ejof WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.status = ejof.status );
{ "outer_table": "requests", "inner_table": "managers", "outer_alias": "ejof", "inner_alias": "hac", "proj_col": "code", "filter_col": "code", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_00583
train
v1
Schema: tasks (alias: znob)(value, code, name, salary) shipments(status, amount, salary, date) Task: Find id from tasks where id appears in shipments entries with matching type. SQL:
SELECT id FROM tasks AS znob WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.type = znob.type );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00584
train
v3
Schema: items (alias: ikob)(code, name, salary, amount) accounts(level, name, id, type) Task: Retrieve value from items with value above the AVG(amount) of accounts rows sharing the same level. SQL:
SELECT value FROM items AS ikob WHERE value > ( SELECT AVG(amount) FROM accounts AS jac WHERE jac.level = ikob.level );
{ "outer_table": "items", "inner_table": "accounts", "outer_alias": "ikob", "inner_alias": "jac", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00585
train
v1
Schema: projects (alias: uliv)(amount, code, status, salary) shipments(amount, value, name, id) Task: Select value from projects where status exists in shipments for the same level. SQL:
SELECT value FROM projects AS uliv WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "shipments", "outer_alias": "uliv", "inner_alias": "vnob", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_00586
train
v1
Schema: products (alias: nad)(salary, amount, type, status) schedules(amount, value, type, salary) Task: Select name from products where status exists in schedules for the same code. SQL:
SELECT name FROM products AS nad WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.code = nad.code );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00587
train
v1
Schema: accounts (alias: jac)(amount, type, code, salary) sales(name, amount, status, code) Task: Retrieve salary from accounts whose level is found in sales rows where id matches the outer record. SQL:
SELECT salary FROM accounts AS jac WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.id = jac.id );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00588
train
v1
Schema: tasks (alias: znob)(code, id, value, date) schedules(id, value, code, type) Task: Retrieve amount from tasks whose code is found in schedules rows where level matches the outer record. SQL:
SELECT amount FROM tasks AS znob WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.level = znob.level );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "code", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00589
train
v2
Schema: departments (alias: dov)(type, value, date, amount) accounts(id, value, level, status) Task: Retrieve amount from departments that have at least one corresponding entry in accounts sharing the same id. SQL:
SELECT amount FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = dov.id );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "amount", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00590
train
v3
Schema: items (alias: ikob)(status, value, date, code) projects(salary, status, amount, type) Task: Find code from items where salary exceeds the total value from projects for the same status. SQL:
SELECT code FROM items AS ikob WHERE salary > ( SELECT SUM(value) FROM projects AS uliv WHERE uliv.status = ikob.status );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00591
train
v2
Schema: employees (alias: bev)(date, name, amount, status) branches(level, status, value, amount) Task: Retrieve amount from employees that have at least one corresponding entry in branches sharing the same id. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = bev.id );
{ "outer_table": "employees", "inner_table": "branches", "outer_alias": "bev", "inner_alias": "agov", "proj_col": "amount", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00592
train
v3
Schema: shipments (alias: vnob)(id, value, code, name) departments(salary, value, status, amount) Task: Find code from shipments where salary exceeds the maximum salary from departments for the same id. SQL:
SELECT code FROM shipments AS vnob WHERE salary > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00593
train
v2
Schema: items (alias: ikob)(code, status, date, salary) departments(level, salary, type, id) Task: Retrieve value from items that have at least one corresponding entry in departments sharing the same id. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = ikob.id );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "ikob", "inner_alias": "dov", "proj_col": "value", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00594
train
v1
Schema: transactions (alias: gev)(value, level, status, salary) regions(status, date, salary, type) Task: Select id from transactions where level exists in regions for the same code. SQL:
SELECT id FROM transactions AS gev WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.code = gev.code );
{ "outer_table": "transactions", "inner_table": "regions", "outer_alias": "gev", "inner_alias": "okiv", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00595
train
v1
Schema: sales (alias: cif)(level, status, code, salary) managers(name, level, date, value) Task: Find name from sales where code appears in managers entries with matching status. SQL:
SELECT name FROM sales AS cif WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.status = cif.status );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "cif", "inner_alias": "hac", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00596
train
v1
Schema: accounts (alias: jac)(level, code, salary, status) categories(level, id, status, name) Task: Retrieve salary from accounts whose type is found in categories rows where type matches the outer record. SQL:
SELECT salary FROM accounts AS jac WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.type = jac.type );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "jac", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00597
train
v2
Schema: employees (alias: bev)(type, date, value, status) projects(status, code, name, value) Task: Retrieve id from employees that have at least one corresponding entry in projects sharing the same type. SQL:
SELECT id FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = bev.type );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "id", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00598
train
v1
Schema: staff (alias: xnob)(amount, code, status, date) items(id, value, salary, type) Task: Retrieve name from staff whose id is found in items rows where id matches the outer record. SQL:
SELECT name FROM staff AS xnob WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.id = xnob.id );
{ "outer_table": "staff", "inner_table": "items", "outer_alias": "xnob", "inner_alias": "ikob", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00599
train