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: transactions (alias: gev)(value, salary, id, date) staff(type, name, code, value) Task: Select name from transactions where type exists in staff for the same type. SQL:
SELECT name FROM transactions AS gev WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.type = gev.type );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "name", "filter_col": "type", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02300
train
v3
Schema: categories (alias: egiv)(value, name, date, type) customers(amount, type, id, name) Task: Find id from categories where salary exceeds the total amount from customers for the same code. SQL:
SELECT id FROM categories AS egiv WHERE salary > ( SELECT SUM(amount) FROM customers AS lex WHERE lex.code = egiv.code );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02301
train
v3
Schema: shipments (alias: vnob)(amount, code, salary, name) managers(value, type, amount, status) Task: Find amount from shipments where amount exceeds the maximum value from managers for the same code. SQL:
SELECT amount FROM shipments AS vnob WHERE amount > ( SELECT MAX(value) FROM managers AS hac WHERE hac.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02302
train
v2
Schema: requests (alias: ejof)(salary, date, name, code) regions(salary, status, name, id) Task: Find name from requests where a matching record exists in regions with the same level. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = ejof.level );
{ "outer_table": "requests", "inner_table": "regions", "outer_alias": "ejof", "inner_alias": "okiv", "proj_col": "name", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02303
train
v2
Schema: sales (alias: cif)(value, salary, type, name) tasks(id, amount, date, salary) Task: Find amount from sales where a matching record exists in tasks with the same code. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.code = cif.code );
{ "outer_table": "sales", "inner_table": "tasks", "outer_alias": "cif", "inner_alias": "znob", "proj_col": "amount", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02304
train
v2
Schema: departments (alias: dov)(code, amount, id, value) shipments(salary, status, date, level) Task: Retrieve salary from departments that have at least one corresponding entry in shipments sharing the same status. SQL:
SELECT salary FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "salary", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02305
train
v1
Schema: categories (alias: egiv)(amount, status, id, code) tasks(name, type, level, id) Task: Select value from categories where code exists in tasks for the same type. SQL:
SELECT value 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": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02306
train
v3
Schema: orders (alias: kab)(id, status, salary, code) items(code, value, id, date) Task: Find value from orders where amount exceeds the total salary from items for the same level. SQL:
SELECT value FROM orders AS kab WHERE amount > ( SELECT SUM(salary) FROM items AS ikob WHERE ikob.level = kab.level );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "kab", "inner_alias": "ikob", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02307
train
v2
Schema: customers (alias: lex)(level, code, amount, status) categories(salary, type, code, date) Task: Retrieve amount from customers that have at least one corresponding entry in categories sharing the same type. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = lex.type );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "amount", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02308
train
v3
Schema: employees (alias: bev)(code, level, name, type) requests(date, type, value, salary) Task: Retrieve value from employees with salary above the MIN(amount) of requests rows sharing the same type. SQL:
SELECT value FROM employees AS bev WHERE salary > ( SELECT MIN(amount) FROM requests AS ejof WHERE ejof.type = bev.type );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02309
train
v1
Schema: departments (alias: dov)(amount, salary, id, type) items(level, type, salary, status) Task: Find name from departments where type appears in items entries with matching level. SQL:
SELECT name FROM departments AS dov WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.level = dov.level );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "name", "filter_col": "type", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02310
train
v3
Schema: managers (alias: hac)(date, id, type, code) branches(level, value, amount, code) Task: Find salary from managers where amount exceeds the count of salary from branches for the same id. SQL:
SELECT salary FROM managers AS hac WHERE amount > ( SELECT COUNT(salary) FROM branches AS agov WHERE agov.id = hac.id );
{ "outer_table": "managers", "inner_table": "branches", "outer_alias": "hac", "inner_alias": "agov", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02311
train
v1
Schema: requests (alias: ejof)(amount, id, date, status) managers(name, id, value, type) Task: Retrieve salary from requests whose id is found in managers rows where level matches the outer record. SQL:
SELECT salary FROM requests AS ejof WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.level = ejof.level );
{ "outer_table": "requests", "inner_table": "managers", "outer_alias": "ejof", "inner_alias": "hac", "proj_col": "salary", "filter_col": "id", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02312
train
v3
Schema: managers (alias: hac)(id, salary, type, value) branches(code, level, name, type) Task: Retrieve amount from managers with amount above the MIN(salary) of branches rows sharing the same type. SQL:
SELECT amount FROM managers AS hac WHERE amount > ( SELECT MIN(salary) FROM branches AS agov WHERE agov.type = hac.type );
{ "outer_table": "managers", "inner_table": "branches", "outer_alias": "hac", "inner_alias": "agov", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02313
train
v3
Schema: shipments (alias: vnob)(name, status, value, amount) transactions(code, id, salary, value) Task: Retrieve value from shipments with value above the COUNT(salary) of transactions rows sharing the same status. SQL:
SELECT value FROM shipments AS vnob WHERE value > ( SELECT COUNT(salary) FROM transactions AS gev WHERE gev.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "transactions", "outer_alias": "vnob", "inner_alias": "gev", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02314
train
v3
Schema: projects (alias: uliv)(value, type, name, level) employees(name, type, level, value) Task: Retrieve amount from projects with amount above the AVG(value) of employees rows sharing the same id. SQL:
SELECT amount FROM projects AS uliv WHERE amount > ( SELECT AVG(value) FROM employees AS bev WHERE bev.id = uliv.id );
{ "outer_table": "projects", "inner_table": "employees", "outer_alias": "uliv", "inner_alias": "bev", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02315
train
v3
Schema: orders (alias: kab)(amount, type, code, status) categories(id, type, salary, status) Task: Retrieve amount from orders with salary above the AVG(value) of categories rows sharing the same id. SQL:
SELECT amount FROM orders AS kab WHERE salary > ( SELECT AVG(value) FROM categories AS egiv WHERE egiv.id = kab.id );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02316
train
v2
Schema: branches (alias: agov)(level, status, date, salary) sales(salary, date, status, level) Task: Find value from branches where a matching record exists in sales with the same id. SQL:
SELECT value FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = agov.id );
{ "outer_table": "branches", "inner_table": "sales", "outer_alias": "agov", "inner_alias": "cif", "proj_col": "value", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02317
train
v1
Schema: accounts (alias: jac)(status, level, name, type) departments(level, id, name, code) Task: Find amount from accounts where id appears in departments entries with matching id. SQL:
SELECT amount FROM accounts AS jac WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.id = jac.id );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "amount", "filter_col": "id", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02318
train
v3
Schema: tasks (alias: znob)(level, status, id, name) invoices(type, salary, id, code) Task: Find name from tasks where salary exceeds the count of salary from invoices for the same status. SQL:
SELECT name FROM tasks AS znob WHERE salary > ( SELECT COUNT(salary) FROM invoices AS fal WHERE fal.status = znob.status );
{ "outer_table": "tasks", "inner_table": "invoices", "outer_alias": "znob", "inner_alias": "fal", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02319
train
v1
Schema: managers (alias: hac)(amount, type, name, code) tasks(status, value, id, code) Task: Find value from managers where code appears in tasks entries with matching code. SQL:
SELECT value FROM managers AS hac WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.code = hac.code );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "value", "filter_col": "code", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02320
train
v1
Schema: items (alias: ikob)(salary, status, value, type) shipments(name, value, status, level) Task: Find name from items where type appears in shipments entries with matching status. SQL:
SELECT name FROM items AS ikob WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.status = ikob.status );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "type", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02321
train
v2
Schema: items (alias: ikob)(value, amount, status, type) products(amount, type, code, name) Task: Retrieve value from items that have at least one corresponding entry in products sharing the same status. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = ikob.status );
{ "outer_table": "items", "inner_table": "products", "outer_alias": "ikob", "inner_alias": "nad", "proj_col": "value", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02322
train
v3
Schema: schedules (alias: vmob)(date, salary, id, code) products(name, date, status, salary) Task: Retrieve name from schedules with amount above the SUM(amount) of products rows sharing the same status. SQL:
SELECT name FROM schedules AS vmob WHERE amount > ( SELECT SUM(amount) FROM products AS nad WHERE nad.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02323
train
v2
Schema: products (alias: nad)(salary, name, amount, status) departments(code, level, amount, date) Task: Find name from products where a matching record exists in departments with the same level. SQL:
SELECT name FROM products AS nad WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = nad.level );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "name", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02324
train
v1
Schema: requests (alias: ejof)(salary, code, amount, level) orders(amount, salary, date, status) Task: Find name from requests where level appears in orders entries with matching level. SQL:
SELECT name FROM requests AS ejof WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.level = ejof.level );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "name", "filter_col": "level", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02325
train
v3
Schema: staff (alias: xnob)(value, id, date, amount) items(amount, value, date, name) Task: Retrieve id from staff with amount above the MIN(salary) of items rows sharing the same type. SQL:
SELECT id FROM staff AS xnob WHERE amount > ( SELECT MIN(salary) FROM items AS ikob WHERE ikob.type = xnob.type );
{ "outer_table": "staff", "inner_table": "items", "outer_alias": "xnob", "inner_alias": "ikob", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02326
train
v3
Schema: sales (alias: cif)(type, value, level, status) managers(salary, type, date, status) Task: Retrieve id from sales with value above the AVG(amount) of managers rows sharing the same id. SQL:
SELECT id FROM sales AS cif WHERE value > ( SELECT AVG(amount) FROM managers AS hac WHERE hac.id = cif.id );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "cif", "inner_alias": "hac", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02327
train
v3
Schema: invoices (alias: fal)(date, code, level, status) products(salary, name, level, type) Task: Retrieve amount from invoices with amount above the AVG(value) of products rows sharing the same level. SQL:
SELECT amount FROM invoices AS fal WHERE amount > ( SELECT AVG(value) FROM products AS nad WHERE nad.level = fal.level );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02328
train
v1
Schema: branches (alias: agov)(type, code, date, status) customers(level, date, status, id) Task: Retrieve amount from branches whose id is found in customers rows where id matches the outer record. SQL:
SELECT amount FROM branches AS agov WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.id = agov.id );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "amount", "filter_col": "id", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02329
train
v2
Schema: customers (alias: lex)(id, value, name, level) branches(name, value, salary, type) Task: Retrieve name from customers that have at least one corresponding entry in branches sharing the same type. SQL:
SELECT name FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.type = lex.type );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "name", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02330
train
v3
Schema: regions (alias: okiv)(value, type, code, name) categories(id, status, name, code) Task: Retrieve amount from regions with amount above the SUM(amount) of categories rows sharing the same code. SQL:
SELECT amount FROM regions AS okiv WHERE amount > ( SELECT SUM(amount) FROM categories AS egiv WHERE egiv.code = okiv.code );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02331
train
v3
Schema: orders (alias: kab)(value, status, type, date) requests(status, level, id, salary) Task: Find code from orders where value exceeds the total value from requests for the same level. SQL:
SELECT code FROM orders AS kab WHERE value > ( SELECT SUM(value) FROM requests AS ejof WHERE ejof.level = kab.level );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02332
train
v1
Schema: transactions (alias: gev)(amount, date, type, id) managers(salary, level, status, name) Task: Retrieve salary from transactions whose status is found in managers rows where code matches the outer record. SQL:
SELECT salary FROM transactions AS gev WHERE status IN ( SELECT status FROM managers AS hac WHERE hac.code = gev.code );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "gev", "inner_alias": "hac", "proj_col": "salary", "filter_col": "status", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02333
train
v3
Schema: branches (alias: agov)(date, code, type, salary) requests(status, level, date, name) Task: Retrieve id from branches with amount above the MAX(amount) of requests rows sharing the same id. SQL:
SELECT id FROM branches AS agov WHERE amount > ( SELECT MAX(amount) 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": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02334
train
v2
Schema: customers (alias: lex)(amount, type, salary, code) transactions(type, status, code, date) Task: Retrieve value from customers that have at least one corresponding entry in transactions sharing the same id. SQL:
SELECT value FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = lex.id );
{ "outer_table": "customers", "inner_table": "transactions", "outer_alias": "lex", "inner_alias": "gev", "proj_col": "value", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02335
train
v1
Schema: customers (alias: lex)(id, value, code, salary) products(salary, value, status, level) Task: Select name from customers where id exists in products for the same type. SQL:
SELECT name FROM customers AS lex WHERE id IN ( SELECT id FROM products AS nad WHERE nad.type = lex.type );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "name", "filter_col": "id", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02336
train
v2
Schema: staff (alias: xnob)(date, code, status, salary) departments(name, salary, value, id) Task: Find name from staff where a matching record exists in departments with the same type. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = xnob.type );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "name", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02337
train
v2
Schema: orders (alias: kab)(code, name, amount, type) schedules(name, amount, level, date) Task: Retrieve value from orders that have at least one corresponding entry in schedules sharing the same status. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = kab.status );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "value", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02338
train
v1
Schema: categories (alias: egiv)(value, code, name, status) invoices(date, type, code, name) Task: Select salary from categories where code exists in invoices for the same level. SQL:
SELECT salary FROM categories AS egiv WHERE code IN ( SELECT code FROM invoices AS fal WHERE fal.level = egiv.level );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "salary", "filter_col": "code", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02339
train
v1
Schema: projects (alias: uliv)(date, type, name, amount) transactions(status, code, date, id) Task: Select name from projects where type exists in transactions for the same id. SQL:
SELECT name FROM projects AS uliv WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.id = uliv.id );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "name", "filter_col": "type", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02340
train
v3
Schema: invoices (alias: fal)(code, status, date, level) transactions(value, type, date, status) Task: Retrieve salary from invoices with value above the COUNT(salary) of transactions rows sharing the same id. SQL:
SELECT salary FROM invoices AS fal WHERE value > ( SELECT COUNT(salary) FROM transactions AS gev WHERE gev.id = fal.id );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02341
train
v2
Schema: invoices (alias: fal)(date, level, amount, type) transactions(date, level, value, status) Task: Retrieve code from invoices that have at least one corresponding entry in transactions sharing the same type. SQL:
SELECT code FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = fal.type );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "code", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02342
train
v3
Schema: regions (alias: okiv)(salary, id, code, level) employees(id, value, salary, level) Task: Retrieve value from regions with amount above the MAX(salary) of employees rows sharing the same id. SQL:
SELECT value FROM regions AS okiv WHERE amount > ( SELECT MAX(salary) FROM employees AS bev WHERE bev.id = okiv.id );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "okiv", "inner_alias": "bev", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02343
train
v2
Schema: invoices (alias: fal)(level, date, name, id) branches(amount, date, value, name) Task: Find salary from invoices where a matching record exists in branches with the same level. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.level = fal.level );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "salary", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02344
train
v1
Schema: tasks (alias: znob)(name, salary, amount, code) requests(status, name, level, code) Task: Retrieve id from tasks whose code is found in requests rows where level matches the outer record. SQL:
SELECT id FROM tasks AS znob WHERE code IN ( SELECT code FROM requests AS ejof WHERE ejof.level = znob.level );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02345
train
v2
Schema: sales (alias: cif)(code, name, id, type) projects(type, date, status, id) Task: Find salary from sales where a matching record exists in projects with the same type. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = cif.type );
{ "outer_table": "sales", "inner_table": "projects", "outer_alias": "cif", "inner_alias": "uliv", "proj_col": "salary", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02346
train
v2
Schema: regions (alias: okiv)(status, date, code, value) accounts(code, date, name, value) Task: Find value from regions where a matching record exists in accounts with the same code. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = okiv.code );
{ "outer_table": "regions", "inner_table": "accounts", "outer_alias": "okiv", "inner_alias": "jac", "proj_col": "value", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02347
train
v3
Schema: shipments (alias: vnob)(level, value, status, date) categories(id, code, level, amount) Task: Find id from shipments where salary exceeds the minimum value from categories for the same status. SQL:
SELECT id FROM shipments AS vnob WHERE salary > ( SELECT MIN(value) FROM categories AS egiv WHERE egiv.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "categories", "outer_alias": "vnob", "inner_alias": "egiv", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02348
train
v3
Schema: tasks (alias: znob)(amount, status, date, type) orders(status, name, date, level) Task: Retrieve amount from tasks with amount above the MAX(amount) of orders rows sharing the same status. SQL:
SELECT amount FROM tasks AS znob WHERE amount > ( SELECT MAX(amount) FROM orders AS kab WHERE kab.status = znob.status );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "amount", "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_02349
train
v1
Schema: employees (alias: bev)(value, date, type, id) orders(type, salary, value, date) Task: Select code from employees where level exists in orders for the same status. SQL:
SELECT code FROM employees AS bev WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.status = bev.status );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02350
train
v3
Schema: departments (alias: dov)(type, status, date, level) transactions(status, salary, name, type) Task: Retrieve amount from departments with salary above the SUM(salary) of transactions rows sharing the same id. SQL:
SELECT amount FROM departments AS dov WHERE salary > ( SELECT SUM(salary) FROM transactions AS gev WHERE gev.id = dov.id );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dov", "inner_alias": "gev", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02351
train
v1
Schema: requests (alias: ejof)(status, salary, level, value) regions(code, level, id, name) Task: Find amount from requests where level appears in regions entries with matching level. SQL:
SELECT amount FROM requests AS ejof WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.level = ejof.level );
{ "outer_table": "requests", "inner_table": "regions", "outer_alias": "ejof", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "level", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02352
train
v1
Schema: invoices (alias: fal)(value, id, type, amount) employees(id, name, code, status) Task: Find name from invoices where id appears in employees entries with matching code. SQL:
SELECT name FROM invoices AS fal WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.code = fal.code );
{ "outer_table": "invoices", "inner_table": "employees", "outer_alias": "fal", "inner_alias": "bev", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02353
train
v3
Schema: departments (alias: dov)(type, status, salary, code) accounts(type, level, amount, name) Task: Retrieve name from departments with value above the AVG(salary) of accounts rows sharing the same code. SQL:
SELECT name FROM departments AS dov WHERE value > ( SELECT AVG(salary) FROM accounts AS jac WHERE jac.code = dov.code );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02354
train
v3
Schema: staff (alias: xnob)(level, name, salary, status) requests(level, amount, id, name) Task: Retrieve amount from staff with amount above the SUM(salary) of requests rows sharing the same level. SQL:
SELECT amount FROM staff AS xnob WHERE amount > ( SELECT SUM(salary) FROM requests AS ejof WHERE ejof.level = xnob.level );
{ "outer_table": "staff", "inner_table": "requests", "outer_alias": "xnob", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02355
train
v2
Schema: staff (alias: xnob)(type, code, value, status) products(amount, status, level, salary) Task: Find amount from staff where a matching record exists in products with the same type. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = xnob.type );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "amount", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02356
train
v2
Schema: accounts (alias: jac)(level, date, id, amount) transactions(value, amount, salary, name) Task: Retrieve name from accounts that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = jac.code );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "jac", "inner_alias": "gev", "proj_col": "name", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02357
train
v3
Schema: accounts (alias: jac)(code, salary, level, name) transactions(name, code, salary, level) Task: Retrieve id from accounts with salary above the COUNT(amount) of transactions rows sharing the same level. SQL:
SELECT id FROM accounts AS jac WHERE salary > ( SELECT COUNT(amount) FROM transactions AS gev WHERE gev.level = jac.level );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "jac", "inner_alias": "gev", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02358
train
v1
Schema: departments (alias: dov)(code, level, salary, value) staff(value, code, type, salary) Task: Select id from departments where id exists in staff for the same code. SQL:
SELECT id FROM departments AS dov WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.code = dov.code );
{ "outer_table": "departments", "inner_table": "staff", "outer_alias": "dov", "inner_alias": "xnob", "proj_col": "id", "filter_col": "id", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02359
train
v2
Schema: departments (alias: dov)(status, date, type, level) employees(amount, value, code, salary) Task: Retrieve id from departments that have at least one corresponding entry in employees sharing the same status. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = dov.status );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "id", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02360
train
v1
Schema: customers (alias: lex)(name, type, code, level) branches(code, name, level, value) Task: Retrieve id from customers whose level is found in branches rows where id matches the outer record. SQL:
SELECT id FROM customers AS lex WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.id = lex.id );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "id", "filter_col": "level", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02361
train
v2
Schema: accounts (alias: jac)(code, level, date, status) managers(status, salary, level, date) Task: Find name from accounts where a matching record exists in managers with the same status. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = jac.status );
{ "outer_table": "accounts", "inner_table": "managers", "outer_alias": "jac", "inner_alias": "hac", "proj_col": "name", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02362
train
v3
Schema: orders (alias: kab)(id, value, date, code) schedules(name, value, code, type) Task: Retrieve salary from orders with value above the MAX(amount) of schedules rows sharing the same type. SQL:
SELECT salary FROM orders AS kab WHERE value > ( SELECT MAX(amount) FROM schedules AS vmob WHERE vmob.type = kab.type );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02363
train
v1
Schema: items (alias: ikob)(code, amount, salary, date) customers(name, status, level, id) Task: Select id from items where id exists in customers for the same code. SQL:
SELECT id FROM items AS ikob WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.code = ikob.code );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "id", "filter_col": "id", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02364
train
v3
Schema: accounts (alias: jac)(level, code, type, salary) orders(code, level, date, type) Task: Find value from accounts where salary exceeds the average value from orders for the same id. SQL:
SELECT value FROM accounts AS jac WHERE salary > ( SELECT AVG(value) FROM orders AS kab WHERE kab.id = jac.id );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02365
train
v2
Schema: orders (alias: kab)(type, status, amount, salary) departments(name, amount, level, date) Task: Retrieve id from orders that have at least one corresponding entry in departments sharing the same code. SQL:
SELECT id FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = kab.code );
{ "outer_table": "orders", "inner_table": "departments", "outer_alias": "kab", "inner_alias": "dov", "proj_col": "id", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02366
train
v1
Schema: requests (alias: ejof)(value, level, name, type) customers(code, status, level, salary) Task: Select value from requests where type exists in customers for the same id. SQL:
SELECT value FROM requests AS ejof WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.id = ejof.id );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "value", "filter_col": "type", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02367
train
v3
Schema: orders (alias: kab)(value, amount, code, level) categories(id, code, salary, status) Task: Retrieve id from orders with salary above the AVG(amount) of categories rows sharing the same id. SQL:
SELECT id FROM orders AS kab WHERE salary > ( SELECT AVG(amount) FROM categories AS egiv WHERE egiv.id = kab.id );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02368
train
v2
Schema: requests (alias: ejof)(amount, value, level, name) departments(salary, value, name, amount) Task: Find amount from requests where a matching record exists in departments with the same code. SQL:
SELECT amount FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = ejof.code );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "amount", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02369
train
v3
Schema: items (alias: ikob)(level, value, name, salary) orders(salary, value, amount, id) Task: Find name from items where value exceeds the minimum amount from orders for the same id. SQL:
SELECT name FROM items AS ikob WHERE value > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.id = ikob.id );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02370
train
v1
Schema: customers (alias: lex)(amount, name, value, salary) projects(name, id, value, code) Task: Retrieve value from customers whose status is found in projects rows where level matches the outer record. SQL:
SELECT value FROM customers AS lex WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.level = lex.level );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02371
train
v2
Schema: branches (alias: agov)(value, id, salary, status) managers(type, salary, level, date) Task: Retrieve code from branches that have at least one corresponding entry in managers sharing the same id. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = agov.id );
{ "outer_table": "branches", "inner_table": "managers", "outer_alias": "agov", "inner_alias": "hac", "proj_col": "code", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02372
train
v3
Schema: transactions (alias: gev)(code, level, amount, status) staff(name, level, code, id) Task: Find salary from transactions where amount exceeds the count of amount from staff for the same status. SQL:
SELECT salary FROM transactions AS gev WHERE amount > ( SELECT COUNT(amount) FROM staff AS xnob WHERE xnob.status = gev.status );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02373
train
v3
Schema: branches (alias: agov)(name, level, salary, amount) items(status, salary, amount, level) Task: Find salary from branches where salary exceeds the count of value from items for the same level. SQL:
SELECT salary FROM branches AS agov WHERE salary > ( SELECT COUNT(value) FROM items AS ikob WHERE ikob.level = agov.level );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02374
train
v2
Schema: branches (alias: agov)(value, id, date, level) customers(level, date, amount, value) Task: Find amount from branches where a matching record exists in customers with the same type. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = agov.type );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "amount", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02375
train
v1
Schema: products (alias: nad)(value, amount, level, code) accounts(value, amount, date, type) Task: Retrieve code from products whose id is found in accounts rows where level matches the outer record. SQL:
SELECT code FROM products AS nad WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.level = nad.level );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02376
train
v1
Schema: customers (alias: lex)(amount, date, salary, status) categories(level, code, amount, value) Task: Find salary from customers where id appears in categories entries with matching code. SQL:
SELECT salary FROM customers AS lex WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.code = lex.code );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "id", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02377
train
v3
Schema: regions (alias: okiv)(status, type, salary, name) invoices(level, type, value, status) Task: Find name from regions where salary exceeds the average value from invoices for the same id. SQL:
SELECT name FROM regions AS okiv WHERE salary > ( SELECT AVG(value) FROM invoices AS fal WHERE fal.id = okiv.id );
{ "outer_table": "regions", "inner_table": "invoices", "outer_alias": "okiv", "inner_alias": "fal", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02378
train
v1
Schema: products (alias: nad)(code, type, date, id) accounts(amount, type, name, id) Task: Find value from products where type appears in accounts entries with matching status. SQL:
SELECT value FROM products AS nad WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.status = nad.status );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02379
train
v2
Schema: projects (alias: uliv)(status, date, amount, value) invoices(date, value, salary, name) Task: Find value from projects where a matching record exists in invoices with the same level. SQL:
SELECT value FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = uliv.level );
{ "outer_table": "projects", "inner_table": "invoices", "outer_alias": "uliv", "inner_alias": "fal", "proj_col": "value", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02380
train
v3
Schema: tasks (alias: znob)(level, name, amount, id) employees(type, status, salary, date) Task: Retrieve value from tasks with value above the SUM(salary) of employees rows sharing the same type. SQL:
SELECT value FROM tasks AS znob WHERE value > ( SELECT SUM(salary) FROM employees AS bev WHERE bev.type = znob.type );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02381
train
v2
Schema: requests (alias: ejof)(id, date, type, value) categories(id, salary, level, status) Task: Find value from requests where a matching record exists in categories with the same level. SQL:
SELECT value FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = ejof.level );
{ "outer_table": "requests", "inner_table": "categories", "outer_alias": "ejof", "inner_alias": "egiv", "proj_col": "value", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02382
train
v2
Schema: schedules (alias: vmob)(code, amount, type, value) tasks(value, type, code, amount) Task: Find code from schedules where a matching record exists in tasks with the same code. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "code", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02383
train
v3
Schema: staff (alias: xnob)(amount, salary, date, id) invoices(amount, type, level, status) Task: Find salary from staff where amount exceeds the total amount from invoices for the same id. SQL:
SELECT salary FROM staff AS xnob WHERE amount > ( SELECT SUM(amount) FROM invoices AS fal WHERE fal.id = xnob.id );
{ "outer_table": "staff", "inner_table": "invoices", "outer_alias": "xnob", "inner_alias": "fal", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02384
train
v2
Schema: invoices (alias: fal)(amount, name, code, status) requests(salary, amount, code, status) Task: Find name from invoices where a matching record exists in requests with the same status. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = fal.status );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "name", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02385
train
v1
Schema: projects (alias: uliv)(type, salary, code, value) schedules(name, salary, id, date) Task: Select code from projects where id exists in schedules for the same level. SQL:
SELECT code FROM projects AS uliv WHERE id IN ( SELECT id FROM schedules AS vmob WHERE vmob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02386
train
v2
Schema: accounts (alias: jac)(name, value, level, id) employees(status, salary, amount, code) Task: Find id from accounts where a matching record exists in employees with the same level. SQL:
SELECT id FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = jac.level );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "id", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02387
train
v1
Schema: products (alias: nad)(status, id, name, value) employees(date, id, value, name) Task: Retrieve amount from products whose code is found in employees rows where type matches the outer record. SQL:
SELECT amount FROM products AS nad WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.type = nad.type );
{ "outer_table": "products", "inner_table": "employees", "outer_alias": "nad", "inner_alias": "bev", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02388
train
v2
Schema: customers (alias: lex)(salary, status, type, level) projects(date, level, type, value) Task: Retrieve id from customers that have at least one corresponding entry in projects sharing the same status. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = lex.status );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "id", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02389
train
v2
Schema: tasks (alias: znob)(name, salary, id, date) orders(status, amount, date, salary) Task: Find code from tasks where a matching record exists in orders with the same status. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = znob.status );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "code", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02390
train
v3
Schema: departments (alias: dov)(code, salary, type, value) invoices(salary, status, type, value) Task: Find salary from departments where amount exceeds the average value from invoices for the same type. SQL:
SELECT salary FROM departments AS dov WHERE amount > ( SELECT AVG(value) FROM invoices AS fal WHERE fal.type = dov.type );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "salary", "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_02391
train
v2
Schema: tasks (alias: znob)(id, level, code, type) categories(value, salary, date, id) Task: Find code from tasks where a matching record exists in categories with the same type. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = znob.type );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "code", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02392
train
v3
Schema: managers (alias: hac)(salary, name, type, status) regions(name, status, amount, type) Task: Find amount from managers where salary exceeds the total amount from regions for the same status. SQL:
SELECT amount FROM managers AS hac WHERE salary > ( SELECT SUM(amount) FROM regions AS okiv WHERE okiv.status = hac.status );
{ "outer_table": "managers", "inner_table": "regions", "outer_alias": "hac", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02393
train
v2
Schema: tasks (alias: znob)(id, name, amount, salary) sales(value, level, salary, name) Task: Retrieve code from tasks that have at least one corresponding entry in sales sharing the same id. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = znob.id );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "znob", "inner_alias": "cif", "proj_col": "code", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02394
train
v3
Schema: invoices (alias: fal)(salary, name, amount, status) tasks(amount, salary, level, value) Task: Find code from invoices where amount exceeds the average amount from tasks for the same code. SQL:
SELECT code FROM invoices AS fal WHERE amount > ( SELECT AVG(amount) FROM tasks AS znob WHERE znob.code = fal.code );
{ "outer_table": "invoices", "inner_table": "tasks", "outer_alias": "fal", "inner_alias": "znob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02395
train
v2
Schema: invoices (alias: fal)(value, salary, code, level) transactions(date, amount, status, value) Task: Retrieve id from invoices that have at least one corresponding entry in transactions sharing the same status. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = fal.status );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "id", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02396
train
v2
Schema: managers (alias: hac)(status, level, salary, amount) transactions(amount, name, id, level) Task: Retrieve code from managers that have at least one corresponding entry in transactions sharing the same status. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = hac.status );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "code", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02397
train
v1
Schema: tasks (alias: znob)(type, salary, status, date) categories(level, status, date, name) Task: Find value from tasks where id appears in categories entries with matching id. SQL:
SELECT value FROM tasks AS znob WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.id = znob.id );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "value", "filter_col": "id", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02398
train
v2
Schema: managers (alias: hac)(id, amount, level, status) categories(type, code, date, id) Task: Retrieve value from managers that have at least one corresponding entry in categories sharing the same code. SQL:
SELECT value FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = hac.code );
{ "outer_table": "managers", "inner_table": "categories", "outer_alias": "hac", "inner_alias": "egiv", "proj_col": "value", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02399
train