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: items (alias: ikob)(amount, salary, type, id) projects(level, id, salary, type) Task: Find name from items where amount exceeds the minimum value from projects for the same level. SQL:
SELECT name FROM items AS ikob WHERE amount > ( SELECT MIN(value) FROM projects AS uliv WHERE uliv.level = ikob.level );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07500
train
v1
Schema: shipments (alias: vnob)(status, type, date, level) requests(code, name, id, type) Task: Retrieve amount from shipments whose id is found in requests rows where code matches the outer record. SQL:
SELECT amount FROM shipments AS vnob WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "requests", "outer_alias": "vnob", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07501
train
v3
Schema: staff (alias: xnob)(type, code, id, name) invoices(level, date, id, salary) Task: Find code from staff where salary exceeds the minimum amount from invoices for the same status. SQL:
SELECT code FROM staff AS xnob WHERE salary > ( SELECT MIN(amount) FROM invoices AS fal WHERE fal.status = xnob.status );
{ "outer_table": "staff", "inner_table": "invoices", "outer_alias": "xnob", "inner_alias": "fal", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07502
train
v3
Schema: items (alias: ikob)(type, salary, level, name) requests(date, name, status, value) Task: Retrieve amount from items with salary above the COUNT(amount) of requests rows sharing the same id. SQL:
SELECT amount FROM items AS ikob WHERE salary > ( SELECT COUNT(amount) FROM requests AS ejof WHERE ejof.id = ikob.id );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "ikob", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07503
train
v2
Schema: transactions (alias: gev)(id, value, status, code) managers(salary, amount, code, type) Task: Find code from transactions where a matching record exists in managers with the same level. SQL:
SELECT code FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = gev.level );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "gev", "inner_alias": "hac", "proj_col": "code", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07504
train
v1
Schema: managers (alias: hac)(level, id, type, salary) departments(name, level, amount, id) Task: Retrieve name from managers whose code is found in departments rows where id matches the outer record. SQL:
SELECT name FROM managers AS hac WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.id = hac.id );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07505
train
v2
Schema: accounts (alias: jac)(level, value, name, amount) departments(level, code, salary, value) Task: Find name from accounts where a matching record exists in departments with the same type. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = jac.type );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "name", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07506
train
v3
Schema: products (alias: nad)(date, id, amount, salary) employees(id, salary, level, date) Task: Find value from products where value exceeds the average value from employees for the same code. SQL:
SELECT value FROM products AS nad WHERE value > ( SELECT AVG(value) FROM employees AS bev WHERE bev.code = nad.code );
{ "outer_table": "products", "inner_table": "employees", "outer_alias": "nad", "inner_alias": "bev", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07507
train
v3
Schema: regions (alias: okiv)(level, value, salary, status) requests(name, salary, status, id) Task: Find salary from regions where value exceeds the minimum amount from requests for the same level. SQL:
SELECT salary FROM regions AS okiv WHERE value > ( SELECT MIN(amount) FROM requests AS ejof WHERE ejof.level = okiv.level );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07508
train
v2
Schema: categories (alias: egiv)(value, code, amount, salary) requests(code, value, level, salary) Task: Find amount from categories where a matching record exists in requests with the same type. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.type = egiv.type );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "egiv", "inner_alias": "ejof", "proj_col": "amount", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07509
train
v1
Schema: customers (alias: lex)(code, status, level, amount) orders(salary, level, code, value) Task: Select code from customers where id exists in orders for the same id. SQL:
SELECT code FROM customers AS lex WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.id = lex.id );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "lex", "inner_alias": "kab", "proj_col": "code", "filter_col": "id", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07510
train
v3
Schema: staff (alias: xnob)(amount, code, value, salary) regions(code, level, amount, name) Task: Find salary from staff where value exceeds the maximum value from regions for the same code. SQL:
SELECT salary FROM staff AS xnob WHERE value > ( SELECT MAX(value) FROM regions AS okiv WHERE okiv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07511
train
v2
Schema: items (alias: ikob)(id, status, type, amount) projects(status, amount, salary, type) Task: Find value from items where a matching record exists in projects with the same code. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = ikob.code );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "value", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07512
train
v1
Schema: sales (alias: cif)(code, level, name, status) shipments(type, amount, date, value) Task: Select salary from sales where id exists in shipments for the same code. SQL:
SELECT salary FROM sales AS cif WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.code = cif.code );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "id", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07513
train
v2
Schema: customers (alias: lex)(name, date, salary, value) employees(date, value, level, status) Task: Retrieve name from customers that have at least one corresponding entry in employees sharing the same level. SQL:
SELECT name FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = lex.level );
{ "outer_table": "customers", "inner_table": "employees", "outer_alias": "lex", "inner_alias": "bev", "proj_col": "name", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07514
train
v2
Schema: accounts (alias: jac)(value, name, status, salary) requests(type, salary, amount, level) Task: Retrieve amount from accounts that have at least one corresponding entry in requests sharing the same id. SQL:
SELECT amount FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = jac.id );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "jac", "inner_alias": "ejof", "proj_col": "amount", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07515
train
v1
Schema: regions (alias: okiv)(id, name, salary, amount) tasks(level, status, code, date) Task: Select salary from regions where type exists in tasks for the same status. SQL:
SELECT salary FROM regions AS okiv WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.status = okiv.status );
{ "outer_table": "regions", "inner_table": "tasks", "outer_alias": "okiv", "inner_alias": "znob", "proj_col": "salary", "filter_col": "type", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07516
train
v3
Schema: managers (alias: hac)(level, type, amount, status) departments(code, status, name, value) Task: Retrieve id from managers with value above the MIN(salary) of departments rows sharing the same type. SQL:
SELECT id FROM managers AS hac WHERE value > ( SELECT MIN(salary) FROM departments AS dov WHERE dov.type = hac.type );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07517
train
v3
Schema: orders (alias: kab)(value, id, salary, date) tasks(date, level, id, value) Task: Find name from orders where salary exceeds the minimum value from tasks for the same id. SQL:
SELECT name FROM orders AS kab WHERE salary > ( SELECT MIN(value) FROM tasks AS znob WHERE znob.id = kab.id );
{ "outer_table": "orders", "inner_table": "tasks", "outer_alias": "kab", "inner_alias": "znob", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07518
train
v1
Schema: schedules (alias: vmob)(level, name, id, status) managers(code, id, amount, value) Task: Find value from schedules where status appears in managers entries with matching id. SQL:
SELECT value FROM schedules AS vmob WHERE status IN ( SELECT status FROM managers AS hac WHERE hac.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "value", "filter_col": "status", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07519
train
v3
Schema: employees (alias: bev)(name, date, status, salary) shipments(amount, date, salary, level) Task: Retrieve id from employees with salary above the SUM(amount) of shipments rows sharing the same level. SQL:
SELECT id FROM employees AS bev WHERE salary > ( SELECT SUM(amount) FROM shipments AS vnob WHERE vnob.level = bev.level );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07520
train
v3
Schema: branches (alias: agov)(salary, value, date, type) regions(code, level, id, salary) Task: Retrieve value from branches with salary above the AVG(value) of regions rows sharing the same id. SQL:
SELECT value FROM branches AS agov WHERE salary > ( SELECT AVG(value) FROM regions AS okiv WHERE okiv.id = agov.id );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07521
train
v2
Schema: departments (alias: dov)(type, level, salary, value) schedules(status, date, amount, level) Task: Find salary from departments where a matching record exists in schedules with the same code. SQL:
SELECT salary FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = dov.code );
{ "outer_table": "departments", "inner_table": "schedules", "outer_alias": "dov", "inner_alias": "vmob", "proj_col": "salary", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07522
train
v2
Schema: tasks (alias: znob)(name, status, date, code) accounts(name, date, value, level) Task: Retrieve amount from tasks that have at least one corresponding entry in accounts sharing the same id. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = znob.id );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "amount", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07523
train
v1
Schema: categories (alias: egiv)(id, type, date, status) transactions(status, level, name, date) Task: Retrieve name from categories whose code is found in transactions rows where level matches the outer record. SQL:
SELECT name FROM categories AS egiv WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.level = egiv.level );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "egiv", "inner_alias": "gev", "proj_col": "name", "filter_col": "code", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07524
train
v1
Schema: transactions (alias: gev)(value, amount, date, name) requests(code, level, name, value) Task: Find id from transactions where status appears in requests entries with matching type. SQL:
SELECT id FROM transactions AS gev WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.type = gev.type );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07525
train
v1
Schema: departments (alias: dov)(name, type, date, amount) managers(id, level, code, value) Task: Select name from departments where level exists in managers for the same status. SQL:
SELECT name FROM departments AS dov WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.status = dov.status );
{ "outer_table": "departments", "inner_table": "managers", "outer_alias": "dov", "inner_alias": "hac", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07526
train
v2
Schema: customers (alias: lex)(name, salary, amount, value) accounts(level, date, value, status) Task: Retrieve value from customers that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT value FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = lex.code );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "lex", "inner_alias": "jac", "proj_col": "value", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07527
train
v1
Schema: customers (alias: lex)(type, level, value, date) staff(value, code, amount, status) Task: Retrieve value from customers whose id is found in staff rows where status matches the outer record. SQL:
SELECT value FROM customers AS lex WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.status = lex.status );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "value", "filter_col": "id", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07528
train
v3
Schema: employees (alias: bev)(name, level, type, date) products(status, type, code, id) Task: Retrieve name from employees with salary above the SUM(value) of products rows sharing the same type. SQL:
SELECT name FROM employees AS bev WHERE salary > ( SELECT SUM(value) FROM products AS nad WHERE nad.type = bev.type );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "name", "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_07529
train
v1
Schema: categories (alias: egiv)(salary, value, code, amount) departments(type, name, status, level) Task: Select value from categories where level exists in departments for the same status. SQL:
SELECT value FROM categories AS egiv WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.status = egiv.status );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07530
train
v3
Schema: orders (alias: kab)(level, salary, name, value) categories(date, status, type, amount) Task: Find value from orders where value exceeds the count of salary from categories for the same type. SQL:
SELECT value FROM orders AS kab WHERE value > ( SELECT COUNT(salary) FROM categories AS egiv WHERE egiv.type = kab.type );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07531
train
v2
Schema: departments (alias: dov)(amount, code, date, salary) regions(id, salary, status, value) Task: Find id from departments where a matching record exists in regions with the same level. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = dov.level );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dov", "inner_alias": "okiv", "proj_col": "id", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07532
train
v3
Schema: branches (alias: agov)(status, id, type, name) schedules(code, type, id, amount) Task: Find id from branches where value exceeds the average amount from schedules for the same type. SQL:
SELECT id FROM branches AS agov WHERE value > ( SELECT AVG(amount) FROM schedules AS vmob WHERE vmob.type = agov.type );
{ "outer_table": "branches", "inner_table": "schedules", "outer_alias": "agov", "inner_alias": "vmob", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07533
train
v3
Schema: tasks (alias: znob)(code, type, level, salary) staff(salary, name, level, date) Task: Find code from tasks where amount exceeds the maximum amount from staff for the same status. SQL:
SELECT code FROM tasks AS znob WHERE amount > ( SELECT MAX(amount) FROM staff AS xnob WHERE xnob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07534
train
v3
Schema: sales (alias: cif)(status, value, name, id) products(type, id, name, date) Task: Retrieve code from sales with amount above the MIN(salary) of products rows sharing the same code. SQL:
SELECT code FROM sales AS cif WHERE amount > ( SELECT MIN(salary) FROM products AS nad WHERE nad.code = cif.code );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07535
train
v2
Schema: items (alias: ikob)(status, salary, type, id) employees(date, status, salary, name) Task: Retrieve code from items that have at least one corresponding entry in employees sharing the same status. SQL:
SELECT code FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = ikob.status );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "code", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07536
train
v1
Schema: branches (alias: agov)(level, id, salary, date) shipments(level, amount, type, salary) Task: Find value from branches where type appears in shipments entries with matching level. SQL:
SELECT value FROM branches AS agov WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.level = agov.level );
{ "outer_table": "branches", "inner_table": "shipments", "outer_alias": "agov", "inner_alias": "vnob", "proj_col": "value", "filter_col": "type", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07537
train
v3
Schema: customers (alias: lex)(type, level, amount, salary) orders(date, type, status, salary) Task: Retrieve code from customers with value above the MIN(amount) of orders rows sharing the same type. SQL:
SELECT code FROM customers AS lex WHERE value > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.type = lex.type );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "lex", "inner_alias": "kab", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07538
train
v3
Schema: requests (alias: ejof)(id, date, name, code) sales(date, id, salary, status) Task: Retrieve salary from requests with value above the AVG(value) of sales rows sharing the same id. SQL:
SELECT salary FROM requests AS ejof WHERE value > ( SELECT AVG(value) FROM sales AS cif WHERE cif.id = ejof.id );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07539
train
v3
Schema: projects (alias: uliv)(status, code, value, salary) categories(level, date, type, name) Task: Find name from projects where value exceeds the maximum value from categories for the same id. SQL:
SELECT name FROM projects AS uliv WHERE value > ( SELECT MAX(value) FROM categories AS egiv WHERE egiv.id = uliv.id );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07540
train
v1
Schema: items (alias: ikob)(name, id, code, amount) staff(level, date, id, code) Task: Retrieve salary from items whose id is found in staff rows where type matches the outer record. SQL:
SELECT salary FROM items AS ikob WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.type = ikob.type );
{ "outer_table": "items", "inner_table": "staff", "outer_alias": "ikob", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "id", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07541
train
v2
Schema: staff (alias: xnob)(id, type, value, code) sales(status, type, date, salary) Task: Retrieve name from staff that have at least one corresponding entry in sales sharing the same type. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = xnob.type );
{ "outer_table": "staff", "inner_table": "sales", "outer_alias": "xnob", "inner_alias": "cif", "proj_col": "name", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07542
train
v3
Schema: regions (alias: okiv)(id, value, status, date) customers(type, name, code, value) Task: Find id from regions where amount exceeds the minimum salary from customers for the same type. SQL:
SELECT id FROM regions AS okiv WHERE amount > ( SELECT MIN(salary) FROM customers AS lex WHERE lex.type = okiv.type );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07543
train
v2
Schema: orders (alias: kab)(value, type, amount, status) sales(id, value, amount, salary) Task: Find value from orders where a matching record exists in sales with the same id. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = kab.id );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "value", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07544
train
v3
Schema: departments (alias: dov)(id, status, level, code) customers(name, date, code, status) Task: Retrieve salary from departments with amount above the MAX(value) of customers rows sharing the same type. SQL:
SELECT salary FROM departments AS dov WHERE amount > ( SELECT MAX(value) FROM customers AS lex WHERE lex.type = dov.type );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07545
train
v3
Schema: shipments (alias: vnob)(amount, status, salary, value) accounts(value, date, code, amount) Task: Find id from shipments where salary exceeds the minimum value from accounts for the same id. SQL:
SELECT id FROM shipments AS vnob WHERE salary > ( SELECT MIN(value) FROM accounts AS jac WHERE jac.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "accounts", "outer_alias": "vnob", "inner_alias": "jac", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07546
train
v1
Schema: items (alias: ikob)(level, status, name, id) accounts(level, type, amount, name) Task: Find code from items where status appears in accounts entries with matching type. SQL:
SELECT code FROM items AS ikob WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.type = ikob.type );
{ "outer_table": "items", "inner_table": "accounts", "outer_alias": "ikob", "inner_alias": "jac", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07547
train
v1
Schema: accounts (alias: jac)(salary, code, type, id) managers(type, code, status, level) Task: Select id from accounts where id exists in managers for the same status. SQL:
SELECT id FROM accounts AS jac WHERE id IN ( SELECT id 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": "id", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07548
train
v2
Schema: products (alias: nad)(value, salary, level, date) invoices(value, status, code, amount) Task: Retrieve code from products that have at least one corresponding entry in invoices sharing the same level. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = nad.level );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "code", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07549
train
v2
Schema: departments (alias: dov)(value, date, id, code) orders(code, name, level, amount) Task: Retrieve amount from departments that have at least one corresponding entry in orders sharing the same status. SQL:
SELECT amount FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = dov.status );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dov", "inner_alias": "kab", "proj_col": "amount", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07550
train
v2
Schema: customers (alias: lex)(id, value, salary, status) invoices(type, value, code, date) Task: Find name from customers where a matching record exists in invoices with the same code. SQL:
SELECT name FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = lex.code );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "lex", "inner_alias": "fal", "proj_col": "name", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07551
train
v3
Schema: branches (alias: agov)(salary, type, level, name) requests(amount, type, id, status) Task: Find salary from branches where value exceeds the minimum salary from requests for the same level. SQL:
SELECT salary FROM branches AS agov WHERE value > ( SELECT MIN(salary) FROM requests AS ejof WHERE ejof.level = agov.level );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07552
train
v1
Schema: customers (alias: lex)(value, id, date, name) sales(date, salary, value, code) Task: Find code from customers where status appears in sales entries with matching status. SQL:
SELECT code FROM customers AS lex WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.status = lex.status );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07553
train
v1
Schema: tasks (alias: znob)(status, value, date, amount) departments(amount, status, code, type) Task: Find id from tasks where id appears in departments entries with matching type. SQL:
SELECT id 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": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07554
train
v2
Schema: employees (alias: bev)(amount, id, value, date) customers(status, value, amount, id) Task: Retrieve value from employees that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT value FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = bev.type );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "bev", "inner_alias": "lex", "proj_col": "value", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07555
train
v2
Schema: managers (alias: hac)(salary, value, name, amount) customers(value, level, amount, id) Task: Retrieve value from managers that have at least one corresponding entry in customers sharing the same code. SQL:
SELECT value FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = hac.code );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "value", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07556
train
v2
Schema: invoices (alias: fal)(id, date, type, amount) products(name, type, value, date) Task: Retrieve id from invoices that have at least one corresponding entry in products sharing the same code. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = fal.code );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "id", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07557
train
v2
Schema: tasks (alias: znob)(type, status, id, date) accounts(type, status, amount, level) Task: Retrieve id from tasks that have at least one corresponding entry in accounts sharing the same level. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = znob.level );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "id", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07558
train
v3
Schema: shipments (alias: vnob)(name, type, date, amount) requests(type, status, code, salary) Task: Retrieve amount from shipments with value above the SUM(value) of requests rows sharing the same id. SQL:
SELECT amount FROM shipments AS vnob WHERE value > ( SELECT SUM(value) FROM requests AS ejof WHERE ejof.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "requests", "outer_alias": "vnob", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07559
train
v1
Schema: categories (alias: egiv)(name, code, id, amount) tasks(value, code, name, salary) Task: Select id from categories where code exists in tasks for the same type. SQL:
SELECT id FROM categories AS egiv WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "tasks", "outer_alias": "egiv", "inner_alias": "znob", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07560
train
v2
Schema: invoices (alias: fal)(status, date, salary, amount) requests(date, name, level, type) Task: Find amount from invoices where a matching record exists in requests with the same type. SQL:
SELECT amount FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.type = fal.type );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "amount", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07561
train
v3
Schema: customers (alias: lex)(status, salary, id, value) invoices(level, type, code, amount) Task: Find amount from customers where amount exceeds the count of salary from invoices for the same level. SQL:
SELECT amount FROM customers AS lex WHERE amount > ( SELECT COUNT(salary) FROM invoices AS fal WHERE fal.level = lex.level );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "lex", "inner_alias": "fal", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07562
train
v1
Schema: shipments (alias: vnob)(salary, type, status, amount) schedules(status, id, code, date) Task: Find name from shipments where code appears in schedules entries with matching code. SQL:
SELECT name FROM shipments AS vnob WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07563
train
v1
Schema: branches (alias: agov)(type, amount, id, code) shipments(date, level, type, code) Task: Select name from branches where level exists in shipments for the same status. SQL:
SELECT name FROM branches AS agov WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.status = agov.status );
{ "outer_table": "branches", "inner_table": "shipments", "outer_alias": "agov", "inner_alias": "vnob", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07564
train
v2
Schema: managers (alias: hac)(code, status, value, id) customers(code, amount, status, salary) Task: Retrieve value from managers that have at least one corresponding entry in customers sharing the same code. SQL:
SELECT value FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = hac.code );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "value", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07565
train
v3
Schema: managers (alias: hac)(level, value, salary, date) tasks(id, code, level, amount) Task: Retrieve value from managers with amount above the COUNT(salary) of tasks rows sharing the same level. SQL:
SELECT value FROM managers AS hac WHERE amount > ( SELECT COUNT(salary) FROM tasks AS znob WHERE znob.level = hac.level );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07566
train
v2
Schema: departments (alias: dov)(code, status, amount, salary) orders(id, status, type, level) Task: Retrieve value from departments that have at least one corresponding entry in orders sharing the same level. SQL:
SELECT value FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = dov.level );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dov", "inner_alias": "kab", "proj_col": "value", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07567
train
v2
Schema: regions (alias: okiv)(code, id, date, status) orders(level, name, code, amount) Task: Find id from regions where a matching record exists in orders with the same type. SQL:
SELECT id FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = okiv.type );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "id", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07568
train
v2
Schema: invoices (alias: fal)(name, amount, salary, date) branches(level, date, value, name) Task: Find id from invoices where a matching record exists in branches with the same status. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = fal.status );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "id", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07569
train
v1
Schema: regions (alias: okiv)(type, status, amount, value) transactions(type, date, id, code) Task: Find amount from regions where id appears in transactions entries with matching status. SQL:
SELECT amount FROM regions AS okiv WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.status = okiv.status );
{ "outer_table": "regions", "inner_table": "transactions", "outer_alias": "okiv", "inner_alias": "gev", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07570
train
v2
Schema: branches (alias: agov)(salary, amount, level, name) accounts(code, value, salary, type) Task: Retrieve code from branches that have at least one corresponding entry in accounts sharing the same id. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = agov.id );
{ "outer_table": "branches", "inner_table": "accounts", "outer_alias": "agov", "inner_alias": "jac", "proj_col": "code", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07571
train
v2
Schema: orders (alias: kab)(salary, amount, name, level) projects(id, amount, level, value) Task: Retrieve code from orders that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT code 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": "code", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07572
train
v3
Schema: shipments (alias: vnob)(amount, level, type, code) employees(level, code, type, salary) Task: Find salary from shipments where salary exceeds the count of salary from employees for the same level. SQL:
SELECT salary FROM shipments AS vnob WHERE salary > ( SELECT COUNT(salary) FROM employees AS bev WHERE bev.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07573
train
v2
Schema: projects (alias: uliv)(type, name, amount, date) accounts(date, name, salary, status) Task: Find name from projects where a matching record exists in accounts with the same type. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = uliv.type );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "name", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07574
train
v2
Schema: requests (alias: ejof)(amount, salary, value, id) tasks(salary, name, value, amount) Task: Find salary from requests where a matching record exists in tasks with the same status. SQL:
SELECT salary FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "salary", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07575
train
v3
Schema: regions (alias: okiv)(amount, level, value, date) invoices(level, value, status, id) Task: Find value from regions where amount exceeds the total value from invoices for the same type. SQL:
SELECT value FROM regions AS okiv WHERE amount > ( SELECT SUM(value) FROM invoices AS fal WHERE fal.type = okiv.type );
{ "outer_table": "regions", "inner_table": "invoices", "outer_alias": "okiv", "inner_alias": "fal", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07576
train
v1
Schema: schedules (alias: vmob)(id, name, code, level) shipments(status, level, salary, id) Task: Retrieve id from schedules whose type is found in shipments rows where code matches the outer record. SQL:
SELECT id 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": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07577
train
v1
Schema: sales (alias: cif)(status, salary, id, amount) customers(amount, type, code, value) Task: Select name from sales where code exists in customers for the same id. SQL:
SELECT name FROM sales AS cif WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.id = cif.id );
{ "outer_table": "sales", "inner_table": "customers", "outer_alias": "cif", "inner_alias": "lex", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07578
train
v2
Schema: branches (alias: agov)(code, type, date, name) sales(name, code, salary, level) Task: Retrieve salary from branches that have at least one corresponding entry in sales sharing the same type. SQL:
SELECT salary FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = agov.type );
{ "outer_table": "branches", "inner_table": "sales", "outer_alias": "agov", "inner_alias": "cif", "proj_col": "salary", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07579
train
v2
Schema: categories (alias: egiv)(id, amount, level, name) staff(salary, status, type, code) Task: Find id from categories where a matching record exists in staff with the same status. SQL:
SELECT id FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "staff", "outer_alias": "egiv", "inner_alias": "xnob", "proj_col": "id", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07580
train
v2
Schema: shipments (alias: vnob)(date, salary, code, value) products(value, type, date, id) Task: Find amount from shipments where a matching record exists in products with the same id. SQL:
SELECT amount 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": "amount", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07581
train
v3
Schema: branches (alias: agov)(id, status, amount, salary) employees(id, amount, status, name) Task: Retrieve name from branches with amount above the AVG(amount) of employees rows sharing the same type. SQL:
SELECT name FROM branches AS agov WHERE amount > ( SELECT AVG(amount) FROM employees AS bev WHERE bev.type = agov.type );
{ "outer_table": "branches", "inner_table": "employees", "outer_alias": "agov", "inner_alias": "bev", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07582
train
v1
Schema: categories (alias: egiv)(status, type, salary, value) managers(amount, name, date, level) Task: Select amount from categories where status exists in managers for the same code. SQL:
SELECT amount FROM categories AS egiv WHERE status IN ( SELECT status FROM managers AS hac WHERE hac.code = egiv.code );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "amount", "filter_col": "status", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07583
train
v1
Schema: sales (alias: cif)(value, amount, level, name) branches(value, amount, code, status) Task: Retrieve amount from sales whose level is found in branches rows where status matches the outer record. SQL:
SELECT amount FROM sales AS cif WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.status = cif.status );
{ "outer_table": "sales", "inner_table": "branches", "outer_alias": "cif", "inner_alias": "agov", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07584
train
v3
Schema: regions (alias: okiv)(type, amount, name, id) sales(level, date, code, amount) Task: Retrieve amount from regions with amount above the MIN(amount) of sales rows sharing the same level. SQL:
SELECT amount FROM regions AS okiv WHERE amount > ( SELECT MIN(amount) FROM sales AS cif WHERE cif.level = okiv.level );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07585
train
v1
Schema: sales (alias: cif)(type, id, date, value) staff(level, name, date, code) Task: Select code from sales where code exists in staff for the same type. SQL:
SELECT code FROM sales AS cif WHERE code IN ( SELECT code FROM staff AS xnob WHERE xnob.type = cif.type );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "code", "filter_col": "code", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07586
train
v2
Schema: managers (alias: hac)(id, date, code, status) branches(value, salary, code, status) Task: Find code from managers where a matching record exists in branches with the same type. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.type = hac.type );
{ "outer_table": "managers", "inner_table": "branches", "outer_alias": "hac", "inner_alias": "agov", "proj_col": "code", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07587
train
v2
Schema: requests (alias: ejof)(id, code, status, type) branches(code, salary, amount, name) Task: Retrieve id from requests that have at least one corresponding entry in branches sharing the same id. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = ejof.id );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "id", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07588
train
v3
Schema: projects (alias: uliv)(amount, status, date, id) orders(value, date, type, id) Task: Find value from projects where amount exceeds the total salary from orders for the same id. SQL:
SELECT value FROM projects AS uliv WHERE amount > ( SELECT SUM(salary) FROM orders AS kab WHERE kab.id = uliv.id );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07589
train
v1
Schema: orders (alias: kab)(id, status, code, salary) transactions(name, amount, code, value) Task: Retrieve salary from orders whose status is found in transactions rows where level matches the outer record. SQL:
SELECT salary FROM orders AS kab WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.level = kab.level );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07590
train
v2
Schema: tasks (alias: znob)(value, name, type, amount) requests(id, value, level, date) Task: Find id from tasks where a matching record exists in requests with the same status. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = znob.status );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "id", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07591
train
v3
Schema: shipments (alias: vnob)(date, salary, amount, id) staff(date, status, amount, value) Task: Retrieve name from shipments with salary above the MAX(value) of staff rows sharing the same type. SQL:
SELECT name FROM shipments AS vnob WHERE salary > ( SELECT MAX(value) FROM staff AS xnob WHERE xnob.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07592
train
v3
Schema: shipments (alias: vnob)(status, type, code, value) transactions(name, salary, date, code) Task: Retrieve value from shipments with salary above the COUNT(amount) of transactions rows sharing the same level. SQL:
SELECT value FROM shipments AS vnob WHERE salary > ( SELECT COUNT(amount) FROM transactions AS gev WHERE gev.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "transactions", "outer_alias": "vnob", "inner_alias": "gev", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07593
train
v1
Schema: transactions (alias: gev)(amount, type, date, code) categories(date, status, id, type) Task: Find salary from transactions where level appears in categories entries with matching code. SQL:
SELECT salary FROM transactions AS gev WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.code = gev.code );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "level", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07594
train
v1
Schema: accounts (alias: jac)(name, level, salary, value) employees(type, status, id, value) Task: Retrieve salary from accounts whose status is found in employees rows where code matches the outer record. SQL:
SELECT salary FROM accounts AS jac WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.code = jac.code );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "salary", "filter_col": "status", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07595
train
v3
Schema: managers (alias: hac)(id, salary, code, type) regions(salary, date, code, name) Task: Find salary from managers where value exceeds the maximum amount from regions for the same id. SQL:
SELECT salary FROM managers AS hac WHERE value > ( SELECT MAX(amount) FROM regions AS okiv WHERE okiv.id = hac.id );
{ "outer_table": "managers", "inner_table": "regions", "outer_alias": "hac", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07596
train
v2
Schema: categories (alias: egiv)(value, level, type, id) staff(id, name, value, status) Task: Find amount from categories where a matching record exists in staff with the same type. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "staff", "outer_alias": "egiv", "inner_alias": "xnob", "proj_col": "amount", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07597
train
v3
Schema: accounts (alias: jac)(name, level, id, salary) sales(date, type, name, amount) Task: Retrieve amount from accounts with value above the MIN(amount) of sales rows sharing the same level. SQL:
SELECT amount FROM accounts AS jac WHERE value > ( SELECT MIN(amount) FROM sales AS cif WHERE cif.level = jac.level );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07598
train
v1
Schema: items (alias: ikob)(status, type, id, level) employees(code, value, date, salary) Task: Find value from items where code appears in employees entries with matching status. SQL:
SELECT value FROM items AS ikob WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.status = ikob.status );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "value", "filter_col": "code", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07599
train