variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v1
Schema: products (alias: nad)(value, type, amount, date) orders(salary, name, date, amount) Task: Find id from products where status appears in orders entries with matching id. SQL:
SELECT id FROM products AS nad WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.id = nad.id );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "nad", "inner_alias": "kab", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01300
train
v2
Schema: branches (alias: agov)(type, date, amount, code) invoices(type, salary, value, code) Task: Find code from branches where a matching record exists in invoices with the same level. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = agov.level );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "code", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01301
train
v3
Schema: invoices (alias: fal)(level, amount, code, salary) departments(status, name, value, type) Task: Find code from invoices where value exceeds the minimum value from departments for the same code. SQL:
SELECT code FROM invoices AS fal WHERE value > ( SELECT MIN(value) FROM departments AS dov WHERE dov.code = fal.code );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01302
train
v1
Schema: branches (alias: agov)(value, salary, id, status) accounts(status, date, code, type) Task: Select id from branches where level exists in accounts for the same status. SQL:
SELECT id FROM branches AS agov WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.status = agov.status );
{ "outer_table": "branches", "inner_table": "accounts", "outer_alias": "agov", "inner_alias": "jac", "proj_col": "id", "filter_col": "level", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01303
train
v2
Schema: shipments (alias: vnob)(date, amount, status, level) departments(date, id, status, level) Task: Retrieve id from shipments that have at least one corresponding entry in departments sharing the same status. SQL:
SELECT id FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "id", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01304
train
v1
Schema: tasks (alias: znob)(amount, id, status, date) staff(type, date, code, level) Task: Find id from tasks where id appears in staff entries with matching type. SQL:
SELECT id FROM tasks AS znob WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.type = znob.type );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01305
train
v3
Schema: products (alias: nad)(salary, amount, name, value) requests(salary, status, date, level) Task: Find name from products where amount exceeds the maximum value from requests for the same type. SQL:
SELECT name FROM products AS nad WHERE amount > ( SELECT MAX(value) FROM requests AS ejof WHERE ejof.type = nad.type );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01306
train
v1
Schema: categories (alias: egiv)(amount, name, value, level) employees(value, status, code, id) Task: Select code from categories where id exists in employees for the same id. SQL:
SELECT code FROM categories AS egiv WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.id = egiv.id );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "egiv", "inner_alias": "bev", "proj_col": "code", "filter_col": "id", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01307
train
v1
Schema: staff (alias: xnob)(status, value, code, id) shipments(value, level, code, type) Task: Retrieve code from staff whose level is found in shipments rows where code matches the outer record. SQL:
SELECT code FROM staff AS xnob WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.code = xnob.code );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_01308
train
v1
Schema: branches (alias: agov)(code, status, salary, value) requests(type, date, value, level) Task: Select id from branches where id exists in requests for the same id. SQL:
SELECT id FROM branches AS agov WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.id = agov.id );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "id", "filter_col": "id", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01309
train
v2
Schema: products (alias: nad)(value, name, date, status) employees(type, level, id, code) Task: Retrieve value from products that have at least one corresponding entry in employees sharing the same status. SQL:
SELECT value FROM products AS nad WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = nad.status );
{ "outer_table": "products", "inner_table": "employees", "outer_alias": "nad", "inner_alias": "bev", "proj_col": "value", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01310
train
v2
Schema: customers (alias: lex)(status, date, value, level) transactions(value, type, name, id) Task: Retrieve id from customers that have at least one corresponding entry in transactions sharing the same type. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = lex.type );
{ "outer_table": "customers", "inner_table": "transactions", "outer_alias": "lex", "inner_alias": "gev", "proj_col": "id", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01311
train
v3
Schema: categories (alias: egiv)(name, value, salary, code) orders(code, value, type, level) Task: Retrieve id from categories with salary above the COUNT(salary) of orders rows sharing the same type. SQL:
SELECT id FROM categories AS egiv WHERE salary > ( SELECT COUNT(salary) FROM orders AS kab WHERE kab.type = egiv.type );
{ "outer_table": "categories", "inner_table": "orders", "outer_alias": "egiv", "inner_alias": "kab", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01312
train
v1
Schema: projects (alias: uliv)(value, type, salary, amount) branches(date, code, salary, value) Task: Select code from projects where status exists in branches for the same type. SQL:
SELECT code FROM projects AS uliv WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.type = uliv.type );
{ "outer_table": "projects", "inner_table": "branches", "outer_alias": "uliv", "inner_alias": "agov", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01313
train
v1
Schema: managers (alias: hac)(name, type, id, status) requests(id, type, value, level) Task: Find name from managers where type appears in requests entries with matching code. SQL:
SELECT name FROM managers AS hac WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.code = hac.code );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01314
train
v3
Schema: schedules (alias: vmob)(level, id, name, value) projects(code, id, level, value) Task: Find value from schedules where amount exceeds the count of value from projects for the same id. SQL:
SELECT value FROM schedules AS vmob WHERE amount > ( SELECT COUNT(value) FROM projects AS uliv WHERE uliv.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01315
train
v1
Schema: sales (alias: cif)(id, status, date, amount) employees(date, salary, amount, type) Task: Select id from sales where status exists in employees for the same status. SQL:
SELECT id FROM sales AS cif WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.status = cif.status );
{ "outer_table": "sales", "inner_table": "employees", "outer_alias": "cif", "inner_alias": "bev", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01316
train
v1
Schema: employees (alias: bev)(amount, value, id, status) projects(value, name, id, type) Task: Find amount from employees where level appears in projects entries with matching code. SQL:
SELECT amount FROM employees AS bev WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.code = bev.code );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01317
train
v2
Schema: tasks (alias: znob)(amount, value, date, code) staff(amount, status, salary, type) Task: Retrieve amount from tasks that have at least one corresponding entry in staff sharing the same status. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "amount", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01318
train
v1
Schema: transactions (alias: gev)(value, id, amount, type) customers(value, level, type, date) Task: Retrieve amount from transactions whose status is found in customers rows where level matches the outer record. SQL:
SELECT amount FROM transactions AS gev WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.level = gev.level );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "gev", "inner_alias": "lex", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01319
train
v3
Schema: items (alias: ikob)(status, code, id, salary) branches(type, level, status, name) Task: Find name from items where amount exceeds the minimum salary from branches for the same type. SQL:
SELECT name FROM items AS ikob WHERE amount > ( SELECT MIN(salary) FROM branches AS agov WHERE agov.type = ikob.type );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01320
train
v1
Schema: schedules (alias: vmob)(date, level, salary, name) transactions(code, status, value, id) Task: Retrieve name from schedules whose code is found in transactions rows where id matches the outer record. SQL:
SELECT name FROM schedules AS vmob WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "transactions", "outer_alias": "vmob", "inner_alias": "gev", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01321
train
v2
Schema: transactions (alias: gev)(status, date, level, salary) accounts(salary, value, date, status) Task: Find name from transactions where a matching record exists in accounts with the same status. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = gev.status );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "gev", "inner_alias": "jac", "proj_col": "name", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01322
train
v1
Schema: accounts (alias: jac)(code, salary, type, status) transactions(name, amount, date, type) Task: Retrieve id from accounts whose code is found in transactions rows where code matches the outer record. SQL:
SELECT id FROM accounts AS jac WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.code = jac.code );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "jac", "inner_alias": "gev", "proj_col": "id", "filter_col": "code", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01323
train
v3
Schema: projects (alias: uliv)(id, name, value, type) products(salary, amount, level, code) Task: Retrieve id from projects with value above the SUM(value) of products rows sharing the same level. SQL:
SELECT id 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": "id", "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_01324
train
v2
Schema: sales (alias: cif)(salary, code, value, amount) managers(type, id, salary, amount) Task: Find id from sales where a matching record exists in managers with the same type. SQL:
SELECT id FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = cif.type );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "cif", "inner_alias": "hac", "proj_col": "id", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01325
train
v3
Schema: products (alias: nad)(amount, name, level, status) departments(amount, date, status, value) Task: Retrieve value from products with amount above the MIN(amount) of departments rows sharing the same status. SQL:
SELECT value FROM products AS nad WHERE amount > ( SELECT MIN(amount) FROM departments AS dov WHERE dov.status = nad.status );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01326
train
v2
Schema: staff (alias: xnob)(code, amount, status, salary) regions(id, date, code, salary) Task: Find id from staff where a matching record exists in regions with the same code. SQL:
SELECT id FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "id", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_01327
train
v3
Schema: schedules (alias: vmob)(value, id, amount, code) accounts(amount, level, code, date) Task: Find id from schedules where salary exceeds the average salary from accounts for the same status. SQL:
SELECT id FROM schedules AS vmob WHERE salary > ( SELECT AVG(salary) FROM accounts AS jac WHERE jac.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "accounts", "outer_alias": "vmob", "inner_alias": "jac", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01328
train
v1
Schema: projects (alias: uliv)(amount, name, level, id) accounts(code, amount, type, value) Task: Select id from projects where type exists in accounts for the same code. SQL:
SELECT id FROM projects AS uliv WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.code = uliv.code );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01329
train
v1
Schema: shipments (alias: vnob)(salary, name, date, amount) sales(type, code, status, id) Task: Retrieve code from shipments whose level is found in sales rows where status matches the outer record. SQL:
SELECT code FROM shipments AS vnob WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01330
train
v1
Schema: tasks (alias: znob)(salary, status, id, level) projects(date, amount, salary, code) Task: Select amount from tasks where code exists in projects for the same code. SQL:
SELECT amount FROM tasks AS znob WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.code = znob.code );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01331
train
v2
Schema: sales (alias: cif)(code, id, amount, date) managers(salary, name, amount, level) Task: Find amount from sales where a matching record exists in managers with the same id. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = cif.id );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "cif", "inner_alias": "hac", "proj_col": "amount", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01332
train
v3
Schema: departments (alias: dov)(name, date, type, amount) customers(amount, name, salary, value) Task: Find salary from departments where amount exceeds the minimum salary from customers for the same code. SQL:
SELECT salary FROM departments AS dov WHERE amount > ( SELECT MIN(salary) FROM customers AS lex WHERE lex.code = dov.code );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01333
train
v3
Schema: regions (alias: okiv)(status, level, amount, value) products(amount, code, salary, type) Task: Retrieve amount from regions with value above the SUM(salary) of products rows sharing the same status. SQL:
SELECT amount FROM regions AS okiv WHERE value > ( SELECT SUM(salary) FROM products AS nad WHERE nad.status = okiv.status );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01334
train
v2
Schema: projects (alias: uliv)(date, level, amount, value) schedules(type, level, id, date) Task: Retrieve amount from projects that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "amount", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01335
train
v1
Schema: products (alias: nad)(status, level, name, id) transactions(salary, amount, type, name) Task: Select name from products where type exists in transactions for the same level. SQL:
SELECT name FROM products AS nad WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.level = nad.level );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "name", "filter_col": "type", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01336
train
v2
Schema: accounts (alias: jac)(salary, value, type, code) shipments(id, amount, status, level) Task: Retrieve salary from accounts that have at least one corresponding entry in shipments sharing the same status. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "salary", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01337
train
v3
Schema: invoices (alias: fal)(id, code, level, status) products(type, value, name, level) Task: Retrieve value from invoices with value above the MAX(value) of products rows sharing the same type. SQL:
SELECT value FROM invoices AS fal WHERE value > ( SELECT MAX(value) FROM products AS nad WHERE nad.type = fal.type );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01338
train
v2
Schema: sales (alias: cif)(date, amount, code, value) transactions(code, name, amount, type) Task: Find code from sales where a matching record exists in transactions with the same level. SQL:
SELECT code FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = cif.level );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "code", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01339
train
v1
Schema: requests (alias: ejof)(salary, code, level, id) tasks(level, code, name, value) Task: Find id from requests where level appears in tasks entries with matching type. SQL:
SELECT id FROM requests AS ejof WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.type = ejof.type );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_01340
train
v3
Schema: departments (alias: dov)(value, id, code, salary) shipments(name, value, amount, code) Task: Find code from departments where amount exceeds the average value from shipments for the same type. SQL:
SELECT code FROM departments AS dov WHERE amount > ( SELECT AVG(value) FROM shipments AS vnob WHERE vnob.type = dov.type );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01341
train
v1
Schema: shipments (alias: vnob)(code, status, value, amount) schedules(value, level, code, date) Task: Retrieve id from shipments whose id is found in schedules rows where id matches the outer record. SQL:
SELECT id FROM shipments AS vnob WHERE id IN ( SELECT id FROM schedules AS vmob WHERE vmob.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "id", "filter_col": "id", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01342
train
v1
Schema: products (alias: nad)(level, id, date, salary) schedules(level, date, name, amount) Task: Retrieve value from products whose id is found in schedules rows where code matches the outer record. SQL:
SELECT value FROM products AS nad WHERE id IN ( SELECT id FROM schedules AS vmob WHERE vmob.code = nad.code );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "value", "filter_col": "id", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01343
train
v1
Schema: categories (alias: egiv)(salary, type, amount, status) tasks(type, value, code, level) Task: Find value from categories where id appears in tasks entries with matching type. SQL:
SELECT value FROM categories AS egiv WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "tasks", "outer_alias": "egiv", "inner_alias": "znob", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01344
train
v2
Schema: branches (alias: agov)(id, salary, status, date) requests(salary, amount, value, name) Task: Retrieve name from branches that have at least one corresponding entry in requests sharing the same type. SQL:
SELECT name FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.type = agov.type );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "name", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01345
train
v3
Schema: regions (alias: okiv)(name, code, id, level) accounts(value, code, salary, status) Task: Retrieve code from regions with amount above the AVG(salary) of accounts rows sharing the same level. SQL:
SELECT code FROM regions AS okiv WHERE amount > ( SELECT AVG(salary) FROM accounts AS jac WHERE jac.level = okiv.level );
{ "outer_table": "regions", "inner_table": "accounts", "outer_alias": "okiv", "inner_alias": "jac", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01346
train
v3
Schema: shipments (alias: vnob)(type, code, value, date) employees(salary, name, amount, code) Task: Retrieve salary from shipments with amount above the MIN(value) of employees rows sharing the same type. SQL:
SELECT salary FROM shipments AS vnob WHERE amount > ( SELECT MIN(value) FROM employees AS bev WHERE bev.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01347
train
v3
Schema: categories (alias: egiv)(type, name, amount, id) managers(date, name, code, status) Task: Retrieve salary from categories with amount above the MAX(value) of managers rows sharing the same status. SQL:
SELECT salary FROM categories AS egiv WHERE amount > ( SELECT MAX(value) FROM managers AS hac WHERE hac.status = egiv.status );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01348
train
v1
Schema: tasks (alias: znob)(name, amount, status, date) staff(amount, name, type, id) Task: Retrieve name from tasks whose type is found in staff rows where id matches the outer record. SQL:
SELECT name FROM tasks AS znob WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "name", "filter_col": "type", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01349
train
v2
Schema: employees (alias: bev)(value, amount, level, date) schedules(code, id, value, type) Task: Retrieve name from employees that have at least one corresponding entry in schedules sharing the same type. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = bev.type );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "name", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01350
train
v3
Schema: departments (alias: dov)(code, date, level, amount) schedules(value, level, date, id) Task: Find value from departments where value exceeds the minimum amount from schedules for the same id. SQL:
SELECT value FROM departments AS dov WHERE value > ( SELECT MIN(amount) FROM schedules AS vmob WHERE vmob.id = dov.id );
{ "outer_table": "departments", "inner_table": "schedules", "outer_alias": "dov", "inner_alias": "vmob", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01351
train
v1
Schema: items (alias: ikob)(id, level, salary, code) tasks(id, level, salary, code) Task: Find id from items where level appears in tasks entries with matching type. SQL:
SELECT id FROM items AS ikob WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.type = ikob.type );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01352
train
v3
Schema: orders (alias: kab)(value, code, id, date) employees(level, name, salary, id) Task: Retrieve name from orders with amount above the MAX(amount) of employees rows sharing the same level. SQL:
SELECT name FROM orders AS kab WHERE amount > ( SELECT MAX(amount) FROM employees AS bev WHERE bev.level = kab.level );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01353
train
v3
Schema: transactions (alias: gev)(id, type, amount, name) sales(amount, code, type, value) Task: Retrieve value from transactions with salary above the MAX(salary) of sales rows sharing the same type. SQL:
SELECT value FROM transactions AS gev WHERE salary > ( SELECT MAX(salary) FROM sales AS cif WHERE cif.type = gev.type );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01354
train
v3
Schema: regions (alias: okiv)(value, level, date, code) requests(amount, type, salary, value) Task: Retrieve id from regions with value above the COUNT(amount) of requests rows sharing the same code. SQL:
SELECT id FROM regions AS okiv WHERE value > ( SELECT COUNT(amount) FROM requests AS ejof WHERE ejof.code = okiv.code );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01355
train
v2
Schema: invoices (alias: fal)(date, id, name, status) departments(value, date, level, id) Task: Retrieve id from invoices that have at least one corresponding entry in departments sharing the same type. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = fal.type );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "id", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01356
train
v2
Schema: employees (alias: bev)(amount, salary, status, date) sales(name, status, type, code) Task: Find id from employees where a matching record exists in sales with the same type. SQL:
SELECT id FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = bev.type );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "id", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01357
train
v2
Schema: transactions (alias: gev)(id, value, amount, code) tasks(status, salary, date, type) Task: Find amount from transactions where a matching record exists in tasks with the same status. SQL:
SELECT amount FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = gev.status );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "amount", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01358
train
v2
Schema: tasks (alias: znob)(value, code, id, level) requests(name, type, status, salary) Task: Retrieve name from tasks that have at least one corresponding entry in requests sharing the same status. SQL:
SELECT name 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": "name", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01359
train
v3
Schema: departments (alias: dov)(code, level, salary, status) tasks(id, value, status, date) Task: Retrieve id from departments with salary above the AVG(amount) of tasks rows sharing the same id. SQL:
SELECT id FROM departments AS dov WHERE salary > ( SELECT AVG(amount) FROM tasks AS znob WHERE znob.id = dov.id );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dov", "inner_alias": "znob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01360
train
v1
Schema: sales (alias: cif)(amount, salary, id, type) shipments(type, date, code, level) Task: Select amount from sales where level exists in shipments for the same status. SQL:
SELECT amount FROM sales AS cif WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.status = cif.status );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01361
train
v1
Schema: transactions (alias: gev)(level, id, code, value) tasks(date, salary, status, value) Task: Find amount from transactions where code appears in tasks entries with matching code. SQL:
SELECT amount FROM transactions AS gev WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.code = gev.code );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01362
train
v1
Schema: requests (alias: ejof)(code, amount, type, salary) employees(salary, status, amount, value) Task: Select code from requests where status exists in employees for the same id. SQL:
SELECT code FROM requests AS ejof WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.id = ejof.id );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ejof", "inner_alias": "bev", "proj_col": "code", "filter_col": "status", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_01363
train
v2
Schema: shipments (alias: vnob)(type, id, date, status) departments(level, code, value, amount) Task: Find salary from shipments where a matching record exists in departments with the same level. SQL:
SELECT salary FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "salary", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01364
train
v3
Schema: accounts (alias: jac)(date, status, code, amount) requests(date, id, salary, code) Task: Find code from accounts where amount exceeds the maximum amount from requests for the same status. SQL:
SELECT code FROM accounts AS jac WHERE amount > ( SELECT MAX(amount) FROM requests AS ejof WHERE ejof.status = jac.status );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "jac", "inner_alias": "ejof", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01365
train
v2
Schema: transactions (alias: gev)(type, level, amount, id) orders(salary, amount, status, level) Task: Find name from transactions where a matching record exists in orders with the same id. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = gev.id );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "gev", "inner_alias": "kab", "proj_col": "name", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01366
train
v1
Schema: accounts (alias: jac)(code, level, name, type) invoices(name, date, status, salary) Task: Retrieve amount from accounts whose level is found in invoices rows where status matches the outer record. SQL:
SELECT amount FROM accounts AS jac WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.status = jac.status );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01367
train
v3
Schema: transactions (alias: gev)(code, level, amount, status) requests(level, code, status, date) Task: Find code from transactions where salary exceeds the total salary from requests for the same status. SQL:
SELECT code FROM transactions AS gev WHERE salary > ( SELECT SUM(salary) FROM requests AS ejof WHERE ejof.status = gev.status );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01368
train
v1
Schema: invoices (alias: fal)(level, type, amount, value) sales(date, level, status, type) Task: Find value from invoices where level appears in sales entries with matching type. SQL:
SELECT value FROM invoices AS fal WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.type = fal.type );
{ "outer_table": "invoices", "inner_table": "sales", "outer_alias": "fal", "inner_alias": "cif", "proj_col": "value", "filter_col": "level", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01369
train
v1
Schema: invoices (alias: fal)(id, salary, amount, type) sales(amount, salary, type, value) Task: Find code from invoices where status appears in sales entries with matching status. SQL:
SELECT code FROM invoices AS fal WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.status = fal.status );
{ "outer_table": "invoices", "inner_table": "sales", "outer_alias": "fal", "inner_alias": "cif", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01370
train
v3
Schema: managers (alias: hac)(date, code, level, amount) orders(value, amount, level, status) Task: Retrieve salary from managers with value above the SUM(salary) of orders rows sharing the same level. SQL:
SELECT salary FROM managers AS hac WHERE value > ( SELECT SUM(salary) FROM orders AS kab WHERE kab.level = hac.level );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01371
train
v2
Schema: managers (alias: hac)(type, value, date, level) customers(id, code, value, status) Task: Find code from managers where a matching record exists in customers with the same code. SQL:
SELECT code 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": "code", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01372
train
v1
Schema: transactions (alias: gev)(amount, type, value, salary) regions(salary, id, name, amount) Task: Retrieve amount from transactions whose level is found in regions rows where id matches the outer record. SQL:
SELECT amount FROM transactions AS gev WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.id = gev.id );
{ "outer_table": "transactions", "inner_table": "regions", "outer_alias": "gev", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01373
train
v1
Schema: customers (alias: lex)(name, type, level, value) requests(level, value, amount, date) Task: Select id from customers where id exists in requests for the same level. SQL:
SELECT id FROM customers AS lex WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.level = lex.level );
{ "outer_table": "customers", "inner_table": "requests", "outer_alias": "lex", "inner_alias": "ejof", "proj_col": "id", "filter_col": "id", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01374
train
v2
Schema: products (alias: nad)(code, type, salary, value) customers(level, amount, value, code) Task: Find salary from products where a matching record exists in customers with the same code. SQL:
SELECT salary FROM products AS nad WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = nad.code );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "salary", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01375
train
v3
Schema: managers (alias: hac)(id, name, value, salary) customers(amount, status, type, id) Task: Find amount from managers where amount exceeds the average salary from customers for the same status. SQL:
SELECT amount FROM managers AS hac WHERE amount > ( SELECT AVG(salary) FROM customers AS lex WHERE lex.status = hac.status );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01376
train
v1
Schema: requests (alias: ejof)(date, name, id, value) tasks(name, level, date, type) Task: Find value from requests where id appears in tasks entries with matching code. SQL:
SELECT value FROM requests AS ejof WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "value", "filter_col": "id", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_01377
train
v2
Schema: employees (alias: bev)(value, salary, status, code) orders(code, id, level, date) Task: Find name from employees where a matching record exists in orders with the same code. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.code = bev.code );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "name", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01378
train
v3
Schema: products (alias: nad)(name, value, id, code) requests(status, amount, salary, value) Task: Retrieve value from products with salary above the MAX(amount) of requests rows sharing the same code. SQL:
SELECT value FROM products AS nad WHERE salary > ( SELECT MAX(amount) FROM requests AS ejof WHERE ejof.code = nad.code );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01379
train
v2
Schema: employees (alias: bev)(date, name, code, type) shipments(salary, value, level, type) Task: Retrieve amount from employees that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = bev.code );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "amount", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01380
train
v2
Schema: projects (alias: uliv)(amount, level, code, type) managers(id, value, level, type) Task: Retrieve name from projects that have at least one corresponding entry in managers sharing the same level. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = uliv.level );
{ "outer_table": "projects", "inner_table": "managers", "outer_alias": "uliv", "inner_alias": "hac", "proj_col": "name", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01381
train
v3
Schema: invoices (alias: fal)(type, level, name, amount) items(name, amount, value, code) Task: Find amount from invoices where salary exceeds the average salary from items for the same status. SQL:
SELECT amount FROM invoices AS fal WHERE salary > ( SELECT AVG(salary) FROM items AS ikob WHERE ikob.status = fal.status );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "fal", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01382
train
v3
Schema: customers (alias: lex)(code, id, level, type) transactions(date, id, amount, status) Task: Retrieve amount from customers with amount above the AVG(salary) of transactions rows sharing the same status. SQL:
SELECT amount FROM customers AS lex WHERE amount > ( SELECT AVG(salary) FROM transactions AS gev WHERE gev.status = lex.status );
{ "outer_table": "customers", "inner_table": "transactions", "outer_alias": "lex", "inner_alias": "gev", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01383
train
v3
Schema: invoices (alias: fal)(value, id, level, amount) regions(type, value, amount, level) Task: Find salary from invoices where value exceeds the maximum amount from regions for the same level. SQL:
SELECT salary FROM invoices AS fal WHERE value > ( SELECT MAX(amount) FROM regions AS okiv WHERE okiv.level = fal.level );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01384
train
v2
Schema: customers (alias: lex)(amount, id, value, date) staff(value, id, level, amount) Task: Retrieve name from customers that have at least one corresponding entry in staff sharing the same id. SQL:
SELECT name FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = lex.id );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "name", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01385
train
v3
Schema: orders (alias: kab)(salary, id, type, name) requests(value, type, code, date) Task: Find id from orders where salary exceeds the average salary from requests for the same id. SQL:
SELECT id FROM orders AS kab WHERE salary > ( SELECT AVG(salary) FROM requests AS ejof WHERE ejof.id = kab.id );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01386
train
v3
Schema: products (alias: nad)(level, salary, status, id) projects(type, name, status, amount) Task: Retrieve salary from products with salary above the SUM(salary) of projects rows sharing the same level. SQL:
SELECT salary FROM products AS nad WHERE salary > ( SELECT SUM(salary) FROM projects AS uliv WHERE uliv.level = nad.level );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01387
train
v2
Schema: regions (alias: okiv)(id, salary, code, date) branches(name, status, level, salary) Task: Retrieve amount from regions that have at least one corresponding entry in branches sharing the same status. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = okiv.status );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "okiv", "inner_alias": "agov", "proj_col": "amount", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01388
train
v3
Schema: accounts (alias: jac)(type, date, name, id) employees(name, level, id, type) Task: Find salary from accounts where salary exceeds the total value from employees for the same code. SQL:
SELECT salary FROM accounts AS jac WHERE salary > ( SELECT SUM(value) 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": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01389
train
v2
Schema: staff (alias: xnob)(value, date, type, code) schedules(status, amount, level, name) Task: Find amount from staff where a matching record exists in schedules with the same code. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = xnob.code );
{ "outer_table": "staff", "inner_table": "schedules", "outer_alias": "xnob", "inner_alias": "vmob", "proj_col": "amount", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_01390
train
v2
Schema: products (alias: nad)(code, type, value, amount) staff(type, date, amount, status) Task: Find value from products where a matching record exists in staff with the same status. SQL:
SELECT value FROM products AS nad WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = nad.status );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "value", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01391
train
v1
Schema: products (alias: nad)(status, value, salary, date) staff(salary, name, id, value) Task: Select name from products where id exists in staff for the same status. SQL:
SELECT name FROM products AS nad WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.status = nad.status );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01392
train
v1
Schema: regions (alias: okiv)(level, salary, id, value) projects(date, level, id, amount) Task: Retrieve code from regions whose level is found in projects rows where code matches the outer record. SQL:
SELECT code FROM regions AS okiv WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.code = okiv.code );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01393
train
v1
Schema: shipments (alias: vnob)(status, value, id, amount) departments(date, id, amount, name) Task: Find name from shipments where code appears in departments entries with matching type. SQL:
SELECT name FROM shipments AS vnob WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "name", "filter_col": "code", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01394
train
v1
Schema: managers (alias: hac)(amount, date, salary, id) schedules(date, id, code, name) Task: Retrieve salary from managers whose status is found in schedules rows where code matches the outer record. SQL:
SELECT salary FROM managers AS hac WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.code = hac.code );
{ "outer_table": "managers", "inner_table": "schedules", "outer_alias": "hac", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "status", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01395
train
v2
Schema: products (alias: nad)(value, amount, status, code) staff(code, type, date, status) Task: Find name from products where a matching record exists in staff with the same type. SQL:
SELECT name FROM products AS nad WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.type = nad.type );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "name", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01396
train
v1
Schema: sales (alias: cif)(value, date, level, code) staff(date, salary, name, code) Task: Retrieve amount from sales whose id is found in staff rows where status matches the outer record. SQL:
SELECT amount FROM sales AS cif WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.status = cif.status );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01397
train
v1
Schema: sales (alias: cif)(value, type, date, id) managers(id, amount, value, name) Task: Retrieve code from sales whose status is found in managers rows where type matches the outer record. SQL:
SELECT code FROM sales AS cif WHERE status IN ( SELECT status FROM managers AS hac WHERE hac.type = cif.type );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "cif", "inner_alias": "hac", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01398
train
v2
Schema: invoices (alias: fal)(level, date, id, name) products(salary, id, date, name) Task: Retrieve id from invoices that have at least one corresponding entry in products sharing the same level. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = fal.level );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "id", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01399
train