variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v2
Schema: categories (alias: egiv)(name, value, status, salary) sales(type, amount, id, value) Task: Find amount from categories where a matching record exists in sales with the same type. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = egiv.type );
{ "outer_table": "categories", "inner_table": "sales", "outer_alias": "egiv", "inner_alias": "cif", "proj_col": "amount", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10400
train
v3
Schema: categories (alias: egiv)(id, value, status, code) regions(salary, value, type, code) Task: Find code from categories where amount exceeds the minimum amount from regions for the same code. SQL:
SELECT code FROM categories AS egiv WHERE amount > ( SELECT MIN(amount) FROM regions AS okiv WHERE okiv.code = egiv.code );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10401
train
v2
Schema: regions (alias: okiv)(name, status, id, type) transactions(id, status, date, name) Task: Find value from regions where a matching record exists in transactions with the same type. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = okiv.type );
{ "outer_table": "regions", "inner_table": "transactions", "outer_alias": "okiv", "inner_alias": "gev", "proj_col": "value", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10402
train
v1
Schema: managers (alias: hac)(value, type, name, code) departments(amount, value, code, type) Task: Select salary from managers where level exists in departments for the same id. SQL:
SELECT salary FROM managers AS hac WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.id = hac.id );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10403
train
v3
Schema: employees (alias: bev)(value, code, name, id) regions(id, type, status, date) Task: Find name from employees where salary exceeds the minimum amount from regions for the same code. SQL:
SELECT name FROM employees AS bev WHERE salary > ( SELECT MIN(amount) FROM regions AS okiv WHERE okiv.code = bev.code );
{ "outer_table": "employees", "inner_table": "regions", "outer_alias": "bev", "inner_alias": "okiv", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10404
train
v2
Schema: transactions (alias: gev)(code, type, salary, date) requests(amount, level, date, status) Task: Retrieve salary from transactions that have at least one corresponding entry in requests sharing the same id. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = gev.id );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "salary", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10405
train
v3
Schema: transactions (alias: gev)(level, id, value, type) sales(status, amount, salary, id) Task: Retrieve amount from transactions with salary above the COUNT(value) of sales rows sharing the same type. SQL:
SELECT amount FROM transactions AS gev WHERE salary > ( SELECT COUNT(value) FROM sales AS cif WHERE cif.type = gev.type );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10406
train
v2
Schema: tasks (alias: znob)(name, level, date, amount) staff(name, code, id, date) Task: Retrieve name from tasks that have at least one corresponding entry in staff sharing the same status. SQL:
SELECT name 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": "name", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10407
train
v2
Schema: requests (alias: ejof)(type, name, code, value) projects(level, date, salary, type) Task: Retrieve name from requests that have at least one corresponding entry in projects sharing the same type. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = ejof.type );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "name", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10408
train
v1
Schema: sales (alias: cif)(salary, id, level, status) orders(id, salary, status, level) Task: Select amount from sales where status exists in orders for the same id. SQL:
SELECT amount FROM sales AS cif WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.id = cif.id );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10409
train
v2
Schema: customers (alias: lex)(name, salary, status, id) products(amount, type, salary, level) Task: Find id from customers where a matching record exists in products with the same code. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = lex.code );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "id", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10410
train
v2
Schema: invoices (alias: fal)(code, amount, date, level) managers(type, code, id, level) Task: Find name from invoices where a matching record exists in managers with the same code. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = fal.code );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "name", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10411
train
v2
Schema: orders (alias: kab)(type, code, amount, date) projects(salary, amount, name, type) Task: Find value from orders where a matching record exists in projects with the same id. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.id = kab.id );
{ "outer_table": "orders", "inner_table": "projects", "outer_alias": "kab", "inner_alias": "uliv", "proj_col": "value", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10412
train
v1
Schema: projects (alias: uliv)(date, name, salary, value) requests(date, id, status, code) Task: Find value from projects where level appears in requests entries with matching level. SQL:
SELECT value FROM projects AS uliv WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.level = uliv.level );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "value", "filter_col": "level", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10413
train
v1
Schema: managers (alias: hac)(amount, id, date, status) transactions(name, date, type, salary) Task: Find amount from managers where code appears in transactions entries with matching type. SQL:
SELECT amount FROM managers AS hac WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.type = hac.type );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10414
train
v2
Schema: branches (alias: agov)(type, salary, name, id) items(code, status, date, type) Task: Retrieve code from branches that have at least one corresponding entry in items sharing the same status. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = agov.status );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "code", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10415
train
v3
Schema: departments (alias: dov)(value, level, code, salary) products(status, id, salary, level) Task: Find value from departments where value exceeds the total amount from products for the same code. SQL:
SELECT value FROM departments AS dov WHERE value > ( SELECT SUM(amount) FROM products AS nad WHERE nad.code = dov.code );
{ "outer_table": "departments", "inner_table": "products", "outer_alias": "dov", "inner_alias": "nad", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10416
train
v3
Schema: managers (alias: hac)(value, code, type, amount) requests(level, salary, amount, status) Task: Retrieve value from managers with salary above the MAX(value) of requests rows sharing the same level. SQL:
SELECT value FROM managers AS hac WHERE salary > ( SELECT MAX(value) FROM requests AS ejof WHERE ejof.level = hac.level );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10417
train
v1
Schema: tasks (alias: znob)(code, date, amount, value) requests(level, status, value, id) Task: Retrieve name from tasks whose level is found in requests rows where type matches the outer record. SQL:
SELECT name FROM tasks AS znob WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.type = znob.type );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10418
train
v2
Schema: customers (alias: lex)(name, value, level, date) transactions(salary, code, level, id) Task: Retrieve amount from customers that have at least one corresponding entry in transactions sharing the same status. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = lex.status );
{ "outer_table": "customers", "inner_table": "transactions", "outer_alias": "lex", "inner_alias": "gev", "proj_col": "amount", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10419
train
v3
Schema: managers (alias: hac)(status, name, level, date) branches(type, name, level, value) Task: Retrieve id from managers with amount above the MIN(salary) of branches rows sharing the same type. SQL:
SELECT id 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": "id", "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_10420
train
v2
Schema: invoices (alias: fal)(id, value, salary, code) branches(code, date, level, salary) Task: Find id from invoices where a matching record exists in branches with the same code. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = fal.code );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "id", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10421
train
v3
Schema: regions (alias: okiv)(id, type, amount, code) customers(code, level, value, name) Task: Retrieve amount from regions with value above the AVG(value) of customers rows sharing the same status. SQL:
SELECT amount FROM regions AS okiv WHERE value > ( SELECT AVG(value) FROM customers AS lex WHERE lex.status = okiv.status );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10422
train
v3
Schema: staff (alias: xnob)(name, date, amount, code) categories(date, value, id, name) Task: Find salary from staff where salary exceeds the average value from categories for the same code. SQL:
SELECT salary FROM staff AS xnob WHERE salary > ( SELECT AVG(value) FROM categories AS egiv WHERE egiv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10423
train
v3
Schema: sales (alias: cif)(amount, code, status, name) products(status, salary, type, code) Task: Find id from sales where amount exceeds the total amount from products for the same id. SQL:
SELECT id FROM sales AS cif WHERE amount > ( SELECT SUM(amount) FROM products AS nad WHERE nad.id = cif.id );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10424
train
v3
Schema: products (alias: nad)(amount, type, date, value) tasks(salary, code, amount, id) Task: Find amount from products where amount exceeds the minimum value from tasks for the same status. SQL:
SELECT amount FROM products AS nad WHERE amount > ( SELECT MIN(value) FROM tasks AS znob WHERE znob.status = nad.status );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10425
train
v2
Schema: managers (alias: hac)(value, type, name, date) sales(id, date, amount, salary) Task: Retrieve code from managers that have at least one corresponding entry in sales sharing the same status. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = hac.status );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "code", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10426
train
v2
Schema: accounts (alias: jac)(code, level, type, name) projects(id, name, level, amount) Task: Find id from accounts where a matching record exists in projects with the same status. SQL:
SELECT id FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = jac.status );
{ "outer_table": "accounts", "inner_table": "projects", "outer_alias": "jac", "inner_alias": "uliv", "proj_col": "id", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10427
train
v3
Schema: products (alias: nad)(salary, level, name, value) schedules(amount, level, status, date) Task: Retrieve salary from products with value above the COUNT(value) of schedules rows sharing the same id. SQL:
SELECT salary FROM products AS nad WHERE value > ( SELECT COUNT(value) FROM schedules AS vmob WHERE vmob.id = nad.id );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10428
train
v2
Schema: accounts (alias: jac)(amount, type, code, date) categories(level, name, salary, status) Task: Find name from accounts where a matching record exists in categories with the same level. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = jac.level );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "jac", "inner_alias": "egiv", "proj_col": "name", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10429
train
v2
Schema: items (alias: ikob)(type, name, id, amount) requests(level, amount, id, type) Task: Retrieve id from items that have at least one corresponding entry in requests sharing the same status. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = ikob.status );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "ikob", "inner_alias": "ejof", "proj_col": "id", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10430
train
v2
Schema: employees (alias: bev)(amount, level, type, date) schedules(status, value, id, type) Task: Find amount from employees where a matching record exists in schedules with the same type. SQL:
SELECT amount 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": "amount", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10431
train
v1
Schema: branches (alias: agov)(date, id, status, salary) items(salary, name, status, level) Task: Select salary from branches where code exists in items for the same code. SQL:
SELECT salary FROM branches AS agov WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.code = agov.code );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10432
train
v2
Schema: regions (alias: okiv)(salary, type, level, code) shipments(id, salary, code, level) Task: Retrieve value from regions that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = okiv.code );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "okiv", "inner_alias": "vnob", "proj_col": "value", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10433
train
v2
Schema: employees (alias: bev)(type, name, code, id) categories(type, code, salary, id) Task: Retrieve name from employees that have at least one corresponding entry in categories sharing the same type. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = bev.type );
{ "outer_table": "employees", "inner_table": "categories", "outer_alias": "bev", "inner_alias": "egiv", "proj_col": "name", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10434
train
v2
Schema: transactions (alias: gev)(amount, date, type, value) accounts(id, code, name, level) 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_10435
train
v1
Schema: orders (alias: kab)(id, value, amount, type) sales(status, level, code, value) Task: Retrieve salary from orders whose type is found in sales rows where code matches the outer record. SQL:
SELECT salary FROM orders AS kab WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.code = kab.code );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10436
train
v3
Schema: categories (alias: egiv)(name, id, type, value) branches(level, salary, amount, id) Task: Find id from categories where salary exceeds the average salary from branches for the same type. SQL:
SELECT id FROM categories AS egiv WHERE salary > ( SELECT AVG(salary) FROM branches AS agov WHERE agov.type = egiv.type );
{ "outer_table": "categories", "inner_table": "branches", "outer_alias": "egiv", "inner_alias": "agov", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10437
train
v3
Schema: products (alias: nad)(name, date, salary, amount) customers(id, status, amount, code) Task: Retrieve value from products with salary above the SUM(amount) of customers rows sharing the same status. SQL:
SELECT value FROM products AS nad WHERE salary > ( SELECT SUM(amount) FROM customers AS lex WHERE lex.status = nad.status );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10438
train
v3
Schema: requests (alias: ejof)(date, level, salary, value) regions(status, level, code, amount) Task: Retrieve salary from requests with value above the SUM(salary) of regions rows sharing the same level. SQL:
SELECT salary FROM requests AS ejof WHERE value > ( SELECT SUM(salary) FROM regions AS okiv WHERE okiv.level = ejof.level );
{ "outer_table": "requests", "inner_table": "regions", "outer_alias": "ejof", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10439
train
v3
Schema: orders (alias: kab)(value, name, date, level) requests(value, name, salary, type) Task: Find amount from orders where salary exceeds the average amount from requests for the same type. SQL:
SELECT amount FROM orders AS kab WHERE salary > ( SELECT AVG(amount) FROM requests AS ejof WHERE ejof.type = kab.type );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10440
train
v3
Schema: staff (alias: xnob)(type, code, name, amount) orders(date, type, salary, amount) Task: Retrieve name from staff with amount above the SUM(amount) of orders rows sharing the same status. SQL:
SELECT name FROM staff AS xnob WHERE amount > ( SELECT SUM(amount) FROM orders AS kab WHERE kab.status = xnob.status );
{ "outer_table": "staff", "inner_table": "orders", "outer_alias": "xnob", "inner_alias": "kab", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10441
train
v3
Schema: categories (alias: egiv)(salary, status, id, date) requests(name, id, salary, type) Task: Find value from categories where amount exceeds the minimum salary from requests for the same status. SQL:
SELECT value FROM categories AS egiv WHERE amount > ( SELECT MIN(salary) FROM requests AS ejof WHERE ejof.status = egiv.status );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "egiv", "inner_alias": "ejof", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10442
train
v2
Schema: categories (alias: egiv)(name, level, salary, type) projects(level, code, id, status) Task: Find id from categories where a matching record exists in projects with the same code. SQL:
SELECT id FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = egiv.code );
{ "outer_table": "categories", "inner_table": "projects", "outer_alias": "egiv", "inner_alias": "uliv", "proj_col": "id", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10443
train
v2
Schema: employees (alias: bev)(status, date, salary, id) tasks(level, status, type, salary) Task: Find salary from employees where a matching record exists in tasks with the same id. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = bev.id );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "salary", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10444
train
v3
Schema: departments (alias: dov)(amount, value, type, level) schedules(type, status, id, amount) Task: Retrieve salary from departments with amount above the MIN(salary) of schedules rows sharing the same status. SQL:
SELECT salary FROM departments AS dov WHERE amount > ( SELECT MIN(salary) FROM schedules AS vmob WHERE vmob.status = dov.status );
{ "outer_table": "departments", "inner_table": "schedules", "outer_alias": "dov", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10445
train
v3
Schema: managers (alias: hac)(date, amount, type, level) items(level, name, id, salary) Task: Find name from managers where value exceeds the count of salary from items for the same code. SQL:
SELECT name FROM managers AS hac WHERE value > ( SELECT COUNT(salary) FROM items AS ikob WHERE ikob.code = hac.code );
{ "outer_table": "managers", "inner_table": "items", "outer_alias": "hac", "inner_alias": "ikob", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10446
train
v2
Schema: requests (alias: ejof)(value, name, salary, date) shipments(status, code, name, level) Task: Retrieve name from requests that have at least one corresponding entry in shipments sharing the same id. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ejof", "inner_alias": "vnob", "proj_col": "name", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10447
train
v1
Schema: items (alias: ikob)(name, amount, salary, level) transactions(amount, name, status, type) Task: Retrieve value from items whose status is found in transactions rows where status matches the outer record. SQL:
SELECT value FROM items AS ikob WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.status = ikob.status );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "ikob", "inner_alias": "gev", "proj_col": "value", "filter_col": "status", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10448
train
v1
Schema: sales (alias: cif)(level, date, amount, status) items(status, level, id, amount) Task: Select amount from sales where type exists in items for the same type. SQL:
SELECT amount FROM sales AS cif WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.type = cif.type );
{ "outer_table": "sales", "inner_table": "items", "outer_alias": "cif", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10449
train
v3
Schema: schedules (alias: vmob)(name, date, level, code) orders(value, type, date, status) Task: Find id from schedules where value exceeds the minimum value from orders for the same type. SQL:
SELECT id FROM schedules AS vmob WHERE value > ( SELECT MIN(value) FROM orders AS kab WHERE kab.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "orders", "outer_alias": "vmob", "inner_alias": "kab", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10450
train
v1
Schema: branches (alias: agov)(id, amount, date, type) items(date, type, amount, value) Task: Select value from branches where id exists in items for the same type. SQL:
SELECT value FROM branches AS agov WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.type = agov.type );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10451
train
v2
Schema: items (alias: ikob)(code, level, id, amount) employees(value, id, type, level) Task: Retrieve id from items that have at least one corresponding entry in employees sharing the same level. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = ikob.level );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "id", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10452
train
v3
Schema: items (alias: ikob)(name, level, id, code) accounts(level, salary, code, status) Task: Retrieve id from items with amount above the COUNT(amount) of accounts rows sharing the same code. SQL:
SELECT id FROM items AS ikob WHERE amount > ( SELECT COUNT(amount) FROM accounts AS jac WHERE jac.code = ikob.code );
{ "outer_table": "items", "inner_table": "accounts", "outer_alias": "ikob", "inner_alias": "jac", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10453
train
v1
Schema: transactions (alias: gev)(code, value, status, name) regions(date, salary, code, level) Task: Retrieve name from transactions whose status is found in regions rows where code matches the outer record. SQL:
SELECT name FROM transactions AS gev WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.code = gev.code );
{ "outer_table": "transactions", "inner_table": "regions", "outer_alias": "gev", "inner_alias": "okiv", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10454
train
v1
Schema: transactions (alias: gev)(id, code, type, amount) requests(code, level, id, amount) Task: Select amount from transactions where type exists in requests for the same status. SQL:
SELECT amount FROM transactions AS gev WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.status = gev.status );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "type", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10455
train
v3
Schema: employees (alias: bev)(date, amount, code, level) managers(status, level, date, value) Task: Retrieve value from employees with amount above the SUM(salary) of managers rows sharing the same level. SQL:
SELECT value FROM employees AS bev WHERE amount > ( SELECT SUM(salary) FROM managers AS hac WHERE hac.level = bev.level );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "bev", "inner_alias": "hac", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10456
train
v3
Schema: staff (alias: xnob)(level, salary, code, amount) managers(value, date, id, amount) Task: Retrieve id from staff with salary above the SUM(amount) of managers rows sharing the same type. SQL:
SELECT id FROM staff AS xnob WHERE salary > ( SELECT SUM(amount) FROM managers AS hac WHERE hac.type = xnob.type );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "xnob", "inner_alias": "hac", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10457
train
v1
Schema: orders (alias: kab)(name, salary, value, id) employees(value, salary, name, status) Task: Find value from orders where code appears in employees entries with matching type. SQL:
SELECT value FROM orders AS kab WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.type = kab.type );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10458
train
v1
Schema: categories (alias: egiv)(salary, value, code, name) transactions(salary, type, amount, value) Task: Find amount from categories where status appears in transactions entries with matching level. SQL:
SELECT amount FROM categories AS egiv WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.level = egiv.level );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "egiv", "inner_alias": "gev", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10459
train
v2
Schema: staff (alias: xnob)(name, id, status, type) products(status, amount, value, type) Task: Retrieve name from staff that have at least one corresponding entry in products sharing the same status. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = xnob.status );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "name", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10460
train
v2
Schema: categories (alias: egiv)(value, code, amount, type) accounts(type, code, level, value) Task: Retrieve code from categories that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = egiv.code );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "egiv", "inner_alias": "jac", "proj_col": "code", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10461
train
v1
Schema: schedules (alias: vmob)(date, salary, value, status) tasks(code, date, status, type) Task: Retrieve value from schedules whose type is found in tasks rows where level matches the outer record. SQL:
SELECT value FROM schedules AS vmob WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "value", "filter_col": "type", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10462
train
v1
Schema: schedules (alias: vmob)(id, status, name, salary) requests(level, date, name, amount) Task: Retrieve value from schedules whose code is found in requests rows where type matches the outer record. SQL:
SELECT value FROM schedules AS vmob WHERE code IN ( SELECT code FROM requests AS ejof WHERE ejof.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "requests", "outer_alias": "vmob", "inner_alias": "ejof", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10463
train
v3
Schema: managers (alias: hac)(name, date, amount, code) orders(salary, type, date, id) Task: Retrieve value from managers with amount above the MAX(value) of orders rows sharing the same code. SQL:
SELECT value FROM managers AS hac WHERE amount > ( SELECT MAX(value) FROM orders AS kab WHERE kab.code = hac.code );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10464
train
v2
Schema: items (alias: ikob)(name, date, amount, id) employees(salary, type, date, code) Task: Retrieve amount from items that have at least one corresponding entry in employees sharing the same level. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = ikob.level );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "amount", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10465
train
v2
Schema: employees (alias: bev)(status, amount, value, id) regions(code, type, amount, date) Task: Find salary from employees where a matching record exists in regions with the same status. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = bev.status );
{ "outer_table": "employees", "inner_table": "regions", "outer_alias": "bev", "inner_alias": "okiv", "proj_col": "salary", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10466
train
v3
Schema: products (alias: nad)(name, id, date, code) shipments(date, level, type, id) Task: Find id from products where salary exceeds the maximum amount from shipments for the same id. SQL:
SELECT id FROM products AS nad WHERE salary > ( SELECT MAX(amount) FROM shipments AS vnob WHERE vnob.id = nad.id );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10467
train
v3
Schema: managers (alias: hac)(status, name, code, type) orders(value, amount, date, code) Task: Find code from managers where value exceeds the minimum salary from orders for the same status. SQL:
SELECT code FROM managers AS hac WHERE value > ( SELECT MIN(salary) FROM orders AS kab WHERE kab.status = hac.status );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10468
train
v3
Schema: tasks (alias: znob)(value, date, level, amount) transactions(id, type, salary, code) Task: Retrieve salary from tasks with amount above the COUNT(value) of transactions rows sharing the same code. SQL:
SELECT salary FROM tasks AS znob WHERE amount > ( SELECT COUNT(value) FROM transactions AS gev WHERE gev.code = znob.code );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10469
train
v3
Schema: regions (alias: okiv)(id, level, date, type) sales(status, id, value, salary) Task: Find amount from regions where salary exceeds the minimum salary from sales for the same code. SQL:
SELECT amount FROM regions AS okiv WHERE salary > ( SELECT MIN(salary) FROM sales AS cif WHERE cif.code = okiv.code );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10470
train
v3
Schema: employees (alias: bev)(code, name, id, type) staff(type, level, id, name) Task: Find salary from employees where amount exceeds the maximum amount from staff for the same status. SQL:
SELECT salary FROM employees AS bev WHERE amount > ( SELECT MAX(amount) FROM staff AS xnob WHERE xnob.status = bev.status );
{ "outer_table": "employees", "inner_table": "staff", "outer_alias": "bev", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10471
train
v3
Schema: tasks (alias: znob)(level, code, amount, name) accounts(level, date, status, value) Task: Retrieve code from tasks with salary above the COUNT(amount) of accounts rows sharing the same level. SQL:
SELECT code FROM tasks AS znob WHERE salary > ( SELECT COUNT(amount) FROM accounts AS jac WHERE jac.level = znob.level );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10472
train
v3
Schema: shipments (alias: vnob)(salary, id, status, name) orders(id, value, status, code) Task: Find salary from shipments where amount exceeds the count of value from orders for the same type. SQL:
SELECT salary FROM shipments AS vnob WHERE amount > ( SELECT COUNT(value) FROM orders AS kab WHERE kab.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10473
train
v1
Schema: requests (alias: ejof)(code, date, amount, level) schedules(status, id, date, value) Task: Select code from requests where level exists in schedules for the same id. SQL:
SELECT code FROM requests AS ejof WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "schedules", "outer_alias": "ejof", "inner_alias": "vmob", "proj_col": "code", "filter_col": "level", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10474
train
v2
Schema: shipments (alias: vnob)(id, name, value, amount) products(id, amount, name, level) Task: Find value from shipments where a matching record exists in products with the same id. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "value", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10475
train
v2
Schema: items (alias: ikob)(type, salary, status, code) shipments(type, salary, amount, date) Task: Retrieve name from items that have at least one corresponding entry in shipments sharing the same level. SQL:
SELECT name FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.level = ikob.level );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "name", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10476
train
v1
Schema: accounts (alias: jac)(level, type, name, status) transactions(amount, name, code, id) Task: Find value from accounts where status appears in transactions entries with matching status. SQL:
SELECT value FROM accounts AS jac WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.status = jac.status );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "jac", "inner_alias": "gev", "proj_col": "value", "filter_col": "status", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10477
train
v2
Schema: schedules (alias: vmob)(amount, date, status, name) invoices(salary, amount, level, status) Task: Retrieve name from schedules that have at least one corresponding entry in invoices sharing the same code. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "vmob", "inner_alias": "fal", "proj_col": "name", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10478
train
v2
Schema: items (alias: ikob)(code, name, type, value) sales(date, status, salary, code) Task: Retrieve code from items that have at least one corresponding entry in sales sharing the same id. SQL:
SELECT code FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = ikob.id );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "code", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10479
train
v3
Schema: categories (alias: egiv)(type, level, date, salary) employees(type, name, date, value) Task: Find amount from categories where salary exceeds the total value from employees for the same id. SQL:
SELECT amount FROM categories AS egiv WHERE salary > ( SELECT SUM(value) FROM employees AS bev WHERE bev.id = egiv.id );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "egiv", "inner_alias": "bev", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10480
train
v2
Schema: customers (alias: lex)(id, level, code, status) branches(code, name, type, amount) Task: Retrieve salary from customers that have at least one corresponding entry in branches sharing the same type. SQL:
SELECT salary 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": "salary", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10481
train
v1
Schema: schedules (alias: vmob)(salary, value, date, name) requests(code, type, date, salary) Task: Retrieve code from schedules whose code is found in requests rows where id matches the outer record. SQL:
SELECT code FROM schedules AS vmob WHERE code IN ( SELECT code FROM requests AS ejof WHERE ejof.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "requests", "outer_alias": "vmob", "inner_alias": "ejof", "proj_col": "code", "filter_col": "code", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10482
train
v3
Schema: accounts (alias: jac)(amount, id, type, name) orders(status, type, id, value) Task: Retrieve amount from accounts with value above the SUM(salary) of orders rows sharing the same level. SQL:
SELECT amount FROM accounts AS jac WHERE value > ( SELECT SUM(salary) FROM orders AS kab WHERE kab.level = jac.level );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10483
train
v3
Schema: employees (alias: bev)(level, salary, amount, name) requests(id, date, name, amount) Task: Find value from employees where salary exceeds the maximum salary from requests for the same type. SQL:
SELECT value FROM employees AS bev WHERE salary > ( SELECT MAX(salary) 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": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10484
train
v2
Schema: requests (alias: ejof)(code, status, amount, salary) sales(id, code, level, amount) Task: Find amount from requests where a matching record exists in sales with the same id. SQL:
SELECT amount FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = ejof.id );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "amount", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10485
train
v3
Schema: departments (alias: dov)(id, date, name, type) staff(type, name, status, salary) Task: Find value from departments where value exceeds the count of salary from staff for the same level. SQL:
SELECT value FROM departments AS dov WHERE value > ( SELECT COUNT(salary) FROM staff AS xnob WHERE xnob.level = dov.level );
{ "outer_table": "departments", "inner_table": "staff", "outer_alias": "dov", "inner_alias": "xnob", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10486
train
v2
Schema: products (alias: nad)(code, name, status, level) branches(name, salary, status, type) Task: Find code from products where a matching record exists in branches with the same status. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = nad.status );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "code", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10487
train
v1
Schema: customers (alias: lex)(id, salary, status, code) sales(code, date, id, name) Task: Find name from customers where code appears in sales entries with matching status. SQL:
SELECT name FROM customers AS lex WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.status = lex.status );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10488
train
v1
Schema: customers (alias: lex)(level, date, value, code) tasks(salary, name, date, type) Task: Find code from customers where level appears in tasks entries with matching code. SQL:
SELECT code FROM customers AS lex WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.code = lex.code );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10489
train
v3
Schema: projects (alias: uliv)(status, code, name, level) sales(level, date, salary, status) Task: Find id from projects where amount exceeds the maximum amount from sales for the same type. SQL:
SELECT id FROM projects AS uliv WHERE amount > ( SELECT MAX(amount) FROM sales AS cif WHERE cif.type = uliv.type );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10490
train
v1
Schema: products (alias: nad)(amount, salary, type, level) transactions(amount, id, date, status) Task: Retrieve id from products whose type is found in transactions rows where id matches the outer record. SQL:
SELECT id FROM products AS nad WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.id = nad.id );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "id", "filter_col": "type", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10491
train
v2
Schema: products (alias: nad)(date, id, type, level) categories(type, value, amount, salary) Task: Retrieve code from products that have at least one corresponding entry in categories sharing the same status. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = nad.status );
{ "outer_table": "products", "inner_table": "categories", "outer_alias": "nad", "inner_alias": "egiv", "proj_col": "code", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10492
train
v3
Schema: requests (alias: ejof)(level, salary, status, date) branches(date, value, type, salary) Task: Retrieve amount from requests with amount above the AVG(value) of branches rows sharing the same level. SQL:
SELECT amount FROM requests AS ejof WHERE amount > ( SELECT AVG(value) FROM branches AS agov WHERE agov.level = ejof.level );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10493
train
v3
Schema: products (alias: nad)(value, date, id, status) departments(status, level, value, amount) Task: Find amount from products where value exceeds the average salary from departments for the same id. SQL:
SELECT amount FROM products AS nad WHERE value > ( SELECT AVG(salary) FROM departments AS dov WHERE dov.id = nad.id );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10494
train
v3
Schema: sales (alias: cif)(level, date, amount, id) requests(amount, status, name, salary) Task: Find amount from sales where value exceeds the total salary from requests for the same id. SQL:
SELECT amount FROM sales AS cif WHERE value > ( SELECT SUM(salary) FROM requests AS ejof WHERE ejof.id = cif.id );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10495
train
v1
Schema: tasks (alias: znob)(salary, value, name, amount) projects(code, salary, amount, name) Task: Retrieve salary from tasks whose code is found in projects rows where id matches the outer record. SQL:
SELECT salary FROM tasks AS znob WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.id = znob.id );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10496
train
v2
Schema: accounts (alias: jac)(name, salary, level, id) projects(name, salary, amount, value) Task: Find amount from accounts where a matching record exists in projects with the same status. SQL:
SELECT amount FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = jac.status );
{ "outer_table": "accounts", "inner_table": "projects", "outer_alias": "jac", "inner_alias": "uliv", "proj_col": "amount", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10497
train
v2
Schema: items (alias: ikob)(level, amount, salary, status) products(date, code, type, name) Task: Retrieve salary from items that have at least one corresponding entry in products sharing the same type. SQL:
SELECT salary FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = ikob.type );
{ "outer_table": "items", "inner_table": "products", "outer_alias": "ikob", "inner_alias": "nad", "proj_col": "salary", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10498
train
v3
Schema: items (alias: ikob)(value, level, code, name) transactions(type, salary, amount, id) Task: Retrieve id from items with salary above the MIN(salary) of transactions rows sharing the same id. SQL:
SELECT id FROM items AS ikob WHERE salary > ( SELECT MIN(salary) FROM transactions AS gev WHERE gev.id = ikob.id );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "ikob", "inner_alias": "gev", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10499
train