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
v3
Schema: tasks (alias: znob)(code, date, value, level) departments(salary, name, status, code) Task: Retrieve salary from tasks with amount above the AVG(salary) of departments rows sharing the same id. SQL:
SELECT salary FROM tasks AS znob WHERE amount > ( SELECT AVG(salary) FROM departments AS dov WHERE dov.id = znob.id );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10100
train
v2
Schema: sales (alias: cif)(status, type, amount, date) regions(value, id, name, code) Task: Find id from sales where a matching record exists in regions with the same type. SQL:
SELECT id FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = cif.type );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "id", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10101
train
v1
Schema: sales (alias: cif)(id, value, type, amount) items(code, id, salary, type) Task: Select code from sales where code exists in items for the same level. SQL:
SELECT code FROM sales AS cif WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.level = cif.level );
{ "outer_table": "sales", "inner_table": "items", "outer_alias": "cif", "inner_alias": "ikob", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10102
train
v1
Schema: items (alias: ikob)(code, name, date, id) requests(salary, value, status, type) Task: Select salary from items where level exists in requests for the same type. SQL:
SELECT salary FROM items AS ikob WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.type = ikob.type );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "ikob", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "level", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10103
train
v2
Schema: tasks (alias: znob)(type, id, amount, status) invoices(amount, id, level, salary) Task: Retrieve amount from tasks that have at least one corresponding entry in invoices sharing the same id. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = znob.id );
{ "outer_table": "tasks", "inner_table": "invoices", "outer_alias": "znob", "inner_alias": "fal", "proj_col": "amount", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10104
train
v2
Schema: tasks (alias: znob)(salary, id, name, amount) products(code, id, name, status) Task: Retrieve amount from tasks that have at least one corresponding entry in products sharing the same code. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = znob.code );
{ "outer_table": "tasks", "inner_table": "products", "outer_alias": "znob", "inner_alias": "nad", "proj_col": "amount", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10105
train
v2
Schema: accounts (alias: jac)(id, status, value, code) projects(level, date, name, id) Task: Retrieve value from accounts that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = jac.code );
{ "outer_table": "accounts", "inner_table": "projects", "outer_alias": "jac", "inner_alias": "uliv", "proj_col": "value", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10106
train
v2
Schema: invoices (alias: fal)(salary, level, name, date) products(name, id, salary, amount) Task: Retrieve id from invoices that have at least one corresponding entry in products sharing the same id. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.id = fal.id );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "id", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10107
train
v1
Schema: categories (alias: egiv)(value, date, name, status) invoices(value, name, level, code) Task: Select salary from categories where level exists in invoices for the same id. SQL:
SELECT salary FROM categories AS egiv WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.id = egiv.id );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10108
train
v2
Schema: managers (alias: hac)(code, salary, name, value) regions(status, salary, type, date) Task: Retrieve salary from managers that have at least one corresponding entry in regions sharing the same status. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = hac.status );
{ "outer_table": "managers", "inner_table": "regions", "outer_alias": "hac", "inner_alias": "okiv", "proj_col": "salary", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10109
train
v1
Schema: departments (alias: dov)(level, value, amount, code) accounts(id, amount, code, status) Task: Find salary from departments where id appears in accounts entries with matching level. SQL:
SELECT salary FROM departments AS dov WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.level = dov.level );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "salary", "filter_col": "id", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10110
train
v1
Schema: customers (alias: lex)(date, type, code, salary) departments(status, name, id, salary) Task: Select code from customers where id exists in departments for the same level. SQL:
SELECT code FROM customers AS lex WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.level = lex.level );
{ "outer_table": "customers", "inner_table": "departments", "outer_alias": "lex", "inner_alias": "dov", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10111
train
v3
Schema: shipments (alias: vnob)(date, id, code, value) departments(value, amount, type, code) Task: Find name from shipments where salary exceeds the count of value from departments for the same id. SQL:
SELECT name FROM shipments AS vnob WHERE salary > ( SELECT COUNT(value) FROM departments AS dov WHERE dov.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10112
train
v2
Schema: regions (alias: okiv)(id, code, salary, level) customers(type, value, id, amount) Task: Retrieve id from regions that have at least one corresponding entry in customers sharing the same status. SQL:
SELECT id FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = okiv.status );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "id", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10113
train
v1
Schema: schedules (alias: vmob)(value, level, date, amount) employees(value, amount, level, code) Task: Retrieve name from schedules whose status is found in employees rows where code matches the outer record. SQL:
SELECT name FROM schedules AS vmob WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "vmob", "inner_alias": "bev", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10114
train
v2
Schema: projects (alias: uliv)(amount, type, id, status) tasks(level, value, amount, status) Task: Retrieve name from projects that have at least one corresponding entry in tasks sharing the same type. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "uliv", "inner_alias": "znob", "proj_col": "name", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10115
train
v1
Schema: staff (alias: xnob)(salary, name, code, level) products(code, amount, value, salary) Task: Find code from staff where level appears in products entries with matching status. SQL:
SELECT code FROM staff AS xnob WHERE level IN ( SELECT level FROM products AS nad WHERE nad.status = xnob.status );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10116
train
v1
Schema: staff (alias: xnob)(name, level, date, id) invoices(level, date, code, salary) Task: Select value from staff where status exists in invoices for the same level. SQL:
SELECT value FROM staff AS xnob WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.level = xnob.level );
{ "outer_table": "staff", "inner_table": "invoices", "outer_alias": "xnob", "inner_alias": "fal", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10117
train
v1
Schema: staff (alias: xnob)(status, value, id, type) categories(code, value, name, date) Task: Select code from staff where id exists in categories for the same level. SQL:
SELECT code FROM staff AS xnob WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.level = xnob.level );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10118
train
v1
Schema: staff (alias: xnob)(id, salary, level, code) invoices(amount, id, value, salary) Task: Find salary from staff where status appears in invoices entries with matching status. SQL:
SELECT salary FROM staff AS xnob WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.status = xnob.status );
{ "outer_table": "staff", "inner_table": "invoices", "outer_alias": "xnob", "inner_alias": "fal", "proj_col": "salary", "filter_col": "status", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10119
train
v1
Schema: staff (alias: xnob)(code, date, amount, level) accounts(status, name, code, type) Task: Find code from staff where level appears in accounts entries with matching status. SQL:
SELECT code FROM staff AS xnob WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.status = xnob.status );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10120
train
v3
Schema: transactions (alias: gev)(name, code, type, salary) staff(id, salary, amount, code) Task: Retrieve id from transactions with amount above the AVG(amount) of staff rows sharing the same level. SQL:
SELECT id FROM transactions AS gev WHERE amount > ( SELECT AVG(amount) FROM staff AS xnob WHERE xnob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10121
train
v1
Schema: categories (alias: egiv)(level, name, amount, salary) regions(level, value, status, type) Task: Select amount from categories where status exists in regions for the same level. SQL:
SELECT amount FROM categories AS egiv WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.level = egiv.level );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10122
train
v1
Schema: staff (alias: xnob)(value, type, amount, name) orders(status, type, code, value) Task: Find salary from staff where code appears in orders entries with matching type. SQL:
SELECT salary FROM staff AS xnob WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.type = xnob.type );
{ "outer_table": "staff", "inner_table": "orders", "outer_alias": "xnob", "inner_alias": "kab", "proj_col": "salary", "filter_col": "code", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10123
train
v3
Schema: tasks (alias: znob)(date, name, value, salary) orders(code, level, salary, value) Task: Find code from tasks where amount exceeds the count of value from orders for the same code. SQL:
SELECT code FROM tasks AS znob WHERE amount > ( SELECT COUNT(value) FROM orders AS kab WHERE kab.code = znob.code );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10124
train
v2
Schema: items (alias: ikob)(id, name, type, code) sales(date, name, level, status) Task: Find value from items where a matching record exists in sales with the same status. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = ikob.status );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "value", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10125
train
v1
Schema: orders (alias: kab)(level, amount, date, value) categories(date, salary, type, status) Task: Select id from orders where status exists in categories for the same status. SQL:
SELECT id FROM orders AS kab WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.status = kab.status );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10126
train
v1
Schema: invoices (alias: fal)(value, code, name, date) requests(status, date, id, code) Task: Retrieve id from invoices whose status is found in requests rows where code matches the outer record. SQL:
SELECT id FROM invoices AS fal WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.code = fal.code );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10127
train
v3
Schema: transactions (alias: gev)(id, status, value, amount) requests(level, type, code, id) Task: Retrieve salary from transactions with value above the COUNT(amount) of requests rows sharing the same id. SQL:
SELECT salary FROM transactions AS gev WHERE value > ( SELECT COUNT(amount) FROM requests AS ejof WHERE ejof.id = gev.id );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10128
train
v3
Schema: invoices (alias: fal)(date, code, name, salary) tasks(code, value, salary, id) Task: Retrieve code from invoices with salary above the MIN(value) of tasks rows sharing the same status. SQL:
SELECT code FROM invoices AS fal WHERE salary > ( SELECT MIN(value) FROM tasks AS znob WHERE znob.status = fal.status );
{ "outer_table": "invoices", "inner_table": "tasks", "outer_alias": "fal", "inner_alias": "znob", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10129
train
v1
Schema: branches (alias: agov)(type, value, salary, amount) shipments(salary, type, id, code) Task: Retrieve code from branches whose status is found in shipments rows where code matches the outer record. SQL:
SELECT code FROM branches AS agov WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.code = agov.code );
{ "outer_table": "branches", "inner_table": "shipments", "outer_alias": "agov", "inner_alias": "vnob", "proj_col": "code", "filter_col": "status", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10130
train
v2
Schema: invoices (alias: fal)(status, salary, type, level) transactions(value, status, level, salary) Task: Retrieve name from invoices that have at least one corresponding entry in transactions sharing the same type. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = fal.type );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "name", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10131
train
v1
Schema: schedules (alias: vmob)(name, date, salary, level) employees(salary, level, id, amount) Task: Find amount from schedules where id appears in employees entries with matching id. SQL:
SELECT amount FROM schedules AS vmob WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "vmob", "inner_alias": "bev", "proj_col": "amount", "filter_col": "id", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10132
train
v1
Schema: categories (alias: egiv)(name, code, amount, value) branches(amount, code, name, id) Task: Retrieve name from categories whose type is found in branches rows where code matches the outer record. SQL:
SELECT name FROM categories AS egiv WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.code = egiv.code );
{ "outer_table": "categories", "inner_table": "branches", "outer_alias": "egiv", "inner_alias": "agov", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10133
train
v2
Schema: accounts (alias: jac)(value, id, name, code) items(value, date, id, salary) Task: Find value from accounts where a matching record exists in items with the same level. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "value", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10134
train
v3
Schema: projects (alias: uliv)(date, status, amount, name) requests(status, amount, date, code) Task: Find amount from projects where salary exceeds the maximum salary from requests for the same level. SQL:
SELECT amount FROM projects AS uliv WHERE salary > ( SELECT MAX(salary) FROM requests AS ejof WHERE ejof.level = uliv.level );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10135
train
v3
Schema: transactions (alias: gev)(level, code, id, amount) orders(code, salary, date, name) Task: Find code from transactions where amount exceeds the maximum amount from orders for the same id. SQL:
SELECT code FROM transactions AS gev WHERE amount > ( SELECT MAX(amount) FROM orders AS kab WHERE kab.id = gev.id );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "gev", "inner_alias": "kab", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10136
train
v2
Schema: transactions (alias: gev)(name, amount, level, id) tasks(salary, id, amount, date) Task: Find salary from transactions where a matching record exists in tasks with the same code. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.code = gev.code );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "salary", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10137
train
v1
Schema: invoices (alias: fal)(salary, amount, id, status) branches(date, id, level, amount) Task: Select name from invoices where type exists in branches for the same code. SQL:
SELECT name FROM invoices AS fal WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.code = fal.code );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10138
train
v2
Schema: invoices (alias: fal)(amount, salary, date, code) transactions(status, salary, date, name) Task: Find id from invoices where a matching record exists in transactions with the same id. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = fal.id );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "id", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10139
train
v1
Schema: regions (alias: okiv)(code, amount, id, salary) transactions(type, level, status, name) Task: Select value from regions where code exists in transactions for the same status. SQL:
SELECT value FROM regions AS okiv WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.status = okiv.status );
{ "outer_table": "regions", "inner_table": "transactions", "outer_alias": "okiv", "inner_alias": "gev", "proj_col": "value", "filter_col": "code", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10140
train
v1
Schema: departments (alias: dov)(value, date, level, status) shipments(type, id, name, status) Task: Retrieve code from departments whose id is found in shipments rows where status matches the outer record. SQL:
SELECT code FROM departments AS dov WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10141
train
v2
Schema: customers (alias: lex)(amount, level, value, date) schedules(amount, type, salary, level) Task: Retrieve amount from customers that have at least one corresponding entry in schedules sharing the same status. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = lex.status );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "amount", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10142
train
v3
Schema: requests (alias: ejof)(type, id, name, code) schedules(name, amount, type, id) Task: Find id from requests where value exceeds the count of value from schedules for the same status. SQL:
SELECT id FROM requests AS ejof WHERE value > ( SELECT COUNT(value) FROM schedules AS vmob WHERE vmob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "schedules", "outer_alias": "ejof", "inner_alias": "vmob", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10143
train
v2
Schema: orders (alias: kab)(type, status, level, value) items(id, value, status, date) Task: Find code from orders where a matching record exists in items with the same type. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = kab.type );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "kab", "inner_alias": "ikob", "proj_col": "code", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10144
train
v2
Schema: items (alias: ikob)(level, id, amount, status) products(id, status, salary, type) Task: Retrieve value from items that have at least one corresponding entry in products sharing the same code. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = ikob.code );
{ "outer_table": "items", "inner_table": "products", "outer_alias": "ikob", "inner_alias": "nad", "proj_col": "value", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10145
train
v1
Schema: employees (alias: bev)(value, status, code, name) accounts(amount, name, type, id) Task: Find id from employees where code appears in accounts entries with matching level. SQL:
SELECT id FROM employees AS bev WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.level = bev.level );
{ "outer_table": "employees", "inner_table": "accounts", "outer_alias": "bev", "inner_alias": "jac", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10146
train
v1
Schema: departments (alias: dov)(code, id, date, status) orders(status, name, type, level) Task: Find value from departments where type appears in orders entries with matching status. SQL:
SELECT value FROM departments AS dov WHERE type IN ( SELECT type FROM orders AS kab WHERE kab.status = dov.status );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dov", "inner_alias": "kab", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10147
train
v2
Schema: staff (alias: xnob)(date, type, id, value) shipments(status, amount, level, type) 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_10148
train
v1
Schema: schedules (alias: vmob)(code, type, level, name) invoices(amount, type, code, id) Task: Select amount from schedules where id exists in invoices for the same type. SQL:
SELECT amount FROM schedules AS vmob WHERE id IN ( SELECT id FROM invoices AS fal WHERE fal.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "vmob", "inner_alias": "fal", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10149
train
v1
Schema: accounts (alias: jac)(type, salary, value, name) categories(status, salary, code, name) Task: Retrieve id from accounts whose code is found in categories rows where level matches the outer record. SQL:
SELECT id FROM accounts AS jac WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.level = jac.level );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "jac", "inner_alias": "egiv", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10150
train
v2
Schema: sales (alias: cif)(level, salary, value, status) requests(date, level, status, code) Task: Find name from sales where a matching record exists in requests with the same status. SQL:
SELECT name FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = cif.status );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "name", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10151
train
v2
Schema: departments (alias: dov)(salary, status, date, name) shipments(value, code, level, status) Task: Find value from departments where a matching record exists in shipments with the same status. SQL:
SELECT value FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "value", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10152
train
v2
Schema: schedules (alias: vmob)(type, status, salary, value) regions(status, id, code, amount) Task: Find salary from schedules where a matching record exists in regions with the same type. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "salary", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10153
train
v1
Schema: categories (alias: egiv)(level, status, value, type) managers(type, name, date, value) Task: Retrieve code from categories whose level is found in managers rows where status matches the outer record. SQL:
SELECT code FROM categories AS egiv WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.status = egiv.status );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10154
train
v1
Schema: orders (alias: kab)(level, salary, status, value) shipments(salary, date, type, status) Task: Find value from orders where status appears in shipments entries with matching code. SQL:
SELECT value FROM orders AS kab WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.code = kab.code );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "value", "filter_col": "status", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10155
train
v2
Schema: branches (alias: agov)(amount, type, level, name) shipments(name, code, level, salary) Task: Find code from branches where a matching record exists in shipments with the same code. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = agov.code );
{ "outer_table": "branches", "inner_table": "shipments", "outer_alias": "agov", "inner_alias": "vnob", "proj_col": "code", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10156
train
v3
Schema: accounts (alias: jac)(code, type, value, amount) transactions(code, amount, name, id) Task: Retrieve id from accounts with value above the MAX(salary) of transactions rows sharing the same id. SQL:
SELECT id FROM accounts AS jac WHERE value > ( SELECT MAX(salary) FROM transactions AS gev WHERE gev.id = jac.id );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "jac", "inner_alias": "gev", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10157
train
v3
Schema: employees (alias: bev)(salary, code, value, status) customers(amount, id, value, code) Task: Find id from employees where amount exceeds the maximum value from customers for the same level. SQL:
SELECT id FROM employees AS bev WHERE amount > ( SELECT MAX(value) FROM customers AS lex WHERE lex.level = bev.level );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "bev", "inner_alias": "lex", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10158
train
v1
Schema: categories (alias: egiv)(date, id, name, type) transactions(code, status, salary, level) Task: Find amount from categories where level appears in transactions entries with matching level. SQL:
SELECT amount FROM categories AS egiv WHERE level IN ( SELECT level FROM transactions AS gev WHERE gev.level = egiv.level );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "egiv", "inner_alias": "gev", "proj_col": "amount", "filter_col": "level", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10159
train
v2
Schema: transactions (alias: gev)(amount, name, status, date) tasks(id, name, code, amount) Task: Retrieve name from transactions that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "name", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10160
train
v2
Schema: invoices (alias: fal)(type, code, id, name) schedules(id, code, amount, type) Task: Find id from invoices where a matching record exists in schedules with the same status. SQL:
SELECT id 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": "id", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10161
train
v3
Schema: orders (alias: kab)(date, amount, salary, code) shipments(name, status, date, level) Task: Retrieve salary from orders with amount above the COUNT(amount) of shipments rows sharing the same level. SQL:
SELECT salary FROM orders AS kab WHERE amount > ( SELECT COUNT(amount) FROM shipments AS vnob WHERE vnob.level = kab.level );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10162
train
v2
Schema: sales (alias: cif)(name, status, level, date) products(level, status, salary, name) Task: Retrieve amount from sales that have at least one corresponding entry in products sharing the same level. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = cif.level );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "amount", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10163
train
v3
Schema: invoices (alias: fal)(date, value, status, type) departments(status, amount, type, salary) Task: Retrieve salary from invoices with salary above the MIN(value) of departments rows sharing the same type. SQL:
SELECT salary FROM invoices AS fal WHERE salary > ( SELECT MIN(value) FROM departments AS dov WHERE dov.type = fal.type );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10164
train
v3
Schema: categories (alias: egiv)(name, type, level, salary) departments(value, type, date, name) Task: Find code from categories where amount exceeds the average salary from departments for the same id. SQL:
SELECT code FROM categories AS egiv WHERE amount > ( SELECT AVG(salary) FROM departments AS dov WHERE dov.id = egiv.id );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10165
train
v3
Schema: staff (alias: xnob)(amount, type, level, value) schedules(id, salary, amount, date) Task: Find id from staff where salary exceeds the average value from schedules for the same code. SQL:
SELECT id FROM staff AS xnob WHERE salary > ( SELECT AVG(value) FROM schedules AS vmob WHERE vmob.code = xnob.code );
{ "outer_table": "staff", "inner_table": "schedules", "outer_alias": "xnob", "inner_alias": "vmob", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10166
train
v3
Schema: tasks (alias: znob)(type, value, name, id) departments(date, code, status, name) Task: Retrieve value from tasks with amount above the MAX(salary) of departments rows sharing the same id. SQL:
SELECT value FROM tasks AS znob WHERE amount > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.id = znob.id );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10167
train
v2
Schema: employees (alias: bev)(salary, id, name, code) categories(type, id, salary, value) Task: Retrieve code from employees that have at least one corresponding entry in categories sharing the same level. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = bev.level );
{ "outer_table": "employees", "inner_table": "categories", "outer_alias": "bev", "inner_alias": "egiv", "proj_col": "code", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10168
train
v3
Schema: invoices (alias: fal)(code, value, type, name) requests(type, id, name, value) Task: Find name from invoices where value exceeds the average value from requests for the same type. SQL:
SELECT name FROM invoices AS fal WHERE value > ( SELECT AVG(value) FROM requests AS ejof WHERE ejof.type = fal.type );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10169
train
v2
Schema: categories (alias: egiv)(code, type, date, amount) managers(code, date, name, salary) Task: Find name from categories where a matching record exists in managers with the same level. SQL:
SELECT name 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": "name", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10170
train
v2
Schema: accounts (alias: jac)(date, value, status, name) managers(type, code, salary, status) Task: Retrieve amount from accounts that have at least one corresponding entry in managers sharing the same id. SQL:
SELECT amount FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = jac.id );
{ "outer_table": "accounts", "inner_table": "managers", "outer_alias": "jac", "inner_alias": "hac", "proj_col": "amount", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10171
train
v3
Schema: accounts (alias: jac)(id, name, salary, amount) invoices(name, status, type, salary) Task: Retrieve code from accounts with amount above the SUM(salary) of invoices rows sharing the same code. SQL:
SELECT code FROM accounts AS jac WHERE amount > ( SELECT SUM(salary) FROM invoices AS fal WHERE fal.code = jac.code );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10172
train
v1
Schema: invoices (alias: fal)(id, level, code, name) requests(type, salary, name, amount) Task: Retrieve id from invoices whose type is found in requests rows where code matches the outer record. SQL:
SELECT id FROM invoices AS fal WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.code = fal.code );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10173
train
v1
Schema: accounts (alias: jac)(date, code, type, name) items(level, type, code, salary) Task: Select id from accounts where level exists in items for the same level. SQL:
SELECT id FROM accounts AS jac WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "id", "filter_col": "level", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10174
train
v1
Schema: tasks (alias: znob)(salary, code, name, date) invoices(value, level, id, type) Task: Select amount from tasks where status exists in invoices for the same type. SQL:
SELECT amount FROM tasks AS znob WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.type = znob.type );
{ "outer_table": "tasks", "inner_table": "invoices", "outer_alias": "znob", "inner_alias": "fal", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10175
train
v1
Schema: requests (alias: ejof)(level, salary, code, amount) managers(status, value, name, type) Task: Find salary from requests where id appears in managers entries with matching code. SQL:
SELECT salary FROM requests AS ejof WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.code = ejof.code );
{ "outer_table": "requests", "inner_table": "managers", "outer_alias": "ejof", "inner_alias": "hac", "proj_col": "salary", "filter_col": "id", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10176
train
v1
Schema: tasks (alias: znob)(id, status, value, code) projects(id, value, level, amount) Task: Find id from tasks where level appears in projects entries with matching code. SQL:
SELECT id FROM tasks AS znob WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.code = znob.code );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10177
train
v1
Schema: staff (alias: xnob)(date, name, type, value) managers(salary, value, amount, type) Task: Select salary from staff where type exists in managers for the same type. SQL:
SELECT salary FROM staff AS xnob WHERE type IN ( SELECT type FROM managers AS hac WHERE hac.type = xnob.type );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "xnob", "inner_alias": "hac", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10178
train
v2
Schema: managers (alias: hac)(status, date, level, id) tasks(name, level, date, type) Task: Retrieve name from managers that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = hac.id );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "name", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10179
train
v1
Schema: branches (alias: agov)(date, name, status, id) requests(type, value, name, date) Task: Retrieve salary from branches whose status is found in requests rows where id matches the outer record. SQL:
SELECT salary FROM branches AS agov WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.id = agov.id );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10180
train
v3
Schema: shipments (alias: vnob)(salary, id, code, amount) tasks(date, level, value, amount) Task: Retrieve name from shipments with salary above the COUNT(value) of tasks rows sharing the same status. SQL:
SELECT name FROM shipments AS vnob WHERE salary > ( SELECT COUNT(value) FROM tasks AS znob WHERE znob.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "tasks", "outer_alias": "vnob", "inner_alias": "znob", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10181
train
v2
Schema: transactions (alias: gev)(id, name, salary, value) shipments(amount, name, status, value) Task: Retrieve amount from transactions that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT amount FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = gev.code );
{ "outer_table": "transactions", "inner_table": "shipments", "outer_alias": "gev", "inner_alias": "vnob", "proj_col": "amount", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10182
train
v3
Schema: schedules (alias: vmob)(type, level, amount, id) departments(value, name, amount, type) Task: Find amount from schedules where value exceeds the count of amount from departments for the same level. SQL:
SELECT amount FROM schedules AS vmob WHERE value > ( SELECT COUNT(amount) FROM departments AS dov WHERE dov.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "vmob", "inner_alias": "dov", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10183
train
v2
Schema: staff (alias: xnob)(salary, amount, value, status) invoices(code, value, type, amount) Task: Retrieve amount from staff that have at least one corresponding entry in invoices sharing the same type. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = xnob.type );
{ "outer_table": "staff", "inner_table": "invoices", "outer_alias": "xnob", "inner_alias": "fal", "proj_col": "amount", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10184
train
v3
Schema: orders (alias: kab)(status, type, value, level) customers(type, salary, amount, name) Task: Retrieve code from orders with amount above the AVG(amount) of customers rows sharing the same code. SQL:
SELECT code FROM orders AS kab WHERE amount > ( SELECT AVG(amount) FROM customers AS lex WHERE lex.code = kab.code );
{ "outer_table": "orders", "inner_table": "customers", "outer_alias": "kab", "inner_alias": "lex", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10185
train
v3
Schema: shipments (alias: vnob)(salary, status, amount, id) orders(date, status, salary, name) Task: Retrieve code from shipments with value above the MIN(salary) of orders rows sharing the same type. SQL:
SELECT code FROM shipments AS vnob WHERE value > ( SELECT MIN(salary) FROM orders AS kab WHERE kab.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10186
train
v1
Schema: orders (alias: kab)(amount, value, status, code) regions(status, id, value, level) Task: Retrieve value from orders whose id is found in regions rows where level matches the outer record. SQL:
SELECT value FROM orders AS kab WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.level = kab.level );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "kab", "inner_alias": "okiv", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10187
train
v3
Schema: projects (alias: uliv)(salary, code, value, name) products(code, amount, value, level) Task: Find name from projects where salary exceeds the count of amount from products for the same code. SQL:
SELECT name FROM projects AS uliv WHERE salary > ( SELECT COUNT(amount) FROM products AS nad WHERE nad.code = uliv.code );
{ "outer_table": "projects", "inner_table": "products", "outer_alias": "uliv", "inner_alias": "nad", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10188
train
v1
Schema: items (alias: ikob)(value, name, code, date) schedules(amount, id, status, name) Task: Select value from items where status exists in schedules for the same status. SQL:
SELECT value FROM items AS ikob WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.status = ikob.status );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "ikob", "inner_alias": "vmob", "proj_col": "value", "filter_col": "status", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10189
train
v2
Schema: regions (alias: okiv)(level, amount, value, code) staff(salary, type, code, id) Task: Find salary from regions where a matching record exists in staff with the same code. SQL:
SELECT salary FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = okiv.code );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "okiv", "inner_alias": "xnob", "proj_col": "salary", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10190
train
v1
Schema: transactions (alias: gev)(amount, salary, name, value) accounts(type, level, value, salary) Task: Select salary from transactions where status exists in accounts for the same id. SQL:
SELECT salary FROM transactions AS gev WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.id = gev.id );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "gev", "inner_alias": "jac", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10191
train
v3
Schema: departments (alias: dov)(date, level, value, name) staff(amount, name, salary, code) Task: Find amount from departments where amount exceeds the maximum amount from staff for the same id. SQL:
SELECT amount FROM departments AS dov WHERE amount > ( SELECT MAX(amount) FROM staff AS xnob WHERE xnob.id = dov.id );
{ "outer_table": "departments", "inner_table": "staff", "outer_alias": "dov", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10192
train
v1
Schema: staff (alias: xnob)(code, amount, date, salary) branches(code, id, name, value) Task: Select name from staff where code exists in branches for the same id. SQL:
SELECT name FROM staff AS xnob WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.id = xnob.id );
{ "outer_table": "staff", "inner_table": "branches", "outer_alias": "xnob", "inner_alias": "agov", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10193
train
v1
Schema: categories (alias: egiv)(status, name, type, value) accounts(type, amount, value, salary) Task: Select id from categories where type exists in accounts for the same level. SQL:
SELECT id FROM categories AS egiv WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.level = egiv.level );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "egiv", "inner_alias": "jac", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10194
train
v3
Schema: products (alias: nad)(id, salary, value, name) projects(value, date, id, salary) Task: Find code from products where value exceeds the maximum salary from projects for the same level. SQL:
SELECT code FROM products AS nad WHERE value > ( SELECT MAX(salary) FROM projects AS uliv WHERE uliv.level = nad.level );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10195
train
v2
Schema: managers (alias: hac)(salary, id, amount, value) sales(level, code, amount, name) Task: Find amount from managers where a matching record exists in sales with the same type. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = hac.type );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "amount", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10196
train
v1
Schema: managers (alias: hac)(code, salary, status, type) accounts(name, amount, type, id) Task: Find id from managers where level appears in accounts entries with matching type. SQL:
SELECT id FROM managers AS hac WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.type = hac.type );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10197
train
v3
Schema: branches (alias: agov)(code, id, value, date) employees(status, code, id, level) Task: Retrieve name from branches with value above the COUNT(amount) of employees rows sharing the same code. SQL:
SELECT name FROM branches AS agov WHERE value > ( SELECT COUNT(amount) FROM employees AS bev WHERE bev.code = agov.code );
{ "outer_table": "branches", "inner_table": "employees", "outer_alias": "agov", "inner_alias": "bev", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10198
train
v1
Schema: regions (alias: okiv)(id, date, level, type) projects(amount, name, id, status) Task: Select amount from regions where type exists in projects for the same id. SQL:
SELECT amount FROM regions AS okiv WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.id = okiv.id );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10199
train