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: projects (alias: uliv)(amount, value, salary, id) orders(level, code, salary, value) Task: Retrieve id from projects that have at least one corresponding entry in orders sharing the same code. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.code = uliv.code );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "id", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_18900
train
v1
Schema: employees (alias: bev)(salary, code, id, type) categories(type, status, code, value) Task: Retrieve name from employees whose type is found in categories rows where type matches the outer record. SQL:
SELECT name FROM employees AS bev WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.type = bev.type );
{ "outer_table": "employees", "inner_table": "categories", "outer_alias": "bev", "inner_alias": "egiv", "proj_col": "name", "filter_col": "type", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18901
train
v2
Schema: departments (alias: dov)(type, value, status, amount) orders(value, code, id, amount) Task: Retrieve name from departments that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT name FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = dov.type );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dov", "inner_alias": "kab", "proj_col": "name", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18902
train
v3
Schema: branches (alias: agov)(value, level, name, code) items(amount, id, name, code) Task: Find amount from branches where value exceeds the count of salary from items for the same type. SQL:
SELECT amount FROM branches AS agov WHERE value > ( SELECT COUNT(salary) FROM items AS ikob WHERE ikob.type = agov.type );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_18903
train
v2
Schema: projects (alias: uliv)(type, code, date, value) orders(level, id, value, name) Task: Retrieve name from projects that have at least one corresponding entry in orders sharing the same status. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = uliv.status );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "name", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_18904
train
v1
Schema: branches (alias: agov)(salary, id, code, date) categories(name, type, salary, date) Task: Select value from branches where code exists in categories for the same status. SQL:
SELECT value FROM branches AS agov WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.status = agov.status );
{ "outer_table": "branches", "inner_table": "categories", "outer_alias": "agov", "inner_alias": "egiv", "proj_col": "value", "filter_col": "code", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_18905
train
v2
Schema: transactions (alias: gev)(salary, value, type, name) shipments(code, date, level, value) Task: Find salary from transactions where a matching record exists in shipments with the same level. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "shipments", "outer_alias": "gev", "inner_alias": "vnob", "proj_col": "salary", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18906
train
v2
Schema: items (alias: ikob)(value, date, id, code) regions(type, code, salary, id) Task: Find amount from items where a matching record exists in regions with the same id. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = ikob.id );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "amount", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_18907
train
v1
Schema: products (alias: nad)(type, salary, id, date) accounts(date, name, amount, salary) Task: Retrieve value from products whose status is found in accounts rows where type matches the outer record. SQL:
SELECT value FROM products AS nad WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.type = nad.type );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "value", "filter_col": "status", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18908
train
v1
Schema: customers (alias: lex)(type, name, code, status) branches(amount, level, type, date) Task: Find name from customers where status appears in branches entries with matching status. SQL:
SELECT name FROM customers AS lex WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.status = lex.status );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18909
train
v3
Schema: branches (alias: agov)(id, status, level, date) shipments(id, code, date, value) Task: Find id from branches where amount exceeds the total value from shipments for the same code. SQL:
SELECT id FROM branches AS agov WHERE amount > ( SELECT SUM(value) FROM shipments AS vnob WHERE vnob.code = agov.code );
{ "outer_table": "branches", "inner_table": "shipments", "outer_alias": "agov", "inner_alias": "vnob", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_18910
train
v3
Schema: accounts (alias: jac)(id, name, amount, status) departments(name, code, salary, amount) Task: Find amount from accounts where value exceeds the count of value from departments for the same id. SQL:
SELECT amount FROM accounts AS jac WHERE value > ( SELECT COUNT(value) FROM departments AS dov WHERE dov.id = jac.id );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18911
train
v3
Schema: customers (alias: lex)(salary, id, amount, date) managers(name, id, date, type) Task: Find code from customers where value exceeds the maximum amount from managers for the same code. SQL:
SELECT code FROM customers AS lex WHERE value > ( SELECT MAX(amount) FROM managers AS hac WHERE hac.code = lex.code );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18912
train
v3
Schema: branches (alias: agov)(status, level, name, salary) invoices(value, type, status, level) Task: Find salary from branches where salary exceeds the total salary from invoices for the same id. SQL:
SELECT salary FROM branches AS agov WHERE salary > ( SELECT SUM(salary) FROM invoices AS fal WHERE fal.id = agov.id );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_18913
train
v3
Schema: shipments (alias: vnob)(name, id, date, code) customers(status, amount, date, code) Task: Find id from shipments where salary exceeds the total salary from customers for the same id. SQL:
SELECT id FROM shipments AS vnob WHERE salary > ( SELECT SUM(salary) FROM customers AS lex WHERE lex.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_18914
train
v1
Schema: tasks (alias: znob)(status, value, code, type) shipments(name, value, id, status) Task: Find value from tasks where type appears in shipments entries with matching status. SQL:
SELECT value FROM tasks AS znob WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_18915
train
v1
Schema: regions (alias: okiv)(code, date, status, amount) categories(amount, id, level, value) Task: Find amount from regions where type appears in categories entries with matching code. SQL:
SELECT amount FROM regions AS okiv WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.code = okiv.code );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_18916
train
v3
Schema: departments (alias: dov)(date, salary, id, type) regions(name, code, amount, value) Task: Find amount from departments where amount exceeds the total value from regions for the same id. SQL:
SELECT amount FROM departments AS dov WHERE amount > ( SELECT SUM(value) FROM regions AS okiv WHERE okiv.id = dov.id );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dov", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18917
train
v2
Schema: sales (alias: cif)(salary, status, date, value) staff(id, type, value, name) Task: Find amount from sales where a matching record exists in staff with the same code. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = cif.code );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "amount", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18918
train
v2
Schema: customers (alias: lex)(salary, level, code, value) branches(status, level, name, id) Task: Retrieve amount from customers that have at least one corresponding entry in branches sharing the same id. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = lex.id );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "amount", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18919
train
v2
Schema: tasks (alias: znob)(value, code, id, name) orders(id, type, value, level) Task: Retrieve code from tasks that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = znob.type );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "code", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_18920
train
v1
Schema: transactions (alias: gev)(amount, name, date, code) regions(value, name, status, type) Task: Find code from transactions where level appears in regions entries with matching type. SQL:
SELECT code FROM transactions AS gev WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.type = gev.type );
{ "outer_table": "transactions", "inner_table": "regions", "outer_alias": "gev", "inner_alias": "okiv", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18921
train
v3
Schema: items (alias: ikob)(code, value, name, status) invoices(type, value, salary, date) Task: Retrieve salary from items with amount above the MIN(value) of invoices rows sharing the same code. SQL:
SELECT salary FROM items AS ikob WHERE amount > ( SELECT MIN(value) FROM invoices AS fal WHERE fal.code = ikob.code );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_18922
train
v1
Schema: customers (alias: lex)(name, status, date, value) requests(id, type, status, level) Task: Find value from customers where level appears in requests entries with matching level. SQL:
SELECT value FROM customers AS lex WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.level = lex.level );
{ "outer_table": "customers", "inner_table": "requests", "outer_alias": "lex", "inner_alias": "ejof", "proj_col": "value", "filter_col": "level", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18923
train
v1
Schema: departments (alias: dov)(name, value, date, code) projects(type, date, name, level) Task: Select code from departments where level exists in projects for the same id. SQL:
SELECT code FROM departments AS dov WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.id = dov.id );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "code", "filter_col": "level", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18924
train
v2
Schema: departments (alias: dov)(amount, type, code, status) employees(value, date, amount, code) Task: Find id from departments where a matching record exists in employees with the same type. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.type = dov.type );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "id", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18925
train
v2
Schema: accounts (alias: jac)(level, type, amount, salary) departments(level, date, status, salary) Task: Retrieve id from accounts that have at least one corresponding entry in departments sharing the same code. SQL:
SELECT id FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = jac.code );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "id", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18926
train
v3
Schema: departments (alias: dov)(date, name, status, value) projects(date, type, status, amount) Task: Find code from departments where salary exceeds the minimum value from projects for the same id. SQL:
SELECT code FROM departments AS dov WHERE salary > ( SELECT MIN(value) FROM projects AS uliv WHERE uliv.id = dov.id );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18927
train
v2
Schema: shipments (alias: vnob)(id, status, name, amount) orders(code, name, status, type) Task: Retrieve code from shipments that have at least one corresponding entry in orders sharing the same id. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "code", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_18928
train
v3
Schema: sales (alias: cif)(value, name, salary, amount) transactions(level, type, date, salary) Task: Find name from sales where salary exceeds the maximum value from transactions for the same status. SQL:
SELECT name FROM sales AS cif WHERE salary > ( SELECT MAX(value) FROM transactions AS gev WHERE gev.status = cif.status );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18929
train
v2
Schema: managers (alias: hac)(id, date, status, amount) employees(date, level, code, type) Task: Retrieve amount from managers that have at least one corresponding entry in employees sharing the same code. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.code = hac.code );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "amount", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18930
train
v1
Schema: staff (alias: xnob)(level, date, name, code) products(status, amount, code, level) Task: Retrieve value from staff whose code is found in products rows where type matches the outer record. SQL:
SELECT value FROM staff AS xnob WHERE code IN ( SELECT code FROM products AS nad WHERE nad.type = xnob.type );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_18931
train
v1
Schema: shipments (alias: vnob)(salary, value, status, type) customers(salary, code, type, name) Task: Select amount from shipments where code exists in customers for the same type. SQL:
SELECT amount FROM shipments AS vnob WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_18932
train
v1
Schema: schedules (alias: vmob)(amount, type, salary, date) regions(status, value, date, code) Task: Retrieve value from schedules whose level is found in regions rows where level matches the outer record. SQL:
SELECT value FROM schedules AS vmob WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "value", "filter_col": "level", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_18933
train
v3
Schema: sales (alias: cif)(level, value, type, date) managers(code, value, id, type) Task: Find value from sales where salary exceeds the total value from managers for the same code. SQL:
SELECT value FROM sales AS cif WHERE salary > ( SELECT SUM(value) FROM managers AS hac WHERE hac.code = cif.code );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "cif", "inner_alias": "hac", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18934
train
v3
Schema: sales (alias: cif)(status, code, name, date) managers(name, salary, value, id) Task: Retrieve amount from sales with salary above the MIN(value) of managers rows sharing the same type. SQL:
SELECT amount FROM sales AS cif WHERE salary > ( SELECT MIN(value) FROM managers AS hac WHERE hac.type = cif.type );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "cif", "inner_alias": "hac", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18935
train
v3
Schema: branches (alias: agov)(code, status, id, level) schedules(level, value, amount, salary) Task: Find code from branches where amount exceeds the total amount from schedules for the same type. SQL:
SELECT code FROM branches AS agov WHERE amount > ( SELECT SUM(amount) FROM schedules AS vmob WHERE vmob.type = agov.type );
{ "outer_table": "branches", "inner_table": "schedules", "outer_alias": "agov", "inner_alias": "vmob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_18936
train
v1
Schema: departments (alias: dov)(level, code, amount, status) accounts(code, type, amount, id) Task: Find amount from departments where code appears in accounts entries with matching type. SQL:
SELECT amount FROM departments AS dov WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.type = dov.type );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18937
train
v2
Schema: staff (alias: xnob)(date, status, id, name) transactions(amount, name, type, level) Task: Find amount from staff where a matching record exists in transactions with the same level. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = xnob.level );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "xnob", "inner_alias": "gev", "proj_col": "amount", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_18938
train
v3
Schema: sales (alias: cif)(type, status, level, date) regions(amount, name, status, level) Task: Retrieve name from sales with amount above the MIN(salary) of regions rows sharing the same status. SQL:
SELECT name FROM sales AS cif WHERE amount > ( SELECT MIN(salary) FROM regions AS okiv WHERE okiv.status = cif.status );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18939
train
v2
Schema: orders (alias: kab)(date, salary, type, status) shipments(id, salary, level, date) Task: Retrieve code from orders that have at least one corresponding entry in shipments sharing the same status. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.status = kab.status );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "code", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18940
train
v1
Schema: branches (alias: agov)(date, salary, status, amount) customers(amount, code, status, level) Task: Select id from branches where level exists in customers for the same level. SQL:
SELECT id FROM branches AS agov WHERE level IN ( SELECT level FROM customers AS lex WHERE lex.level = agov.level );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "id", "filter_col": "level", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_18941
train
v2
Schema: accounts (alias: jac)(code, salary, value, id) departments(type, status, level, amount) Task: Retrieve code from accounts that have at least one corresponding entry in departments sharing the same type. SQL:
SELECT code FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = jac.type );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "code", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18942
train
v1
Schema: managers (alias: hac)(date, name, value, salary) customers(amount, type, code, status) Task: Find name from managers where id appears in customers entries with matching level. SQL:
SELECT name FROM managers AS hac WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.level = hac.level );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "name", "filter_col": "id", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18943
train
v2
Schema: schedules (alias: vmob)(type, code, amount, name) projects(status, code, level, salary) Task: Retrieve id from schedules that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT id FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "id", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_18944
train
v3
Schema: staff (alias: xnob)(salary, date, value, code) branches(level, amount, date, status) Task: Retrieve name from staff with salary above the MIN(value) of branches rows sharing the same level. SQL:
SELECT name FROM staff AS xnob WHERE salary > ( SELECT MIN(value) FROM branches AS agov WHERE agov.level = xnob.level );
{ "outer_table": "staff", "inner_table": "branches", "outer_alias": "xnob", "inner_alias": "agov", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_18945
train
v2
Schema: regions (alias: okiv)(type, amount, name, value) transactions(id, salary, value, amount) Task: Retrieve name from regions that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT name FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = okiv.code );
{ "outer_table": "regions", "inner_table": "transactions", "outer_alias": "okiv", "inner_alias": "gev", "proj_col": "name", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_18946
train
v3
Schema: products (alias: nad)(amount, level, type, id) transactions(id, status, salary, type) Task: Find id from products where amount exceeds the total salary from transactions for the same type. SQL:
SELECT id FROM products AS nad WHERE amount > ( SELECT SUM(salary) FROM transactions AS gev WHERE gev.type = nad.type );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18947
train
v2
Schema: projects (alias: uliv)(amount, code, salary, name) sales(id, type, status, level) Task: Find value from projects where a matching record exists in sales with the same level. SQL:
SELECT value FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = uliv.level );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "value", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_18948
train
v1
Schema: products (alias: nad)(amount, type, id, name) transactions(type, level, salary, status) Task: Select value from products where status exists in transactions for the same status. SQL:
SELECT value FROM products AS nad WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.status = nad.status );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "value", "filter_col": "status", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18949
train
v1
Schema: items (alias: ikob)(status, level, value, code) accounts(date, name, code, status) Task: Select salary from items where level exists in accounts for the same id. SQL:
SELECT salary FROM items AS ikob WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.id = ikob.id );
{ "outer_table": "items", "inner_table": "accounts", "outer_alias": "ikob", "inner_alias": "jac", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_18950
train
v1
Schema: employees (alias: bev)(salary, type, code, id) products(salary, amount, status, value) Task: Find salary from employees where level appears in products entries with matching type. SQL:
SELECT salary FROM employees AS bev WHERE level IN ( SELECT level FROM products AS nad WHERE nad.type = bev.type );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "salary", "filter_col": "level", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18951
train
v3
Schema: requests (alias: ejof)(salary, type, status, amount) customers(status, type, level, code) Task: Find code from requests where value exceeds the minimum salary from customers for the same status. SQL:
SELECT code FROM requests AS ejof WHERE value > ( SELECT MIN(salary) FROM customers AS lex WHERE lex.status = ejof.status );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_18952
train
v2
Schema: managers (alias: hac)(amount, date, name, status) items(code, value, status, name) Task: Find name from managers where a matching record exists in items with the same code. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = hac.code );
{ "outer_table": "managers", "inner_table": "items", "outer_alias": "hac", "inner_alias": "ikob", "proj_col": "name", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18953
train
v1
Schema: departments (alias: dov)(level, date, id, amount) accounts(id, status, code, date) Task: Retrieve amount from departments whose code is found in accounts rows where type matches the outer record. SQL:
SELECT amount FROM departments AS dov WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.type = dov.type );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18954
train
v3
Schema: items (alias: ikob)(date, name, code, salary) regions(amount, salary, id, date) Task: Retrieve amount from items with amount above the AVG(salary) of regions rows sharing the same level. SQL:
SELECT amount FROM items AS ikob WHERE amount > ( SELECT AVG(salary) FROM regions AS okiv WHERE okiv.level = ikob.level );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_18955
train
v1
Schema: orders (alias: kab)(amount, id, name, code) items(amount, id, type, salary) Task: Find salary from orders where status appears in items entries with matching code. SQL:
SELECT salary FROM orders AS kab WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.code = kab.code );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "kab", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "status", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18956
train
v2
Schema: schedules (alias: vmob)(status, name, level, id) departments(id, value, level, code) Task: Find id from schedules where a matching record exists in departments with the same status. SQL:
SELECT id FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "vmob", "inner_alias": "dov", "proj_col": "id", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_18957
train
v2
Schema: schedules (alias: vmob)(name, level, code, salary) regions(type, amount, value, level) Task: Find value from schedules where a matching record exists in regions with the same id. SQL:
SELECT value FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "value", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_18958
train
v3
Schema: items (alias: ikob)(code, level, status, id) departments(name, date, code, level) Task: Retrieve code from items with value above the MIN(value) of departments rows sharing the same code. SQL:
SELECT code FROM items AS ikob WHERE value > ( SELECT MIN(value) FROM departments AS dov WHERE dov.code = ikob.code );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "ikob", "inner_alias": "dov", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_18959
train
v3
Schema: managers (alias: hac)(code, status, name, id) staff(id, status, code, level) Task: Retrieve id from managers with amount above the AVG(value) of staff rows sharing the same id. SQL:
SELECT id FROM managers AS hac WHERE amount > ( SELECT AVG(value) FROM staff AS xnob WHERE xnob.id = hac.id );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "hac", "inner_alias": "xnob", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18960
train
v1
Schema: customers (alias: lex)(salary, date, value, amount) items(amount, type, name, value) Task: Find salary from customers where id appears in items entries with matching type. SQL:
SELECT salary FROM customers AS lex WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.type = lex.type );
{ "outer_table": "customers", "inner_table": "items", "outer_alias": "lex", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "id", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18961
train
v1
Schema: invoices (alias: fal)(date, id, type, status) sales(amount, code, level, type) Task: Find id from invoices where id appears in sales entries with matching id. SQL:
SELECT id FROM invoices AS fal WHERE id IN ( SELECT id FROM sales AS cif WHERE cif.id = fal.id );
{ "outer_table": "invoices", "inner_table": "sales", "outer_alias": "fal", "inner_alias": "cif", "proj_col": "id", "filter_col": "id", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18962
train
v2
Schema: employees (alias: bev)(salary, name, amount, level) orders(amount, id, name, level) Task: Retrieve amount from employees that have at least one corresponding entry in orders sharing the same level. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = bev.level );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "amount", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18963
train
v2
Schema: staff (alias: xnob)(name, level, salary, type) accounts(code, status, type, amount) Task: Retrieve name from staff that have at least one corresponding entry in accounts sharing the same id. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = xnob.id );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "name", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_18964
train
v3
Schema: sales (alias: cif)(type, salary, level, amount) orders(salary, code, amount, id) Task: Retrieve amount from sales with salary above the MAX(amount) of orders rows sharing the same type. SQL:
SELECT amount FROM sales AS cif WHERE salary > ( SELECT MAX(amount) FROM orders AS kab WHERE kab.type = cif.type );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18965
train
v2
Schema: invoices (alias: fal)(type, salary, value, status) schedules(code, date, name, value) Task: Find salary from invoices where a matching record exists in schedules with the same type. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "schedules", "outer_alias": "fal", "inner_alias": "vmob", "proj_col": "salary", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18966
train
v3
Schema: staff (alias: xnob)(salary, type, name, value) projects(date, name, value, type) Task: Retrieve salary from staff with value above the SUM(value) of projects rows sharing the same id. SQL:
SELECT salary FROM staff AS xnob WHERE value > ( SELECT SUM(value) FROM projects AS uliv WHERE uliv.id = xnob.id );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "xnob", "inner_alias": "uliv", "proj_col": "salary", "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_18967
train
v1
Schema: projects (alias: uliv)(type, salary, amount, date) transactions(status, code, name, type) Task: Retrieve value from projects whose type is found in transactions rows where code matches the outer record. SQL:
SELECT value FROM projects AS uliv WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.code = uliv.code );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "value", "filter_col": "type", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_18968
train
v2
Schema: departments (alias: dov)(type, code, date, level) tasks(type, code, value, amount) Task: Retrieve value from departments that have at least one corresponding entry in tasks sharing the same type. SQL:
SELECT value FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = dov.type );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dov", "inner_alias": "znob", "proj_col": "value", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18969
train
v2
Schema: customers (alias: lex)(amount, value, name, id) staff(code, salary, name, status) Task: Retrieve salary from customers that have at least one corresponding entry in staff sharing the same code. SQL:
SELECT salary FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = lex.code );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "salary", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18970
train
v3
Schema: projects (alias: uliv)(amount, date, name, status) regions(value, id, amount, level) Task: Retrieve amount from projects with salary above the AVG(value) of regions rows sharing the same level. SQL:
SELECT amount FROM projects AS uliv WHERE salary > ( SELECT AVG(value) FROM regions AS okiv WHERE okiv.level = uliv.level );
{ "outer_table": "projects", "inner_table": "regions", "outer_alias": "uliv", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_18971
train
v2
Schema: products (alias: nad)(level, salary, id, value) employees(salary, code, status, name) Task: Find amount from products where a matching record exists in employees with the same status. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = nad.status );
{ "outer_table": "products", "inner_table": "employees", "outer_alias": "nad", "inner_alias": "bev", "proj_col": "amount", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18972
train
v1
Schema: accounts (alias: jac)(type, value, name, code) sales(salary, amount, status, code) Task: Retrieve name from accounts whose code is found in sales rows where status matches the outer record. SQL:
SELECT name FROM accounts AS jac WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.status = jac.status );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18973
train
v2
Schema: regions (alias: okiv)(value, level, date, salary) managers(name, code, salary, status) Task: Retrieve value from regions that have at least one corresponding entry in managers sharing the same level. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = okiv.level );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "okiv", "inner_alias": "hac", "proj_col": "value", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_18974
train
v3
Schema: transactions (alias: gev)(name, status, level, salary) products(type, amount, name, salary) Task: Retrieve amount from transactions with salary above the MIN(salary) of products rows sharing the same code. SQL:
SELECT amount FROM transactions AS gev WHERE salary > ( SELECT MIN(salary) FROM products AS nad WHERE nad.code = gev.code );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18975
train
v1
Schema: projects (alias: uliv)(type, level, name, amount) shipments(date, amount, id, status) Task: Select value from projects where level exists in shipments for the same type. SQL:
SELECT value FROM projects AS uliv WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "shipments", "outer_alias": "uliv", "inner_alias": "vnob", "proj_col": "value", "filter_col": "level", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_18976
train
v1
Schema: staff (alias: xnob)(id, name, value, amount) shipments(status, id, type, level) Task: Select value from staff where level exists in shipments for the same status. SQL:
SELECT value FROM staff AS xnob WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_18977
train
v2
Schema: accounts (alias: jac)(code, id, name, level) categories(salary, level, status, id) Task: Find salary from accounts where a matching record exists in categories with the same level. SQL:
SELECT salary 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": "salary", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18978
train
v2
Schema: accounts (alias: jac)(name, level, id, salary) shipments(type, name, salary, code) Task: Retrieve salary from accounts that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = jac.code );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "salary", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18979
train
v2
Schema: customers (alias: lex)(type, salary, date, level) tasks(amount, code, value, level) Task: Retrieve value from customers that have at least one corresponding entry in tasks sharing the same level. SQL:
SELECT value FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.level = lex.level );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "value", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18980
train
v3
Schema: invoices (alias: fal)(status, code, level, date) managers(amount, name, value, status) Task: Retrieve amount from invoices with value above the SUM(salary) of managers rows sharing the same code. SQL:
SELECT amount FROM invoices AS fal WHERE value > ( SELECT SUM(salary) FROM managers AS hac WHERE hac.code = fal.code );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18981
train
v2
Schema: categories (alias: egiv)(type, level, value, status) regions(salary, type, status, value) Task: Retrieve id from categories that have at least one corresponding entry in regions sharing the same level. SQL:
SELECT id FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = egiv.level );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "id", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_18982
train
v3
Schema: items (alias: ikob)(status, amount, value, type) customers(type, amount, status, level) Task: Retrieve salary from items with salary above the SUM(amount) of customers rows sharing the same level. SQL:
SELECT salary FROM items AS ikob WHERE salary > ( SELECT SUM(amount) FROM customers AS lex WHERE lex.level = ikob.level );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_18983
train
v1
Schema: departments (alias: dov)(amount, salary, code, status) items(code, value, level, amount) Task: Retrieve value from departments whose type is found in items rows where status matches the outer record. SQL:
SELECT value FROM departments AS dov WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.status = dov.status );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18984
train
v2
Schema: invoices (alias: fal)(id, code, date, level) tasks(name, level, amount, date) Task: Find amount from invoices where a matching record exists in tasks with the same type. SQL:
SELECT amount FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "tasks", "outer_alias": "fal", "inner_alias": "znob", "proj_col": "amount", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18985
train
v3
Schema: sales (alias: cif)(type, status, level, name) items(code, date, level, type) Task: Find name from sales where salary exceeds the maximum amount from items for the same status. SQL:
SELECT name FROM sales AS cif WHERE salary > ( SELECT MAX(amount) FROM items AS ikob WHERE ikob.status = cif.status );
{ "outer_table": "sales", "inner_table": "items", "outer_alias": "cif", "inner_alias": "ikob", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18986
train
v3
Schema: projects (alias: uliv)(type, code, date, amount) items(date, code, name, amount) Task: Retrieve code from projects with value above the AVG(value) of items rows sharing the same status. SQL:
SELECT code FROM projects AS uliv WHERE value > ( SELECT AVG(value) FROM items AS ikob WHERE ikob.status = uliv.status );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_18987
train
v1
Schema: regions (alias: okiv)(level, id, salary, value) customers(level, date, status, code) Task: Retrieve salary from regions whose id is found in customers rows where status matches the outer record. SQL:
SELECT salary FROM regions AS okiv WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.status = okiv.status );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_18988
train
v2
Schema: regions (alias: okiv)(salary, amount, type, level) managers(code, name, status, level) Task: Retrieve code from regions that have at least one corresponding entry in managers sharing the same status. SQL:
SELECT code FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = okiv.status );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "okiv", "inner_alias": "hac", "proj_col": "code", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_18989
train
v1
Schema: requests (alias: ejof)(salary, name, amount, date) branches(type, code, amount, name) Task: Find value from requests where type appears in branches entries with matching id. SQL:
SELECT value FROM requests AS ejof WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.id = ejof.id );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "value", "filter_col": "type", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_18990
train
v3
Schema: regions (alias: okiv)(status, value, level, name) projects(value, name, salary, amount) Task: Find value from regions where amount exceeds the count of amount from projects for the same level. SQL:
SELECT value FROM regions AS okiv WHERE amount > ( SELECT COUNT(amount) FROM projects AS uliv WHERE uliv.level = okiv.level );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_18991
train
v1
Schema: invoices (alias: fal)(name, date, code, amount) transactions(date, code, status, name) Task: Find amount from invoices where code appears in transactions entries with matching code. SQL:
SELECT amount FROM invoices AS fal WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.code = fal.code );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18992
train
v1
Schema: invoices (alias: fal)(status, code, date, salary) regions(value, id, salary, level) Task: Retrieve name from invoices whose id is found in regions rows where code matches the outer record. SQL:
SELECT name FROM invoices AS fal WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.code = fal.code );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18993
train
v2
Schema: accounts (alias: jac)(salary, type, status, amount) staff(level, type, id, code) Task: Retrieve id from accounts that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT id FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "jac", "inner_alias": "xnob", "proj_col": "id", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18994
train
v3
Schema: items (alias: ikob)(salary, value, type, date) regions(name, amount, type, code) Task: Retrieve code from items with salary above the MIN(salary) of regions rows sharing the same code. SQL:
SELECT code FROM items AS ikob WHERE salary > ( SELECT MIN(salary) FROM regions AS okiv WHERE okiv.code = ikob.code );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_18995
train
v1
Schema: schedules (alias: vmob)(code, date, type, level) projects(type, date, salary, level) Task: Select code from schedules where level exists in projects for the same code. SQL:
SELECT code FROM schedules AS vmob WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_18996
train
v1
Schema: customers (alias: lex)(level, date, name, salary) employees(amount, name, type, code) Task: Retrieve salary from customers whose code is found in employees rows where code matches the outer record. SQL:
SELECT salary FROM customers AS lex WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.code = lex.code );
{ "outer_table": "customers", "inner_table": "employees", "outer_alias": "lex", "inner_alias": "bev", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_18997
train
v1
Schema: schedules (alias: vmob)(date, type, level, value) shipments(value, status, date, salary) Task: Retrieve amount from schedules whose status is found in shipments rows where level matches the outer record. SQL:
SELECT amount FROM schedules AS vmob WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "shipments", "outer_alias": "vmob", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_18998
train
v3
Schema: tasks (alias: znob)(code, name, date, id) transactions(level, type, salary, id) Task: Find code from tasks where salary exceeds the total value from transactions for the same type. SQL:
SELECT code FROM tasks AS znob WHERE salary > ( SELECT SUM(value) FROM transactions AS gev WHERE gev.type = znob.type );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_18999
train