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: sales (alias: cif)(code, salary, level, id) shipments(status, name, salary, code) Task: Find name from sales where a matching record exists in shipments with the same type. SQL:
SELECT name FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = cif.type );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "name", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07900
train
v3
Schema: invoices (alias: fal)(type, date, name, status) projects(name, id, salary, amount) Task: Retrieve name from invoices with amount above the COUNT(value) of projects rows sharing the same id. SQL:
SELECT name FROM invoices AS fal WHERE amount > ( SELECT COUNT(value) FROM projects AS uliv WHERE uliv.id = fal.id );
{ "outer_table": "invoices", "inner_table": "projects", "outer_alias": "fal", "inner_alias": "uliv", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07901
train
v1
Schema: accounts (alias: jac)(status, amount, salary, code) categories(status, salary, date, name) Task: Select value from accounts where level exists in categories for the same code. SQL:
SELECT value FROM accounts AS jac WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.code = jac.code );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "jac", "inner_alias": "egiv", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07902
train
v2
Schema: invoices (alias: fal)(name, level, amount, code) categories(amount, name, date, value) Task: Retrieve id from invoices that have at least one corresponding entry in categories sharing the same status. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = fal.status );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "id", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07903
train
v1
Schema: branches (alias: agov)(value, name, id, amount) requests(value, id, date, amount) Task: Select id from branches where code exists in requests for the same status. SQL:
SELECT id FROM branches AS agov WHERE code IN ( SELECT code FROM requests AS ejof WHERE ejof.status = agov.status );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "id", "filter_col": "code", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07904
train
v3
Schema: managers (alias: hac)(amount, level, salary, status) sales(value, name, level, type) Task: Find value from managers where amount exceeds the maximum value from sales for the same status. SQL:
SELECT value FROM managers AS hac WHERE amount > ( SELECT MAX(value) FROM sales AS cif WHERE cif.status = hac.status );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07905
train
v3
Schema: shipments (alias: vnob)(amount, date, id, level) products(date, id, amount, level) Task: Find id from shipments where salary exceeds the count of amount from products for the same code. SQL:
SELECT id FROM shipments AS vnob WHERE salary > ( SELECT COUNT(amount) FROM products AS nad WHERE nad.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07906
train
v3
Schema: categories (alias: egiv)(level, name, type, value) managers(status, date, value, name) Task: Find value from categories where salary exceeds the total salary from managers for the same code. SQL:
SELECT value FROM categories AS egiv WHERE salary > ( SELECT SUM(salary) FROM managers AS hac WHERE hac.code = egiv.code );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07907
train
v1
Schema: accounts (alias: jac)(type, name, value, amount) items(id, level, amount, value) Task: Find code from accounts where id appears in items entries with matching status. SQL:
SELECT code FROM accounts AS jac WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07908
train
v2
Schema: schedules (alias: vmob)(code, status, level, salary) sales(amount, date, name, status) Task: Find salary from schedules where a matching record exists in sales with the same code. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "vmob", "inner_alias": "cif", "proj_col": "salary", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07909
train
v3
Schema: projects (alias: uliv)(id, value, type, level) staff(level, salary, name, date) Task: Retrieve value from projects with salary above the MIN(salary) of staff rows sharing the same type. SQL:
SELECT value FROM projects AS uliv WHERE salary > ( SELECT MIN(salary) FROM staff AS xnob WHERE xnob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07910
train
v1
Schema: accounts (alias: jac)(type, date, status, code) shipments(salary, code, type, name) Task: Find id from accounts where status appears in shipments entries with matching type. SQL:
SELECT id FROM accounts AS jac WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07911
train
v3
Schema: regions (alias: okiv)(id, code, type, date) requests(level, date, salary, code) Task: Retrieve code from regions with value above the SUM(salary) of requests rows sharing the same code. SQL:
SELECT code FROM regions AS okiv WHERE value > ( SELECT SUM(salary) FROM requests AS ejof WHERE ejof.code = okiv.code );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07912
train
v2
Schema: employees (alias: bev)(id, amount, date, code) categories(salary, value, date, status) Task: Find code from employees where a matching record exists in categories with the same level. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = bev.level );
{ "outer_table": "employees", "inner_table": "categories", "outer_alias": "bev", "inner_alias": "egiv", "proj_col": "code", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07913
train
v3
Schema: products (alias: nad)(value, name, status, type) branches(code, type, status, level) Task: Find amount from products where amount exceeds the count of salary from branches for the same status. SQL:
SELECT amount FROM products AS nad WHERE amount > ( SELECT COUNT(salary) FROM branches AS agov WHERE agov.status = nad.status );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07914
train
v3
Schema: schedules (alias: vmob)(name, status, date, amount) staff(amount, id, date, name) Task: Retrieve id from schedules with amount above the AVG(value) of staff rows sharing the same id. SQL:
SELECT id FROM schedules AS vmob WHERE amount > ( SELECT AVG(value) FROM staff AS xnob WHERE xnob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07915
train
v3
Schema: transactions (alias: gev)(amount, salary, type, id) projects(amount, code, value, id) Task: Find salary from transactions where salary exceeds the minimum amount from projects for the same id. SQL:
SELECT salary FROM transactions AS gev WHERE salary > ( SELECT MIN(amount) FROM projects AS uliv WHERE uliv.id = gev.id );
{ "outer_table": "transactions", "inner_table": "projects", "outer_alias": "gev", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07916
train
v1
Schema: branches (alias: agov)(name, code, date, level) projects(name, id, salary, level) Task: Find value from branches where level appears in projects entries with matching code. SQL:
SELECT value FROM branches AS agov WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.code = agov.code );
{ "outer_table": "branches", "inner_table": "projects", "outer_alias": "agov", "inner_alias": "uliv", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07917
train
v3
Schema: staff (alias: xnob)(type, value, level, amount) shipments(salary, id, name, amount) Task: Find salary from staff where salary exceeds the minimum salary from shipments for the same status. SQL:
SELECT salary FROM staff AS xnob WHERE salary > ( SELECT MIN(salary) FROM shipments AS vnob WHERE vnob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07918
train
v2
Schema: branches (alias: agov)(level, value, id, code) accounts(name, type, level, status) Task: Retrieve id from branches that have at least one corresponding entry in accounts sharing the same type. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = agov.type );
{ "outer_table": "branches", "inner_table": "accounts", "outer_alias": "agov", "inner_alias": "jac", "proj_col": "id", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07919
train
v2
Schema: managers (alias: hac)(amount, value, date, level) categories(name, date, status, level) Task: Retrieve id from managers that have at least one corresponding entry in categories sharing the same type. SQL:
SELECT id FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = hac.type );
{ "outer_table": "managers", "inner_table": "categories", "outer_alias": "hac", "inner_alias": "egiv", "proj_col": "id", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07920
train
v1
Schema: categories (alias: egiv)(amount, code, name, salary) invoices(value, salary, amount, code) Task: Find value from categories where level appears in invoices entries with matching status. SQL:
SELECT value FROM categories AS egiv WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.status = egiv.status );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07921
train
v1
Schema: tasks (alias: znob)(status, name, type, amount) items(type, value, code, salary) Task: Retrieve amount from tasks whose status is found in items rows where type matches the outer record. SQL:
SELECT amount FROM tasks AS znob WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.type = znob.type );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07922
train
v3
Schema: tasks (alias: znob)(date, type, status, amount) categories(level, id, amount, value) Task: Retrieve amount from tasks with salary above the MAX(amount) of categories rows sharing the same id. SQL:
SELECT amount FROM tasks AS znob WHERE salary > ( SELECT MAX(amount) FROM categories AS egiv WHERE egiv.id = znob.id );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07923
train
v3
Schema: managers (alias: hac)(name, salary, value, status) departments(value, code, id, level) Task: Find value from managers where amount exceeds the average amount from departments for the same type. SQL:
SELECT value FROM managers AS hac WHERE amount > ( SELECT AVG(amount) FROM departments AS dov WHERE dov.type = hac.type );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07924
train
v3
Schema: projects (alias: uliv)(code, type, amount, status) sales(date, code, value, level) Task: Retrieve id from projects with salary above the SUM(salary) of sales rows sharing the same status. SQL:
SELECT id FROM projects AS uliv WHERE salary > ( SELECT SUM(salary) FROM sales AS cif WHERE cif.status = uliv.status );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07925
train
v1
Schema: departments (alias: dov)(name, id, code, date) orders(status, type, amount, date) Task: Retrieve name from departments whose status is found in orders rows where type matches the outer record. SQL:
SELECT name FROM departments AS dov WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.type = dov.type );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dov", "inner_alias": "kab", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07926
train
v3
Schema: items (alias: ikob)(value, date, level, status) branches(status, id, level, name) Task: Find amount from items where value exceeds the count of salary from branches for the same code. SQL:
SELECT amount FROM items AS ikob WHERE value > ( SELECT COUNT(salary) FROM branches AS agov WHERE agov.code = ikob.code );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07927
train
v2
Schema: tasks (alias: znob)(level, status, code, amount) customers(status, code, value, amount) Task: Find code from tasks where a matching record exists in customers with the same level. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = znob.level );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "znob", "inner_alias": "lex", "proj_col": "code", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07928
train
v1
Schema: transactions (alias: gev)(value, type, code, status) projects(status, code, salary, value) Task: Find name from transactions where code appears in projects entries with matching status. SQL:
SELECT name FROM transactions AS gev WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.status = gev.status );
{ "outer_table": "transactions", "inner_table": "projects", "outer_alias": "gev", "inner_alias": "uliv", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07929
train
v2
Schema: shipments (alias: vnob)(salary, level, amount, name) employees(level, name, date, value) Task: Find amount from shipments where a matching record exists in employees with the same id. SQL:
SELECT amount FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "amount", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07930
train
v1
Schema: items (alias: ikob)(name, salary, status, id) customers(salary, amount, id, code) Task: Select amount from items where status exists in customers for the same code. SQL:
SELECT amount FROM items AS ikob WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.code = ikob.code );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "amount", "filter_col": "status", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07931
train
v2
Schema: staff (alias: xnob)(date, id, name, status) shipments(salary, status, code, date) Task: Find code from staff where a matching record exists in shipments with the same status. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "code", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07932
train
v3
Schema: branches (alias: agov)(amount, code, status, type) categories(value, type, id, amount) Task: Find amount from branches where amount exceeds the average amount from categories for the same level. SQL:
SELECT amount FROM branches AS agov WHERE amount > ( SELECT AVG(amount) FROM categories AS egiv WHERE egiv.level = agov.level );
{ "outer_table": "branches", "inner_table": "categories", "outer_alias": "agov", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07933
train
v2
Schema: tasks (alias: znob)(name, status, date, type) managers(id, value, status, date) Task: Retrieve value from tasks that have at least one corresponding entry in managers sharing the same code. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = znob.code );
{ "outer_table": "tasks", "inner_table": "managers", "outer_alias": "znob", "inner_alias": "hac", "proj_col": "value", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07934
train
v3
Schema: customers (alias: lex)(value, code, level, status) managers(salary, date, id, status) Task: Find amount from customers where amount exceeds the total salary from managers for the same status. SQL:
SELECT amount FROM customers AS lex WHERE amount > ( SELECT SUM(salary) FROM managers AS hac WHERE hac.status = lex.status );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07935
train
v3
Schema: schedules (alias: vmob)(type, name, amount, status) categories(salary, id, date, status) Task: Find name from schedules where value exceeds the maximum amount from categories for the same type. SQL:
SELECT name FROM schedules AS vmob WHERE value > ( SELECT MAX(amount) FROM categories AS egiv WHERE egiv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07936
train
v1
Schema: customers (alias: lex)(date, level, code, name) regions(amount, code, id, level) Task: Find code from customers where type appears in regions entries with matching code. SQL:
SELECT code FROM customers AS lex WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.code = lex.code );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07937
train
v3
Schema: managers (alias: hac)(level, amount, name, status) products(level, name, value, amount) Task: Find id from managers where amount exceeds the minimum value from products for the same code. SQL:
SELECT id FROM managers AS hac WHERE amount > ( SELECT MIN(value) FROM products AS nad WHERE nad.code = hac.code );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "hac", "inner_alias": "nad", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07938
train
v1
Schema: accounts (alias: jac)(type, name, value, level) staff(type, name, salary, date) Task: Select salary from accounts where level exists in staff for the same status. SQL:
SELECT salary FROM accounts AS jac WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "jac", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07939
train
v3
Schema: accounts (alias: jac)(value, code, level, id) invoices(type, id, code, status) Task: Find value from accounts where value exceeds the minimum value from invoices for the same id. SQL:
SELECT value FROM accounts AS jac WHERE value > ( SELECT MIN(value) FROM invoices AS fal WHERE fal.id = jac.id );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07940
train
v3
Schema: departments (alias: dov)(type, id, amount, status) projects(salary, amount, level, name) Task: Find name from departments where salary exceeds the maximum value from projects for the same code. SQL:
SELECT name FROM departments AS dov WHERE salary > ( SELECT MAX(value) FROM projects AS uliv WHERE uliv.code = dov.code );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07941
train
v2
Schema: customers (alias: lex)(name, code, type, id) categories(amount, type, level, salary) Task: Retrieve code from customers that have at least one corresponding entry in categories sharing the same type. SQL:
SELECT code 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": "code", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07942
train
v1
Schema: invoices (alias: fal)(amount, type, name, level) accounts(salary, value, code, status) Task: Find id from invoices where code appears in accounts entries with matching status. SQL:
SELECT id FROM invoices AS fal WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.status = fal.status );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "id", "filter_col": "code", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07943
train
v1
Schema: requests (alias: ejof)(id, level, amount, value) managers(id, status, salary, amount) Task: Retrieve value from requests whose level is found in managers rows where code matches the outer record. SQL:
SELECT value FROM requests AS ejof WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.code = ejof.code );
{ "outer_table": "requests", "inner_table": "managers", "outer_alias": "ejof", "inner_alias": "hac", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07944
train
v3
Schema: customers (alias: lex)(value, id, amount, name) requests(id, date, level, amount) Task: Find code from customers where amount exceeds the average value from requests for the same level. SQL:
SELECT code FROM customers AS lex WHERE amount > ( SELECT AVG(value) FROM requests AS ejof WHERE ejof.level = lex.level );
{ "outer_table": "customers", "inner_table": "requests", "outer_alias": "lex", "inner_alias": "ejof", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07945
train
v2
Schema: requests (alias: ejof)(salary, level, name, type) staff(value, status, amount, level) Task: Find id from requests where a matching record exists in staff with the same level. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = ejof.level );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ejof", "inner_alias": "xnob", "proj_col": "id", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07946
train
v2
Schema: sales (alias: cif)(salary, level, amount, status) customers(salary, code, id, value) Task: Retrieve salary from sales that have at least one corresponding entry in customers sharing the same level. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = cif.level );
{ "outer_table": "sales", "inner_table": "customers", "outer_alias": "cif", "inner_alias": "lex", "proj_col": "salary", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07947
train
v3
Schema: requests (alias: ejof)(status, date, code, id) departments(date, name, salary, type) Task: Find value from requests where salary exceeds the average salary from departments for the same status. SQL:
SELECT value FROM requests AS ejof WHERE salary > ( SELECT AVG(salary) FROM departments AS dov WHERE dov.status = ejof.status );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07948
train
v1
Schema: categories (alias: egiv)(date, level, status, id) shipments(date, id, level, type) Task: Select code from categories where type exists in shipments for the same type. SQL:
SELECT code FROM categories AS egiv WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "code", "filter_col": "type", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07949
train
v2
Schema: products (alias: nad)(code, level, status, id) customers(level, salary, type, date) Task: Retrieve code from products that have at least one corresponding entry in customers sharing the same code. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = nad.code );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07950
train
v1
Schema: managers (alias: hac)(amount, salary, status, date) customers(level, salary, date, type) Task: Find id from managers where status appears in customers entries with matching code. SQL:
SELECT id FROM managers AS hac WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.code = hac.code );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07951
train
v1
Schema: departments (alias: dov)(status, amount, value, id) regions(amount, code, level, salary) Task: Find value from departments where level appears in regions entries with matching status. SQL:
SELECT value FROM departments AS dov WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.status = dov.status );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dov", "inner_alias": "okiv", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07952
train
v3
Schema: transactions (alias: gev)(type, salary, id, name) sales(level, value, name, code) Task: Retrieve id from transactions with salary above the AVG(value) of sales rows sharing the same status. SQL:
SELECT id FROM transactions AS gev WHERE salary > ( SELECT AVG(value) FROM sales AS cif WHERE cif.status = gev.status );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07953
train
v2
Schema: departments (alias: dov)(status, date, salary, id) orders(id, type, status, amount) Task: Retrieve name from departments that have at least one corresponding entry in orders sharing the same id. SQL:
SELECT name FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = dov.id );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dov", "inner_alias": "kab", "proj_col": "name", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07954
train
v2
Schema: orders (alias: kab)(amount, code, id, type) schedules(date, amount, code, level) Task: Retrieve name from orders that have at least one corresponding entry in schedules sharing the same status. SQL:
SELECT name 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": "name", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07955
train
v1
Schema: schedules (alias: vmob)(amount, type, code, salary) sales(status, amount, code, salary) Task: Retrieve salary from schedules whose code is found in sales rows where level matches the outer record. SQL:
SELECT salary FROM schedules AS vmob WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "vmob", "inner_alias": "cif", "proj_col": "salary", "filter_col": "code", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07956
train
v3
Schema: shipments (alias: vnob)(salary, level, name, id) departments(name, salary, level, code) Task: Find name from shipments where amount exceeds the count of amount from departments for the same type. SQL:
SELECT name FROM shipments AS vnob WHERE amount > ( SELECT COUNT(amount) FROM departments AS dov WHERE dov.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07957
train
v3
Schema: departments (alias: dov)(value, date, amount, status) tasks(amount, id, value, date) Task: Retrieve name from departments with amount above the MIN(salary) of tasks rows sharing the same type. SQL:
SELECT name FROM departments AS dov WHERE amount > ( SELECT MIN(salary) FROM tasks AS znob WHERE znob.type = dov.type );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dov", "inner_alias": "znob", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07958
train
v3
Schema: staff (alias: xnob)(code, type, date, amount) requests(id, level, value, salary) Task: Retrieve amount from staff with value above the SUM(value) of requests rows sharing the same id. SQL:
SELECT amount FROM staff AS xnob WHERE value > ( SELECT SUM(value) FROM requests AS ejof WHERE ejof.id = xnob.id );
{ "outer_table": "staff", "inner_table": "requests", "outer_alias": "xnob", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07959
train
v1
Schema: products (alias: nad)(name, code, amount, type) branches(value, level, type, amount) Task: Find salary from products where id appears in branches entries with matching status. SQL:
SELECT salary FROM products AS nad WHERE id IN ( SELECT id FROM branches AS agov WHERE agov.status = nad.status );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07960
train
v1
Schema: transactions (alias: gev)(type, level, code, value) accounts(code, amount, value, id) Task: Select value from transactions where id exists in accounts for the same id. SQL:
SELECT value FROM transactions AS gev WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.id = gev.id );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "gev", "inner_alias": "jac", "proj_col": "value", "filter_col": "id", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07961
train
v3
Schema: regions (alias: okiv)(status, amount, id, type) items(amount, code, value, type) Task: Find salary from regions where value exceeds the total amount from items for the same status. SQL:
SELECT salary FROM regions AS okiv WHERE value > ( SELECT SUM(amount) FROM items AS ikob WHERE ikob.status = okiv.status );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07962
train
v1
Schema: orders (alias: kab)(id, code, name, type) branches(code, name, date, value) Task: Retrieve code from orders whose code is found in branches rows where status matches the outer record. SQL:
SELECT code FROM orders AS kab WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.status = kab.status );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "code", "filter_col": "code", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07963
train
v3
Schema: requests (alias: ejof)(code, status, level, type) sales(salary, status, type, id) Task: Retrieve code from requests with amount above the COUNT(value) of sales rows sharing the same status. SQL:
SELECT code FROM requests AS ejof WHERE amount > ( SELECT COUNT(value) FROM sales AS cif WHERE cif.status = ejof.status );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07964
train
v3
Schema: products (alias: nad)(value, status, amount, name) requests(amount, date, salary, name) Task: Find value from products where amount exceeds the minimum salary from requests for the same type. SQL:
SELECT value FROM products AS nad WHERE amount > ( SELECT MIN(salary) FROM requests AS ejof WHERE ejof.type = nad.type );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07965
train
v2
Schema: orders (alias: kab)(level, amount, date, name) categories(date, type, level, salary) Task: Retrieve id from orders that have at least one corresponding entry in categories sharing the same type. SQL:
SELECT id FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = kab.type );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "id", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07966
train
v2
Schema: projects (alias: uliv)(code, salary, value, level) departments(name, amount, level, value) Task: Retrieve code from projects that have at least one corresponding entry in departments sharing the same code. SQL:
SELECT code FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = uliv.code );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "uliv", "inner_alias": "dov", "proj_col": "code", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07967
train
v1
Schema: regions (alias: okiv)(value, id, code, name) employees(name, id, status, amount) Task: Retrieve amount from regions whose code is found in employees rows where level matches the outer record. SQL:
SELECT amount FROM regions AS okiv WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.level = okiv.level );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "okiv", "inner_alias": "bev", "proj_col": "amount", "filter_col": "code", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07968
train
v2
Schema: sales (alias: cif)(id, code, amount, value) products(date, name, amount, status) Task: Retrieve salary from sales that have at least one corresponding entry in products sharing the same type. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = cif.type );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "salary", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07969
train
v1
Schema: shipments (alias: vnob)(name, type, code, value) products(amount, level, id, name) Task: Select id from shipments where status exists in products for the same level. SQL:
SELECT id FROM shipments AS vnob WHERE status IN ( SELECT status FROM products AS nad WHERE nad.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "id", "filter_col": "status", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07970
train
v3
Schema: orders (alias: kab)(type, code, date, level) employees(date, level, salary, code) Task: Retrieve value from orders with salary above the AVG(amount) of employees rows sharing the same type. SQL:
SELECT value FROM orders AS kab WHERE salary > ( SELECT AVG(amount) 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": "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_07971
train
v1
Schema: regions (alias: okiv)(salary, type, id, date) customers(status, level, value, date) Task: Find id from regions where code appears in customers entries with matching level. SQL:
SELECT id FROM regions AS okiv WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.level = okiv.level );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07972
train
v1
Schema: projects (alias: uliv)(salary, date, name, value) schedules(level, code, type, id) Task: Retrieve value from projects whose level is found in schedules rows where code matches the outer record. SQL:
SELECT value FROM projects AS uliv WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07973
train
v3
Schema: branches (alias: agov)(amount, status, type, name) tasks(date, value, name, salary) Task: Find amount from branches where amount exceeds the maximum value from tasks for the same status. SQL:
SELECT amount FROM branches AS agov WHERE amount > ( SELECT MAX(value) FROM tasks AS znob WHERE znob.status = agov.status );
{ "outer_table": "branches", "inner_table": "tasks", "outer_alias": "agov", "inner_alias": "znob", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07974
train
v1
Schema: invoices (alias: fal)(status, amount, name, level) regions(level, type, id, code) Task: Select amount from invoices where status exists in regions for the same level. SQL:
SELECT amount FROM invoices AS fal WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.level = fal.level );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07975
train
v2
Schema: categories (alias: egiv)(salary, amount, level, id) staff(value, type, name, amount) Task: Retrieve name from categories that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT name FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = egiv.level );
{ "outer_table": "categories", "inner_table": "staff", "outer_alias": "egiv", "inner_alias": "xnob", "proj_col": "name", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07976
train
v1
Schema: items (alias: ikob)(salary, type, date, value) regions(id, value, salary, level) Task: Select value from items where id exists in regions for the same type. SQL:
SELECT value FROM items AS ikob WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.type = ikob.type );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07977
train
v3
Schema: items (alias: ikob)(type, amount, date, salary) products(type, status, level, code) Task: Find id from items where salary exceeds the minimum amount from products for the same level. SQL:
SELECT id FROM items AS ikob WHERE salary > ( SELECT MIN(amount) FROM products AS nad WHERE nad.level = ikob.level );
{ "outer_table": "items", "inner_table": "products", "outer_alias": "ikob", "inner_alias": "nad", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07978
train
v3
Schema: schedules (alias: vmob)(amount, code, value, id) sales(code, amount, type, level) Task: Find amount from schedules where value exceeds the count of salary from sales for the same type. SQL:
SELECT amount FROM schedules AS vmob WHERE value > ( SELECT COUNT(salary) FROM sales AS cif WHERE cif.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "vmob", "inner_alias": "cif", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07979
train
v1
Schema: employees (alias: bev)(salary, name, value, status) branches(type, date, name, code) Task: Retrieve id from employees whose code is found in branches rows where code matches the outer record. SQL:
SELECT id FROM employees AS bev WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.code = bev.code );
{ "outer_table": "employees", "inner_table": "branches", "outer_alias": "bev", "inner_alias": "agov", "proj_col": "id", "filter_col": "code", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07980
train
v1
Schema: shipments (alias: vnob)(code, status, amount, value) sales(level, date, amount, code) Task: Retrieve amount from shipments whose status is found in sales rows where id matches the outer record. SQL:
SELECT amount FROM shipments AS vnob WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07981
train
v1
Schema: schedules (alias: vmob)(value, level, status, code) branches(status, level, salary, code) Task: Select name from schedules where level exists in branches for the same level. SQL:
SELECT name FROM schedules AS vmob WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "branches", "outer_alias": "vmob", "inner_alias": "agov", "proj_col": "name", "filter_col": "level", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07982
train
v3
Schema: accounts (alias: jac)(id, amount, level, date) departments(id, status, salary, date) Task: Find code from accounts where amount exceeds the maximum amount from departments for the same status. SQL:
SELECT code FROM accounts AS jac WHERE amount > ( SELECT MAX(amount) FROM departments AS dov WHERE dov.status = jac.status );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07983
train
v2
Schema: orders (alias: kab)(id, code, date, salary) sales(salary, amount, status, id) Task: Find code from orders where a matching record exists in sales with the same level. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = kab.level );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "code", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07984
train
v3
Schema: regions (alias: okiv)(name, salary, amount, date) sales(code, status, salary, amount) Task: Find amount from regions where salary exceeds the maximum amount from sales for the same id. SQL:
SELECT amount FROM regions AS okiv WHERE salary > ( SELECT MAX(amount) FROM sales AS cif WHERE cif.id = okiv.id );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07985
train
v2
Schema: categories (alias: egiv)(amount, salary, status, id) regions(id, name, code, level) Task: Retrieve amount from categories that have at least one corresponding entry in regions sharing the same code. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = egiv.code );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "amount", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07986
train
v1
Schema: requests (alias: ejof)(date, name, salary, amount) staff(value, name, amount, status) Task: Retrieve code from requests whose type is found in staff rows where level matches the outer record. SQL:
SELECT code FROM requests AS ejof WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.level = ejof.level );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ejof", "inner_alias": "xnob", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07987
train
v2
Schema: projects (alias: uliv)(level, date, id, amount) transactions(name, value, status, type) Task: Find name from projects where a matching record exists in transactions with the same level. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = uliv.level );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "name", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07988
train
v3
Schema: branches (alias: agov)(status, value, date, id) departments(date, salary, level, code) Task: Find value from branches where salary exceeds the maximum value from departments for the same type. SQL:
SELECT value FROM branches AS agov WHERE salary > ( SELECT MAX(value) FROM departments AS dov WHERE dov.type = agov.type );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07989
train
v1
Schema: invoices (alias: fal)(status, value, name, salary) categories(code, salary, amount, name) Task: Find name from invoices where id appears in categories entries with matching status. SQL:
SELECT name FROM invoices AS fal WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.status = fal.status );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07990
train
v3
Schema: employees (alias: bev)(amount, name, value, status) customers(code, name, status, value) Task: Find name from employees where amount exceeds the average salary from customers for the same code. SQL:
SELECT name FROM employees AS bev WHERE amount > ( SELECT AVG(salary) FROM customers AS lex WHERE lex.code = bev.code );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "bev", "inner_alias": "lex", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07991
train
v2
Schema: managers (alias: hac)(date, amount, level, salary) schedules(salary, code, id, type) Task: Retrieve amount from managers that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = hac.code );
{ "outer_table": "managers", "inner_table": "schedules", "outer_alias": "hac", "inner_alias": "vmob", "proj_col": "amount", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07992
train
v3
Schema: departments (alias: dov)(value, status, code, level) projects(amount, status, value, id) Task: Retrieve value from departments with amount above the COUNT(salary) of projects rows sharing the same code. SQL:
SELECT value FROM departments AS dov WHERE amount > ( SELECT COUNT(salary) FROM projects AS uliv WHERE uliv.code = dov.code );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07993
train
v2
Schema: employees (alias: bev)(value, salary, level, date) tasks(level, type, name, code) Task: Retrieve name from employees that have at least one corresponding entry in tasks sharing the same code. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.code = bev.code );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "name", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07994
train
v2
Schema: invoices (alias: fal)(value, id, type, status) categories(level, value, id, status) Task: Find name from invoices where a matching record exists in categories with the same status. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = fal.status );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "name", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07995
train
v3
Schema: transactions (alias: gev)(id, status, salary, level) tasks(amount, salary, level, code) Task: Retrieve id from transactions with salary above the COUNT(amount) of tasks rows sharing the same id. SQL:
SELECT id FROM transactions AS gev WHERE salary > ( SELECT COUNT(amount) FROM tasks AS znob WHERE znob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07996
train
v1
Schema: regions (alias: okiv)(level, date, amount, code) branches(id, code, status, salary) Task: Find value from regions where level appears in branches entries with matching level. SQL:
SELECT value FROM regions AS okiv WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.level = okiv.level );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "okiv", "inner_alias": "agov", "proj_col": "value", "filter_col": "level", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07997
train
v2
Schema: categories (alias: egiv)(level, salary, status, name) projects(salary, type, id, level) Task: Retrieve amount from categories that have at least one corresponding entry in projects sharing the same level. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.level = egiv.level );
{ "outer_table": "categories", "inner_table": "projects", "outer_alias": "egiv", "inner_alias": "uliv", "proj_col": "amount", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07998
train
v2
Schema: transactions (alias: gev)(value, level, name, id) tasks(type, salary, code, amount) Task: Retrieve name from transactions that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = gev.status );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "name", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07999
train