variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v1
Schema: employees (alias: bev)(status, salary, name, value) schedules(value, code, id, amount) Task: Find salary from employees where status appears in schedules entries with matching code. SQL:
SELECT salary FROM employees AS bev WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.code = bev.code );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "status", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07000
train
v3
Schema: shipments (alias: vnob)(type, salary, value, date) branches(salary, amount, date, name) Task: Find amount from shipments where amount exceeds the total salary from branches for the same status. SQL:
SELECT amount FROM shipments AS vnob WHERE amount > ( SELECT SUM(salary) FROM branches AS agov WHERE agov.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "branches", "outer_alias": "vnob", "inner_alias": "agov", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07001
train
v1
Schema: managers (alias: hac)(value, salary, level, date) items(type, status, date, amount) Task: Find name from managers where status appears in items entries with matching status. SQL:
SELECT name FROM managers AS hac WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.status = hac.status );
{ "outer_table": "managers", "inner_table": "items", "outer_alias": "hac", "inner_alias": "ikob", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07002
train
v1
Schema: orders (alias: kab)(level, code, name, status) staff(amount, code, value, level) Task: Select id from orders where status exists in staff for the same status. SQL:
SELECT id FROM orders AS kab WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.status = kab.status );
{ "outer_table": "orders", "inner_table": "staff", "outer_alias": "kab", "inner_alias": "xnob", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07003
train
v3
Schema: projects (alias: uliv)(salary, value, status, code) transactions(level, amount, type, value) Task: Retrieve id from projects with salary above the MIN(amount) of transactions rows sharing the same id. SQL:
SELECT id FROM projects AS uliv WHERE salary > ( SELECT MIN(amount) FROM transactions AS gev WHERE gev.id = uliv.id );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07004
train
v3
Schema: items (alias: ikob)(level, amount, type, value) customers(code, amount, date, salary) Task: Find amount from items where salary exceeds the total salary from customers for the same id. SQL:
SELECT amount FROM items AS ikob WHERE salary > ( SELECT SUM(salary) FROM customers AS lex WHERE lex.id = ikob.id );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07005
train
v2
Schema: staff (alias: xnob)(level, id, salary, name) shipments(date, salary, name, value) Task: Find amount from staff where a matching record exists in shipments with the same status. SQL:
SELECT amount 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": "amount", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07006
train
v2
Schema: managers (alias: hac)(value, amount, type, status) categories(date, salary, type, amount) Task: Find salary from managers where a matching record exists in categories with the same code. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = hac.code );
{ "outer_table": "managers", "inner_table": "categories", "outer_alias": "hac", "inner_alias": "egiv", "proj_col": "salary", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07007
train
v3
Schema: employees (alias: bev)(salary, id, status, code) requests(status, name, code, type) Task: Retrieve code from employees with salary above the AVG(salary) of requests rows sharing the same code. SQL:
SELECT code FROM employees AS bev WHERE salary > ( SELECT AVG(salary) FROM requests AS ejof WHERE ejof.code = bev.code );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07008
train
v3
Schema: managers (alias: hac)(amount, type, id, salary) products(type, status, level, salary) Task: Find id from managers where salary exceeds the maximum value from products for the same id. SQL:
SELECT id FROM managers AS hac WHERE salary > ( SELECT MAX(value) FROM products AS nad WHERE nad.id = hac.id );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "hac", "inner_alias": "nad", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07009
train
v2
Schema: employees (alias: bev)(level, amount, date, type) shipments(name, value, type, salary) Task: Find name from employees where a matching record exists in shipments with the same level. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.level = bev.level );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "name", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07010
train
v1
Schema: shipments (alias: vnob)(level, date, code, value) managers(level, type, salary, status) Task: Retrieve value from shipments whose level is found in managers rows where code matches the outer record. SQL:
SELECT value FROM shipments AS vnob WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07011
train
v1
Schema: shipments (alias: vnob)(value, type, status, date) departments(amount, salary, type, value) Task: Select salary from shipments where status exists in departments for the same code. SQL:
SELECT salary FROM shipments AS vnob WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "salary", "filter_col": "status", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07012
train
v2
Schema: tasks (alias: znob)(salary, status, date, code) sales(name, type, status, value) Task: Retrieve id from tasks that have at least one corresponding entry in sales sharing the same type. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = znob.type );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "znob", "inner_alias": "cif", "proj_col": "id", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07013
train
v1
Schema: employees (alias: bev)(date, salary, id, level) categories(level, salary, id, status) Task: Find salary from employees where code appears in categories entries with matching id. SQL:
SELECT salary FROM employees AS bev WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.id = bev.id );
{ "outer_table": "employees", "inner_table": "categories", "outer_alias": "bev", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07014
train
v1
Schema: accounts (alias: jac)(id, type, date, name) requests(status, id, name, code) Task: Retrieve value from accounts whose type is found in requests rows where level matches the outer record. SQL:
SELECT value FROM accounts AS jac WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.level = jac.level );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "jac", "inner_alias": "ejof", "proj_col": "value", "filter_col": "type", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07015
train
v1
Schema: invoices (alias: fal)(status, value, id, type) managers(level, name, type, date) Task: Retrieve salary from invoices whose id is found in managers rows where id matches the outer record. SQL:
SELECT salary FROM invoices AS fal WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.id = fal.id );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "salary", "filter_col": "id", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07016
train
v1
Schema: sales (alias: cif)(name, type, date, amount) categories(level, id, date, status) Task: Retrieve salary from sales whose status is found in categories rows where id matches the outer record. SQL:
SELECT salary FROM sales AS cif WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.id = cif.id );
{ "outer_table": "sales", "inner_table": "categories", "outer_alias": "cif", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07017
train
v1
Schema: accounts (alias: jac)(value, name, status, salary) invoices(date, id, salary, value) Task: Retrieve code from accounts whose level is found in invoices rows where type matches the outer record. SQL:
SELECT code FROM accounts AS jac WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.type = jac.type );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07018
train
v3
Schema: categories (alias: egiv)(value, salary, name, status) staff(amount, name, code, status) Task: Find value from categories where value exceeds the maximum value from staff for the same status. SQL:
SELECT value FROM categories AS egiv WHERE value > ( SELECT MAX(value) FROM staff AS xnob WHERE xnob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "staff", "outer_alias": "egiv", "inner_alias": "xnob", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07019
train
v2
Schema: projects (alias: uliv)(code, name, value, salary) regions(level, type, name, status) Task: Find code from projects where a matching record exists in regions with the same code. SQL:
SELECT code FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = uliv.code );
{ "outer_table": "projects", "inner_table": "regions", "outer_alias": "uliv", "inner_alias": "okiv", "proj_col": "code", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07020
train
v2
Schema: items (alias: ikob)(level, amount, value, name) tasks(date, type, value, name) Task: Retrieve salary from items that have at least one corresponding entry in tasks sharing the same type. SQL:
SELECT salary FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = ikob.type );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "salary", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07021
train
v3
Schema: categories (alias: egiv)(type, value, salary, id) items(amount, type, level, value) Task: Find id from categories where value exceeds the count of salary from items for the same type. SQL:
SELECT id FROM categories AS egiv WHERE value > ( SELECT COUNT(salary) FROM items AS ikob WHERE ikob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "items", "outer_alias": "egiv", "inner_alias": "ikob", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07022
train
v2
Schema: orders (alias: kab)(name, level, value, status) employees(id, value, salary, status) Task: Retrieve code from orders that have at least one corresponding entry in employees sharing the same status. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = kab.status );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "code", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07023
train
v3
Schema: items (alias: ikob)(name, salary, id, date) orders(id, type, code, salary) Task: Find salary from items where amount exceeds the minimum amount from orders for the same type. SQL:
SELECT salary FROM items AS ikob WHERE amount > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.type = ikob.type );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07024
train
v3
Schema: shipments (alias: vnob)(status, date, name, salary) sales(value, status, type, level) Task: Find code from shipments where amount exceeds the count of salary from sales for the same type. SQL:
SELECT code FROM shipments AS vnob WHERE amount > ( SELECT COUNT(salary) FROM sales AS cif WHERE cif.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07025
train
v3
Schema: sales (alias: cif)(amount, name, value, id) shipments(amount, code, id, value) Task: Retrieve amount from sales with amount above the COUNT(amount) of shipments rows sharing the same id. SQL:
SELECT amount FROM sales AS cif WHERE amount > ( SELECT COUNT(amount) FROM shipments AS vnob WHERE vnob.id = cif.id );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07026
train
v2
Schema: categories (alias: egiv)(value, level, status, id) managers(type, status, id, date) Task: Retrieve value from categories that have at least one corresponding entry in managers sharing the same level. SQL:
SELECT value FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = egiv.level );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "value", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07027
train
v3
Schema: branches (alias: agov)(id, name, level, type) requests(date, type, salary, status) Task: Retrieve amount from branches with amount above the MAX(salary) of requests rows sharing the same level. SQL:
SELECT amount FROM branches AS agov WHERE amount > ( SELECT MAX(salary) FROM requests AS ejof WHERE ejof.level = agov.level );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07028
train
v1
Schema: shipments (alias: vnob)(id, salary, code, status) schedules(value, salary, name, date) Task: Retrieve salary from shipments whose type is found in schedules rows where code matches the outer record. SQL:
SELECT salary FROM shipments AS vnob WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07029
train
v2
Schema: schedules (alias: vmob)(amount, date, type, salary) tasks(status, date, code, name) Task: Retrieve name from schedules that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "name", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07030
train
v1
Schema: orders (alias: kab)(name, level, date, value) sales(amount, level, code, id) Task: Find id from orders where level appears in sales entries with matching code. SQL:
SELECT id FROM orders AS kab WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.code = kab.code );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07031
train
v3
Schema: categories (alias: egiv)(level, value, date, status) regions(name, value, code, salary) Task: Find name from categories where value exceeds the maximum salary from regions for the same id. SQL:
SELECT name FROM categories AS egiv WHERE value > ( SELECT MAX(salary) FROM regions AS okiv WHERE okiv.id = egiv.id );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07032
train
v1
Schema: schedules (alias: vmob)(salary, level, date, type) accounts(salary, id, date, level) Task: Find id from schedules where level appears in accounts entries with matching code. SQL:
SELECT id FROM schedules AS vmob WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "accounts", "outer_alias": "vmob", "inner_alias": "jac", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07033
train
v3
Schema: customers (alias: lex)(salary, amount, id, level) items(name, type, code, amount) Task: Retrieve salary from customers with amount above the MIN(salary) of items rows sharing the same level. SQL:
SELECT salary FROM customers AS lex WHERE amount > ( SELECT MIN(salary) FROM items AS ikob WHERE ikob.level = lex.level );
{ "outer_table": "customers", "inner_table": "items", "outer_alias": "lex", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07034
train
v1
Schema: sales (alias: cif)(status, value, id, salary) tasks(salary, value, amount, date) Task: Find name from sales where code appears in tasks entries with matching id. SQL:
SELECT name FROM sales AS cif WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.id = cif.id );
{ "outer_table": "sales", "inner_table": "tasks", "outer_alias": "cif", "inner_alias": "znob", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07035
train
v3
Schema: projects (alias: uliv)(salary, name, value, amount) regions(name, amount, type, status) Task: Find code from projects where amount exceeds the count of salary from regions for the same status. SQL:
SELECT code FROM projects AS uliv WHERE amount > ( SELECT COUNT(salary) FROM regions AS okiv WHERE okiv.status = uliv.status );
{ "outer_table": "projects", "inner_table": "regions", "outer_alias": "uliv", "inner_alias": "okiv", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07036
train
v3
Schema: tasks (alias: znob)(level, code, name, date) orders(amount, code, status, id) Task: Retrieve id from tasks with value above the COUNT(salary) of orders rows sharing the same code. SQL:
SELECT id FROM tasks AS znob WHERE value > ( SELECT COUNT(salary) FROM orders AS kab WHERE kab.code = znob.code );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07037
train
v1
Schema: orders (alias: kab)(code, salary, status, amount) branches(type, name, status, amount) Task: Retrieve id from orders whose level is found in branches rows where level matches the outer record. SQL:
SELECT id FROM orders AS kab WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.level = kab.level );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "id", "filter_col": "level", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07038
train
v1
Schema: orders (alias: kab)(value, type, amount, id) branches(amount, value, id, date) Task: Retrieve id from orders whose level is found in branches rows where id matches the outer record. SQL:
SELECT id FROM orders AS kab WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.id = kab.id );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "id", "filter_col": "level", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07039
train
v1
Schema: invoices (alias: fal)(value, name, type, salary) orders(code, salary, name, id) Task: Select code from invoices where id exists in orders for the same id. SQL:
SELECT code FROM invoices AS fal WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.id = fal.id );
{ "outer_table": "invoices", "inner_table": "orders", "outer_alias": "fal", "inner_alias": "kab", "proj_col": "code", "filter_col": "id", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07040
train
v3
Schema: departments (alias: dov)(amount, name, date, level) managers(value, level, code, type) Task: Retrieve salary from departments with amount above the AVG(amount) of managers rows sharing the same level. SQL:
SELECT salary FROM departments AS dov WHERE amount > ( SELECT AVG(amount) FROM managers AS hac WHERE hac.level = dov.level );
{ "outer_table": "departments", "inner_table": "managers", "outer_alias": "dov", "inner_alias": "hac", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07041
train
v2
Schema: employees (alias: bev)(id, name, code, salary) projects(level, date, salary, value) Task: Retrieve salary from employees that have at least one corresponding entry in projects sharing the same id. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.id = bev.id );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "salary", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07042
train
v1
Schema: schedules (alias: vmob)(date, id, code, level) invoices(level, id, status, code) Task: Find amount from schedules where type appears in invoices entries with matching code. SQL:
SELECT amount FROM schedules AS vmob WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "vmob", "inner_alias": "fal", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07043
train
v2
Schema: orders (alias: kab)(name, id, salary, code) managers(amount, type, value, status) Task: Find salary from orders where a matching record exists in managers with the same code. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = kab.code );
{ "outer_table": "orders", "inner_table": "managers", "outer_alias": "kab", "inner_alias": "hac", "proj_col": "salary", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07044
train
v3
Schema: orders (alias: kab)(name, date, amount, code) accounts(date, salary, code, type) Task: Retrieve amount from orders with value above the MAX(amount) of accounts rows sharing the same status. SQL:
SELECT amount FROM orders AS kab WHERE value > ( SELECT MAX(amount) FROM accounts AS jac WHERE jac.status = kab.status );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "kab", "inner_alias": "jac", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07045
train
v3
Schema: transactions (alias: gev)(amount, code, value, type) regions(amount, type, salary, date) Task: Retrieve code from transactions with amount above the MAX(amount) of regions rows sharing the same type. SQL:
SELECT code FROM transactions AS gev WHERE amount > ( SELECT MAX(amount) 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": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07046
train
v1
Schema: invoices (alias: fal)(date, type, name, value) customers(salary, status, id, value) Task: Find value from invoices where code appears in customers entries with matching type. SQL:
SELECT value FROM invoices AS fal WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.type = fal.type );
{ "outer_table": "invoices", "inner_table": "customers", "outer_alias": "fal", "inner_alias": "lex", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07047
train
v1
Schema: employees (alias: bev)(code, level, salary, value) transactions(amount, date, id, type) Task: Retrieve amount from employees whose type is found in transactions rows where type matches the outer record. SQL:
SELECT amount FROM employees AS bev WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.type = bev.type );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "bev", "inner_alias": "gev", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07048
train
v1
Schema: orders (alias: kab)(type, amount, salary, status) requests(value, name, code, status) Task: Find value from orders where type appears in requests entries with matching level. SQL:
SELECT value FROM orders AS kab WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.level = kab.level );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "value", "filter_col": "type", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07049
train
v3
Schema: sales (alias: cif)(id, code, name, level) tasks(type, level, id, amount) Task: Retrieve salary from sales with salary above the MAX(value) of tasks rows sharing the same id. SQL:
SELECT salary FROM sales AS cif WHERE salary > ( SELECT MAX(value) FROM tasks AS znob WHERE znob.id = cif.id );
{ "outer_table": "sales", "inner_table": "tasks", "outer_alias": "cif", "inner_alias": "znob", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07050
train
v3
Schema: schedules (alias: vmob)(id, date, salary, amount) employees(salary, type, value, level) Task: Retrieve name from schedules with salary above the COUNT(amount) of employees rows sharing the same level. SQL:
SELECT name FROM schedules AS vmob WHERE salary > ( SELECT COUNT(amount) FROM employees AS bev WHERE bev.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "vmob", "inner_alias": "bev", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07051
train
v1
Schema: categories (alias: egiv)(id, date, type, name) orders(level, code, amount, salary) Task: Find value from categories where code appears in orders entries with matching status. SQL:
SELECT value FROM categories AS egiv WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.status = egiv.status );
{ "outer_table": "categories", "inner_table": "orders", "outer_alias": "egiv", "inner_alias": "kab", "proj_col": "value", "filter_col": "code", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07052
train
v3
Schema: requests (alias: ejof)(name, value, code, status) staff(amount, salary, code, type) Task: Retrieve value from requests with value above the SUM(value) of staff rows sharing the same code. SQL:
SELECT value FROM requests AS ejof WHERE value > ( SELECT SUM(value) FROM staff AS xnob WHERE xnob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ejof", "inner_alias": "xnob", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07053
train
v3
Schema: orders (alias: kab)(value, date, code, salary) invoices(amount, status, code, type) Task: Retrieve value from orders with salary above the COUNT(value) of invoices rows sharing the same id. SQL:
SELECT value FROM orders AS kab WHERE salary > ( SELECT COUNT(value) FROM invoices AS fal WHERE fal.id = kab.id );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "kab", "inner_alias": "fal", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07054
train
v1
Schema: categories (alias: egiv)(code, salary, type, status) customers(code, id, date, name) Task: Retrieve amount from categories whose type is found in customers rows where type matches the outer record. SQL:
SELECT amount FROM categories AS egiv WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.type = egiv.type );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07055
train
v3
Schema: items (alias: ikob)(salary, name, date, level) schedules(type, salary, status, date) Task: Find id from items where amount exceeds the maximum amount from schedules for the same level. SQL:
SELECT id FROM items AS ikob WHERE amount > ( SELECT MAX(amount) FROM schedules AS vmob WHERE vmob.level = ikob.level );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "ikob", "inner_alias": "vmob", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07056
train
v3
Schema: products (alias: nad)(name, amount, type, salary) accounts(value, amount, code, date) Task: Retrieve id from products with value above the COUNT(value) of accounts rows sharing the same type. SQL:
SELECT id FROM products AS nad WHERE value > ( SELECT COUNT(value) FROM accounts AS jac WHERE jac.type = nad.type );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07057
train
v2
Schema: projects (alias: uliv)(level, code, id, status) sales(type, salary, amount, status) Task: Retrieve code from projects that have at least one corresponding entry in sales sharing the same status. SQL:
SELECT code FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = uliv.status );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "code", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07058
train
v1
Schema: products (alias: nad)(date, id, status, salary) accounts(status, code, level, name) Task: Retrieve name from products whose type is found in accounts rows where type matches the outer record. SQL:
SELECT name FROM products AS nad WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.type = nad.type );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "name", "filter_col": "type", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07059
train
v1
Schema: schedules (alias: vmob)(value, code, name, level) orders(salary, status, value, id) Task: Find code from schedules where code appears in orders entries with matching code. SQL:
SELECT code FROM schedules AS vmob WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "orders", "outer_alias": "vmob", "inner_alias": "kab", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07060
train
v2
Schema: orders (alias: kab)(value, date, amount, salary) products(value, level, date, code) Task: Retrieve code from orders that have at least one corresponding entry in products sharing the same status. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = kab.status );
{ "outer_table": "orders", "inner_table": "products", "outer_alias": "kab", "inner_alias": "nad", "proj_col": "code", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07061
train
v2
Schema: transactions (alias: gev)(salary, name, level, code) departments(name, amount, level, status) Task: Find value from transactions where a matching record exists in departments with the same code. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = gev.code );
{ "outer_table": "transactions", "inner_table": "departments", "outer_alias": "gev", "inner_alias": "dov", "proj_col": "value", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07062
train
v2
Schema: invoices (alias: fal)(code, id, level, type) staff(level, salary, status, value) Task: Find name from invoices where a matching record exists in staff with the same type. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "name", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07063
train
v3
Schema: schedules (alias: vmob)(code, name, value, date) staff(code, value, type, salary) Task: Find salary from schedules where salary exceeds the average amount from staff for the same type. SQL:
SELECT salary FROM schedules AS vmob WHERE salary > ( SELECT AVG(amount) FROM staff AS xnob WHERE xnob.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07064
train
v3
Schema: requests (alias: ejof)(code, salary, amount, name) orders(type, date, salary, status) Task: Find salary from requests where salary exceeds the average value from orders for the same status. SQL:
SELECT salary FROM requests AS ejof WHERE salary > ( SELECT AVG(value) FROM orders AS kab WHERE kab.status = ejof.status );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07065
train
v2
Schema: orders (alias: kab)(amount, type, date, code) projects(value, name, type, status) Task: Find value from orders where a matching record exists in projects with the same status. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = kab.status );
{ "outer_table": "orders", "inner_table": "projects", "outer_alias": "kab", "inner_alias": "uliv", "proj_col": "value", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07066
train
v1
Schema: invoices (alias: fal)(level, date, amount, code) requests(amount, date, name, type) Task: Retrieve salary from invoices whose type is found in requests rows where id matches the outer record. SQL:
SELECT salary FROM invoices AS fal WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.id = fal.id );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "type", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07067
train
v3
Schema: products (alias: nad)(date, status, amount, code) transactions(name, value, salary, status) Task: Retrieve name from products with value above the MAX(amount) of transactions rows sharing the same type. SQL:
SELECT name FROM products AS nad WHERE value > ( SELECT MAX(amount) FROM transactions AS gev WHERE gev.type = nad.type );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07068
train
v1
Schema: customers (alias: lex)(salary, date, level, amount) sales(amount, value, salary, code) Task: Select salary from customers where status exists in sales for the same status. SQL:
SELECT salary FROM customers AS lex WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.status = lex.status );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "salary", "filter_col": "status", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07069
train
v2
Schema: transactions (alias: gev)(date, value, code, status) products(type, code, salary, value) Task: Find salary from transactions where a matching record exists in products with the same code. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = gev.code );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "salary", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07070
train
v1
Schema: items (alias: ikob)(type, name, amount, value) regions(amount, value, status, name) Task: Retrieve code from items whose type is found in regions rows where type matches the outer record. SQL:
SELECT code FROM items AS ikob WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.type = ikob.type );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "type", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07071
train
v1
Schema: items (alias: ikob)(name, value, level, code) orders(value, status, level, date) Task: Retrieve amount from items whose id is found in orders rows where type matches the outer record. SQL:
SELECT amount FROM items AS ikob WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.type = ikob.type );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07072
train
v3
Schema: projects (alias: uliv)(name, status, level, id) shipments(salary, value, date, amount) Task: Find amount from projects where value exceeds the maximum amount from shipments for the same level. SQL:
SELECT amount FROM projects AS uliv WHERE value > ( SELECT MAX(amount) FROM shipments AS vnob WHERE vnob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "shipments", "outer_alias": "uliv", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07073
train
v1
Schema: regions (alias: okiv)(status, id, amount, value) employees(salary, amount, date, status) Task: Find value from regions where level appears in employees entries with matching level. SQL:
SELECT value FROM regions AS okiv WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.level = okiv.level );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "okiv", "inner_alias": "bev", "proj_col": "value", "filter_col": "level", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07074
train
v3
Schema: customers (alias: lex)(id, type, name, salary) branches(date, status, salary, amount) Task: Find amount from customers where value exceeds the count of salary from branches for the same type. SQL:
SELECT amount FROM customers AS lex WHERE value > ( SELECT COUNT(salary) FROM branches AS agov WHERE agov.type = lex.type );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07075
train
v3
Schema: transactions (alias: gev)(id, level, salary, type) departments(value, name, code, amount) Task: Retrieve id from transactions with value above the MIN(value) of departments rows sharing the same id. SQL:
SELECT id FROM transactions AS gev WHERE value > ( SELECT MIN(value) FROM departments AS dov WHERE dov.id = gev.id );
{ "outer_table": "transactions", "inner_table": "departments", "outer_alias": "gev", "inner_alias": "dov", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07076
train
v2
Schema: invoices (alias: fal)(amount, code, value, date) schedules(id, type, status, level) Task: Retrieve name from invoices that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = fal.code );
{ "outer_table": "invoices", "inner_table": "schedules", "outer_alias": "fal", "inner_alias": "vmob", "proj_col": "name", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07077
train
v2
Schema: items (alias: ikob)(id, name, code, type) invoices(date, level, type, id) Task: Find salary from items where a matching record exists in invoices with the same level. SQL:
SELECT salary FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = ikob.level );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "salary", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07078
train
v1
Schema: categories (alias: egiv)(name, id, value, amount) regions(code, status, name, id) Task: Find amount from categories where code appears in regions entries with matching status. SQL:
SELECT amount FROM categories AS egiv WHERE code IN ( SELECT code FROM regions AS okiv WHERE okiv.status = egiv.status );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "code", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07079
train
v2
Schema: managers (alias: hac)(amount, id, name, salary) shipments(salary, type, date, status) Task: Find id from managers where a matching record exists in shipments with the same id. SQL:
SELECT id FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = hac.id );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "hac", "inner_alias": "vnob", "proj_col": "id", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07080
train
v3
Schema: accounts (alias: jac)(code, amount, name, type) transactions(status, level, type, id) Task: Find value from accounts where value exceeds the count of salary from transactions for the same level. SQL:
SELECT value FROM accounts AS jac WHERE value > ( SELECT COUNT(salary) FROM transactions AS gev WHERE gev.level = jac.level );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "jac", "inner_alias": "gev", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07081
train
v1
Schema: sales (alias: cif)(amount, date, value, name) requests(status, level, name, salary) Task: Select salary from sales where id exists in requests for the same level. SQL:
SELECT salary FROM sales AS cif WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.level = cif.level );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "id", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07082
train
v3
Schema: departments (alias: dov)(code, name, id, amount) regions(value, id, code, type) Task: Find code from departments where value exceeds the count of value from regions for the same status. SQL:
SELECT code FROM departments AS dov WHERE value > ( SELECT COUNT(value) FROM regions AS okiv WHERE okiv.status = dov.status );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dov", "inner_alias": "okiv", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07083
train
v1
Schema: branches (alias: agov)(name, level, amount, status) categories(level, name, salary, status) Task: Retrieve name from branches whose status is found in categories rows where level matches the outer record. SQL:
SELECT name FROM branches AS agov WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.level = agov.level );
{ "outer_table": "branches", "inner_table": "categories", "outer_alias": "agov", "inner_alias": "egiv", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07084
train
v2
Schema: regions (alias: okiv)(id, name, amount, salary) staff(id, date, name, status) Task: Retrieve code from regions that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT code FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "okiv", "inner_alias": "xnob", "proj_col": "code", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07085
train
v2
Schema: branches (alias: agov)(code, level, name, status) managers(name, type, salary, date) Task: Retrieve code from branches that have at least one corresponding entry in managers sharing the same type. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = agov.type );
{ "outer_table": "branches", "inner_table": "managers", "outer_alias": "agov", "inner_alias": "hac", "proj_col": "code", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07086
train
v2
Schema: staff (alias: xnob)(code, value, level, salary) sales(id, code, date, level) Task: Find code from staff where a matching record exists in sales with the same level. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = xnob.level );
{ "outer_table": "staff", "inner_table": "sales", "outer_alias": "xnob", "inner_alias": "cif", "proj_col": "code", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07087
train
v2
Schema: categories (alias: egiv)(amount, id, type, name) orders(status, code, level, name) Task: Retrieve amount from categories that have at least one corresponding entry in orders sharing the same status. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = egiv.status );
{ "outer_table": "categories", "inner_table": "orders", "outer_alias": "egiv", "inner_alias": "kab", "proj_col": "amount", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07088
train
v1
Schema: transactions (alias: gev)(code, level, value, amount) tasks(date, status, salary, value) Task: Find value from transactions where level appears in tasks entries with matching type. SQL:
SELECT value FROM transactions AS gev WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.type = gev.type );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "value", "filter_col": "level", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07089
train
v2
Schema: invoices (alias: fal)(date, name, salary, level) schedules(name, salary, level, code) Task: Retrieve value from invoices that have at least one corresponding entry in schedules sharing the same status. SQL:
SELECT value FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = fal.status );
{ "outer_table": "invoices", "inner_table": "schedules", "outer_alias": "fal", "inner_alias": "vmob", "proj_col": "value", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07090
train
v1
Schema: transactions (alias: gev)(value, salary, id, name) tasks(type, value, salary, date) Task: Retrieve value from transactions whose level is found in tasks rows where id matches the outer record. SQL:
SELECT value FROM transactions AS gev WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "value", "filter_col": "level", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07091
train
v2
Schema: schedules (alias: vmob)(salary, status, value, type) tasks(value, level, name, id) Task: Retrieve code from schedules that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "code", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07092
train
v1
Schema: schedules (alias: vmob)(name, date, status, code) transactions(id, name, code, date) Task: Select name from schedules where code exists in transactions for the same type. SQL:
SELECT name FROM schedules AS vmob WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "transactions", "outer_alias": "vmob", "inner_alias": "gev", "proj_col": "name", "filter_col": "code", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07093
train
v3
Schema: tasks (alias: znob)(status, amount, date, id) shipments(name, code, level, value) Task: Find salary from tasks where amount exceeds the minimum salary from shipments for the same status. SQL:
SELECT salary FROM tasks AS znob WHERE amount > ( SELECT MIN(salary) FROM shipments AS vnob WHERE vnob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07094
train
v2
Schema: accounts (alias: jac)(name, level, value, date) categories(amount, date, status, name) Task: Retrieve value from accounts that have at least one corresponding entry in categories sharing the same status. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = jac.status );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "jac", "inner_alias": "egiv", "proj_col": "value", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07095
train
v1
Schema: projects (alias: uliv)(value, id, type, code) shipments(level, salary, id, amount) Task: Find code from projects where type appears in shipments entries with matching id. SQL:
SELECT code FROM projects AS uliv WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.id = uliv.id );
{ "outer_table": "projects", "inner_table": "shipments", "outer_alias": "uliv", "inner_alias": "vnob", "proj_col": "code", "filter_col": "type", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07096
train
v1
Schema: sales (alias: cif)(value, name, id, date) invoices(type, name, salary, value) Task: Retrieve id from sales whose id is found in invoices rows where type matches the outer record. SQL:
SELECT id FROM sales AS cif WHERE id IN ( SELECT id FROM invoices AS fal WHERE fal.type = cif.type );
{ "outer_table": "sales", "inner_table": "invoices", "outer_alias": "cif", "inner_alias": "fal", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07097
train
v3
Schema: departments (alias: dov)(name, type, value, date) products(code, value, salary, amount) Task: Retrieve name from departments with value above the AVG(salary) of products rows sharing the same code. SQL:
SELECT name FROM departments AS dov WHERE value > ( SELECT AVG(salary) FROM products AS nad WHERE nad.code = dov.code );
{ "outer_table": "departments", "inner_table": "products", "outer_alias": "dov", "inner_alias": "nad", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07098
train
v2
Schema: shipments (alias: vnob)(code, type, name, amount) sales(id, value, code, amount) Task: Find amount from shipments where a matching record exists in sales with the same code. SQL:
SELECT amount FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "amount", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07099
train