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: tasks (alias: znob)(level, name, type, code) branches(type, date, amount, code) Task: Select amount from tasks where type exists in branches for the same code. SQL:
SELECT amount FROM tasks AS znob WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.code = znob.code );
{ "outer_table": "tasks", "inner_table": "branches", "outer_alias": "znob", "inner_alias": "agov", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07200
train
v1
Schema: sales (alias: cif)(salary, status, date, amount) accounts(name, amount, status, type) Task: Find salary from sales where type appears in accounts entries with matching level. SQL:
SELECT salary FROM sales AS cif WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.level = cif.level );
{ "outer_table": "sales", "inner_table": "accounts", "outer_alias": "cif", "inner_alias": "jac", "proj_col": "salary", "filter_col": "type", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07201
train
v1
Schema: transactions (alias: gev)(id, date, type, name) customers(type, salary, status, level) Task: Retrieve code from transactions whose level is found in customers rows where status matches the outer record. SQL:
SELECT code FROM transactions AS gev WHERE level IN ( SELECT level FROM customers AS lex WHERE lex.status = gev.status );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "gev", "inner_alias": "lex", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07202
train
v2
Schema: regions (alias: okiv)(amount, date, salary, value) accounts(value, level, code, amount) Task: Retrieve name from regions that have at least one corresponding entry in accounts sharing the same id. SQL:
SELECT name FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = okiv.id );
{ "outer_table": "regions", "inner_table": "accounts", "outer_alias": "okiv", "inner_alias": "jac", "proj_col": "name", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07203
train
v2
Schema: tasks (alias: znob)(code, type, status, name) branches(type, code, id, value) Task: Retrieve name from tasks that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT name FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = znob.code );
{ "outer_table": "tasks", "inner_table": "branches", "outer_alias": "znob", "inner_alias": "agov", "proj_col": "name", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07204
train
v2
Schema: sales (alias: cif)(name, salary, code, level) departments(name, code, level, id) Task: Find value from sales where a matching record exists in departments with the same type. SQL:
SELECT value FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = cif.type );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "value", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07205
train
v3
Schema: accounts (alias: jac)(id, status, date, value) orders(date, type, value, status) Task: Find value from accounts where amount exceeds the minimum amount from orders for the same level. SQL:
SELECT value FROM accounts AS jac WHERE amount > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.level = jac.level );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07206
train
v2
Schema: customers (alias: lex)(amount, type, id, code) items(status, value, level, id) Task: Find amount from customers where a matching record exists in items with the same type. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = lex.type );
{ "outer_table": "customers", "inner_table": "items", "outer_alias": "lex", "inner_alias": "ikob", "proj_col": "amount", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07207
train
v1
Schema: categories (alias: egiv)(type, level, code, status) items(status, name, code, amount) Task: Select id from categories where level exists in items for the same level. SQL:
SELECT id FROM categories AS egiv WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.level = egiv.level );
{ "outer_table": "categories", "inner_table": "items", "outer_alias": "egiv", "inner_alias": "ikob", "proj_col": "id", "filter_col": "level", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07208
train
v2
Schema: accounts (alias: jac)(salary, type, name, value) sales(level, id, type, code) Task: Find amount from accounts where a matching record exists in sales with the same status. SQL:
SELECT amount FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = jac.status );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "amount", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07209
train
v1
Schema: transactions (alias: gev)(name, amount, value, id) customers(amount, name, level, salary) Task: Find name from transactions where id appears in customers entries with matching status. SQL:
SELECT name FROM transactions AS gev WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.status = gev.status );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "gev", "inner_alias": "lex", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07210
train
v1
Schema: branches (alias: agov)(amount, code, salary, level) transactions(value, name, salary, type) Task: Select amount from branches where id exists in transactions for the same level. SQL:
SELECT amount FROM branches AS agov WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.level = agov.level );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "amount", "filter_col": "id", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07211
train
v2
Schema: shipments (alias: vnob)(status, salary, name, type) orders(date, amount, code, value) Task: Retrieve name from shipments that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT name FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "name", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07212
train
v1
Schema: categories (alias: egiv)(salary, amount, code, level) shipments(status, type, code, value) Task: Select value from categories where id exists in shipments for the same level. SQL:
SELECT value FROM categories AS egiv WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.level = egiv.level );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07213
train
v1
Schema: schedules (alias: vmob)(type, amount, salary, value) tasks(id, name, code, value) Task: Select amount from schedules where id exists in tasks for the same level. SQL:
SELECT amount FROM schedules AS vmob WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "amount", "filter_col": "id", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07214
train
v1
Schema: orders (alias: kab)(amount, value, code, id) schedules(level, id, name, type) Task: Find amount from orders where code appears in schedules entries with matching type. SQL:
SELECT amount FROM orders AS kab WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.type = kab.type );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07215
train
v2
Schema: schedules (alias: vmob)(value, salary, amount, id) invoices(salary, id, status, type) Task: Retrieve salary from schedules that have at least one corresponding entry in invoices sharing the same id. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "vmob", "inner_alias": "fal", "proj_col": "salary", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07216
train
v3
Schema: accounts (alias: jac)(type, value, name, amount) products(id, code, status, value) Task: Retrieve salary from accounts with salary above the MAX(value) of products rows sharing the same id. SQL:
SELECT salary FROM accounts AS jac WHERE salary > ( SELECT MAX(value) FROM products AS nad WHERE nad.id = jac.id );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "jac", "inner_alias": "nad", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07217
train
v2
Schema: shipments (alias: vnob)(amount, name, status, salary) projects(salary, code, type, amount) Task: Retrieve code from shipments that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "projects", "outer_alias": "vnob", "inner_alias": "uliv", "proj_col": "code", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07218
train
v2
Schema: transactions (alias: gev)(salary, value, level, amount) regions(status, id, amount, date) Task: Retrieve value from transactions that have at least one corresponding entry in regions sharing the same status. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = gev.status );
{ "outer_table": "transactions", "inner_table": "regions", "outer_alias": "gev", "inner_alias": "okiv", "proj_col": "value", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07219
train
v2
Schema: orders (alias: kab)(name, type, date, id) transactions(id, salary, code, value) Task: Retrieve salary from orders that have at least one corresponding entry in transactions sharing the same id. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = kab.id );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "salary", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07220
train
v3
Schema: accounts (alias: jac)(type, level, amount, date) shipments(value, code, salary, name) Task: Retrieve value from accounts with salary above the COUNT(salary) of shipments rows sharing the same level. SQL:
SELECT value FROM accounts AS jac WHERE salary > ( SELECT COUNT(salary) FROM shipments AS vnob WHERE vnob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07221
train
v1
Schema: products (alias: nad)(status, type, date, amount) accounts(type, salary, level, name) Task: Select amount from products where type exists in accounts for the same type. SQL:
SELECT amount 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": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07222
train
v3
Schema: accounts (alias: jac)(value, code, date, status) sales(level, type, code, status) Task: Retrieve salary from accounts with amount above the MIN(value) of sales rows sharing the same status. SQL:
SELECT salary FROM accounts AS jac WHERE amount > ( SELECT MIN(value) FROM sales AS cif WHERE cif.status = jac.status );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07223
train
v1
Schema: branches (alias: agov)(amount, value, name, type) staff(value, name, amount, code) Task: Select code from branches where level exists in staff for the same code. SQL:
SELECT code FROM branches AS agov WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.code = agov.code );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07224
train
v1
Schema: managers (alias: hac)(level, id, name, type) customers(status, date, code, id) Task: Retrieve salary from managers whose level is found in customers rows where code matches the outer record. SQL:
SELECT salary FROM managers AS hac WHERE level IN ( SELECT level FROM customers AS lex WHERE lex.code = hac.code );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "salary", "filter_col": "level", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07225
train
v1
Schema: branches (alias: agov)(salary, name, id, level) products(date, name, status, code) Task: Select salary from branches where code exists in products for the same type. SQL:
SELECT salary FROM branches AS agov WHERE code IN ( SELECT code FROM products AS nad WHERE nad.type = agov.type );
{ "outer_table": "branches", "inner_table": "products", "outer_alias": "agov", "inner_alias": "nad", "proj_col": "salary", "filter_col": "code", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07226
train
v3
Schema: items (alias: ikob)(status, type, name, amount) managers(level, type, code, salary) Task: Find name from items where value exceeds the total salary from managers for the same level. SQL:
SELECT name FROM items AS ikob WHERE value > ( SELECT SUM(salary) FROM managers AS hac WHERE hac.level = ikob.level );
{ "outer_table": "items", "inner_table": "managers", "outer_alias": "ikob", "inner_alias": "hac", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07227
train
v2
Schema: projects (alias: uliv)(name, type, amount, salary) invoices(code, status, amount, type) Task: Find salary from projects where a matching record exists in invoices with the same status. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.status = uliv.status );
{ "outer_table": "projects", "inner_table": "invoices", "outer_alias": "uliv", "inner_alias": "fal", "proj_col": "salary", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07228
train
v2
Schema: shipments (alias: vnob)(status, type, salary, amount) branches(level, id, date, status) Task: Find id from shipments where a matching record exists in branches with the same code. SQL:
SELECT id FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "branches", "outer_alias": "vnob", "inner_alias": "agov", "proj_col": "id", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07229
train
v3
Schema: products (alias: nad)(amount, status, name, date) employees(code, type, date, status) Task: Find salary from products where value exceeds the count of amount from employees for the same code. SQL:
SELECT salary FROM products AS nad WHERE value > ( SELECT COUNT(amount) FROM employees AS bev WHERE bev.code = nad.code );
{ "outer_table": "products", "inner_table": "employees", "outer_alias": "nad", "inner_alias": "bev", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07230
train
v2
Schema: customers (alias: lex)(type, name, date, amount) accounts(date, code, value, status) Task: Find salary from customers where a matching record exists in accounts with the same status. SQL:
SELECT salary FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = lex.status );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "lex", "inner_alias": "jac", "proj_col": "salary", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07231
train
v2
Schema: requests (alias: ejof)(date, status, value, salary) orders(amount, salary, status, id) Task: Retrieve value from requests that have at least one corresponding entry in orders sharing the same level. SQL:
SELECT value FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = ejof.level );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "value", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07232
train
v2
Schema: requests (alias: ejof)(name, type, value, level) products(amount, id, salary, type) Task: Find name from requests where a matching record exists in products with the same type. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = ejof.type );
{ "outer_table": "requests", "inner_table": "products", "outer_alias": "ejof", "inner_alias": "nad", "proj_col": "name", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07233
train
v2
Schema: projects (alias: uliv)(type, level, code, salary) departments(type, value, level, salary) Task: Find name from projects where a matching record exists in departments with the same id. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = uliv.id );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "uliv", "inner_alias": "dov", "proj_col": "name", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07234
train
v1
Schema: orders (alias: kab)(id, value, level, type) transactions(status, value, id, type) Task: Select name from orders where type exists in transactions for the same status. SQL:
SELECT name FROM orders AS kab WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.status = kab.status );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "name", "filter_col": "type", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07235
train
v2
Schema: regions (alias: okiv)(name, value, amount, level) staff(name, amount, code, status) Task: Find value from regions where a matching record exists in staff with the same code. SQL:
SELECT value 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": "value", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07236
train
v3
Schema: orders (alias: kab)(salary, amount, level, id) departments(amount, name, code, level) Task: Find name from orders where value exceeds the minimum value from departments for the same type. SQL:
SELECT name FROM orders AS kab WHERE value > ( SELECT MIN(value) FROM departments AS dov WHERE dov.type = kab.type );
{ "outer_table": "orders", "inner_table": "departments", "outer_alias": "kab", "inner_alias": "dov", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07237
train
v1
Schema: orders (alias: kab)(name, value, date, salary) requests(date, id, type, level) Task: Retrieve salary from orders whose status is found in requests rows where id matches the outer record. SQL:
SELECT salary FROM orders AS kab WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.id = kab.id );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07238
train
v1
Schema: categories (alias: egiv)(type, value, level, name) accounts(level, status, type, salary) Task: Retrieve salary from categories whose id is found in accounts rows where id matches the outer record. SQL:
SELECT salary FROM categories AS egiv WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.id = egiv.id );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "egiv", "inner_alias": "jac", "proj_col": "salary", "filter_col": "id", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07239
train
v2
Schema: branches (alias: agov)(date, amount, value, level) customers(code, salary, type, id) Task: Retrieve name from branches that have at least one corresponding entry in customers sharing the same id. SQL:
SELECT name FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = agov.id );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "name", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07240
train
v2
Schema: customers (alias: lex)(code, value, name, type) shipments(name, value, status, code) Task: Find name from customers where a matching record exists in shipments with the same type. SQL:
SELECT name FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = lex.type );
{ "outer_table": "customers", "inner_table": "shipments", "outer_alias": "lex", "inner_alias": "vnob", "proj_col": "name", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07241
train
v1
Schema: staff (alias: xnob)(amount, salary, status, date) categories(status, type, date, value) Task: Retrieve code from staff whose type is found in categories rows where status matches the outer record. SQL:
SELECT code FROM staff AS xnob WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.status = xnob.status );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07242
train
v3
Schema: employees (alias: bev)(name, salary, id, level) requests(salary, name, date, amount) Task: Find value from employees where salary exceeds the maximum value from requests for the same level. SQL:
SELECT value FROM employees AS bev WHERE salary > ( SELECT MAX(value) FROM requests AS ejof WHERE ejof.level = bev.level );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07243
train
v1
Schema: categories (alias: egiv)(name, amount, value, type) invoices(status, value, type, amount) Task: Retrieve amount from categories whose status is found in invoices rows where status matches the outer record. SQL:
SELECT amount FROM categories AS egiv WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.status = egiv.status );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07244
train
v3
Schema: regions (alias: okiv)(name, amount, code, salary) tasks(level, salary, date, amount) Task: Find value from regions where value exceeds the count of salary from tasks for the same type. SQL:
SELECT value FROM regions AS okiv WHERE value > ( SELECT COUNT(salary) FROM tasks AS znob WHERE znob.type = okiv.type );
{ "outer_table": "regions", "inner_table": "tasks", "outer_alias": "okiv", "inner_alias": "znob", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07245
train
v2
Schema: categories (alias: egiv)(level, type, status, date) projects(type, value, level, status) Task: Retrieve value from categories that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT value FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = egiv.code );
{ "outer_table": "categories", "inner_table": "projects", "outer_alias": "egiv", "inner_alias": "uliv", "proj_col": "value", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07246
train
v2
Schema: requests (alias: ejof)(type, name, date, value) accounts(type, level, amount, status) Task: Find amount from requests where a matching record exists in accounts with the same status. SQL:
SELECT amount FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = ejof.status );
{ "outer_table": "requests", "inner_table": "accounts", "outer_alias": "ejof", "inner_alias": "jac", "proj_col": "amount", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07247
train
v1
Schema: projects (alias: uliv)(type, value, level, salary) departments(name, level, status, type) Task: Retrieve code from projects whose id is found in departments rows where status matches the outer record. SQL:
SELECT code FROM projects AS uliv WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.status = uliv.status );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "uliv", "inner_alias": "dov", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07248
train
v2
Schema: staff (alias: xnob)(value, code, id, date) requests(value, id, status, salary) Task: Find name from staff where a matching record exists in requests with the same type. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.type = xnob.type );
{ "outer_table": "staff", "inner_table": "requests", "outer_alias": "xnob", "inner_alias": "ejof", "proj_col": "name", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07249
train
v2
Schema: items (alias: ikob)(salary, code, type, id) departments(value, name, status, type) Task: Find code from items where a matching record exists in departments with the same level. SQL:
SELECT code FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = ikob.level );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "ikob", "inner_alias": "dov", "proj_col": "code", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07250
train
v1
Schema: accounts (alias: jac)(status, type, date, level) tasks(code, id, salary, level) Task: Retrieve value from accounts whose id is found in tasks rows where id matches the outer record. SQL:
SELECT value FROM accounts AS jac WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.id = jac.id );
{ "outer_table": "accounts", "inner_table": "tasks", "outer_alias": "jac", "inner_alias": "znob", "proj_col": "value", "filter_col": "id", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07251
train
v3
Schema: employees (alias: bev)(status, id, value, level) products(amount, status, salary, level) Task: Retrieve value from employees with salary above the AVG(value) of products rows sharing the same level. SQL:
SELECT value FROM employees AS bev WHERE salary > ( SELECT AVG(value) FROM products AS nad WHERE nad.level = bev.level );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07252
train
v2
Schema: products (alias: nad)(value, salary, amount, level) orders(status, level, type, name) Task: Retrieve salary from products that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT salary FROM products AS nad WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = nad.type );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "nad", "inner_alias": "kab", "proj_col": "salary", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07253
train
v2
Schema: managers (alias: hac)(code, salary, value, level) transactions(code, type, name, date) Task: Find name from managers where a matching record exists in transactions with the same code. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = hac.code );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "name", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07254
train
v1
Schema: schedules (alias: vmob)(value, id, salary, level) transactions(code, id, value, date) Task: Retrieve salary from schedules whose status is found in transactions rows where level matches the outer record. SQL:
SELECT salary FROM schedules AS vmob WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "transactions", "outer_alias": "vmob", "inner_alias": "gev", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07255
train
v1
Schema: departments (alias: dov)(status, name, salary, value) shipments(amount, level, date, status) Task: Select name from departments where code exists in shipments for the same level. SQL:
SELECT name FROM departments AS dov WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.level = dov.level );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "name", "filter_col": "code", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07256
train
v3
Schema: categories (alias: egiv)(salary, level, id, value) invoices(name, id, date, level) Task: Find salary from categories where amount exceeds the minimum salary from invoices for the same code. SQL:
SELECT salary FROM categories AS egiv WHERE amount > ( SELECT MIN(salary) FROM invoices AS fal WHERE fal.code = egiv.code );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07257
train
v1
Schema: staff (alias: xnob)(level, id, type, status) shipments(code, status, value, amount) Task: Select name from staff where status exists in shipments for the same id. SQL:
SELECT name FROM staff AS xnob WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.id = xnob.id );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07258
train
v1
Schema: requests (alias: ejof)(value, level, type, salary) projects(date, status, value, code) Task: Retrieve id from requests whose type is found in projects rows where status matches the outer record. SQL:
SELECT id FROM requests AS ejof WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.status = ejof.status );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07259
train
v2
Schema: categories (alias: egiv)(value, salary, code, status) sales(code, amount, level, value) Task: Retrieve id from categories that have at least one corresponding entry in sales sharing the same status. SQL:
SELECT id FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = egiv.status );
{ "outer_table": "categories", "inner_table": "sales", "outer_alias": "egiv", "inner_alias": "cif", "proj_col": "id", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07260
train
v2
Schema: sales (alias: cif)(name, id, date, amount) orders(date, type, level, name) Task: Find salary from sales where a matching record exists in orders with the same level. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = cif.level );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "salary", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07261
train
v3
Schema: products (alias: nad)(name, amount, salary, status) regions(id, status, date, level) Task: Find salary from products where value exceeds the count of salary from regions for the same code. SQL:
SELECT salary FROM products AS nad WHERE value > ( SELECT COUNT(salary) FROM regions AS okiv WHERE okiv.code = nad.code );
{ "outer_table": "products", "inner_table": "regions", "outer_alias": "nad", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07262
train
v1
Schema: products (alias: nad)(salary, type, level, status) transactions(date, salary, id, level) Task: Find id from products where level appears in transactions entries with matching level. SQL:
SELECT id FROM products AS nad WHERE level IN ( SELECT level FROM transactions AS gev WHERE gev.level = nad.level );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "id", "filter_col": "level", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07263
train
v2
Schema: invoices (alias: fal)(date, name, type, salary) customers(type, code, value, status) Task: Retrieve name from invoices that have at least one corresponding entry in customers sharing the same status. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = fal.status );
{ "outer_table": "invoices", "inner_table": "customers", "outer_alias": "fal", "inner_alias": "lex", "proj_col": "name", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07264
train
v3
Schema: orders (alias: kab)(salary, value, amount, level) shipments(id, code, name, status) Task: Find amount from orders where value exceeds the count of value from shipments for the same level. SQL:
SELECT amount FROM orders AS kab WHERE value > ( SELECT COUNT(value) FROM shipments AS vnob WHERE vnob.level = kab.level );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07265
train
v2
Schema: sales (alias: cif)(name, level, value, date) regions(date, level, salary, code) Task: Retrieve value from sales that have at least one corresponding entry in regions sharing the same id. SQL:
SELECT value FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = cif.id );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "value", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07266
train
v1
Schema: branches (alias: agov)(code, value, name, amount) transactions(level, type, code, date) Task: Find amount from branches where status appears in transactions entries with matching level. SQL:
SELECT amount FROM branches AS agov WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.level = agov.level );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07267
train
v2
Schema: sales (alias: cif)(level, code, salary, status) accounts(level, name, code, value) Task: Retrieve name from sales that have at least one corresponding entry in accounts sharing the same status. SQL:
SELECT name FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = cif.status );
{ "outer_table": "sales", "inner_table": "accounts", "outer_alias": "cif", "inner_alias": "jac", "proj_col": "name", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07268
train
v2
Schema: regions (alias: okiv)(amount, salary, type, status) branches(type, value, name, status) Task: Retrieve name from regions that have at least one corresponding entry in branches sharing the same level. SQL:
SELECT name FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.level = okiv.level );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "okiv", "inner_alias": "agov", "proj_col": "name", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07269
train
v3
Schema: items (alias: ikob)(code, salary, value, level) branches(salary, date, code, level) Task: Retrieve name from items with salary above the MAX(value) of branches rows sharing the same status. SQL:
SELECT name FROM items AS ikob WHERE salary > ( SELECT MAX(value) FROM branches AS agov WHERE agov.status = ikob.status );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07270
train
v2
Schema: shipments (alias: vnob)(date, name, code, status) items(salary, status, value, date) Task: Retrieve salary from shipments that have at least one corresponding entry in items sharing the same id. SQL:
SELECT salary FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "items", "outer_alias": "vnob", "inner_alias": "ikob", "proj_col": "salary", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07271
train
v2
Schema: managers (alias: hac)(type, level, code, status) invoices(level, status, salary, date) Task: Retrieve code from managers that have at least one corresponding entry in invoices sharing the same type. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = hac.type );
{ "outer_table": "managers", "inner_table": "invoices", "outer_alias": "hac", "inner_alias": "fal", "proj_col": "code", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07272
train
v3
Schema: requests (alias: ejof)(id, date, value, type) employees(level, amount, code, name) Task: Find amount from requests where amount exceeds the maximum salary from employees for the same code. SQL:
SELECT amount FROM requests AS ejof WHERE amount > ( SELECT MAX(salary) FROM employees AS bev WHERE bev.code = ejof.code );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ejof", "inner_alias": "bev", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07273
train
v1
Schema: accounts (alias: jac)(code, value, amount, salary) items(name, amount, salary, level) Task: Retrieve code from accounts whose id is found in items rows where status matches the outer record. SQL:
SELECT code FROM accounts AS jac WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07274
train
v3
Schema: products (alias: nad)(date, id, salary, code) schedules(code, date, name, value) Task: Find id from products where salary exceeds the minimum amount from schedules for the same id. SQL:
SELECT id FROM products AS nad WHERE salary > ( SELECT MIN(amount) FROM schedules AS vmob WHERE vmob.id = nad.id );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07275
train
v3
Schema: transactions (alias: gev)(type, amount, salary, id) invoices(code, name, salary, value) Task: Find name from transactions where value exceeds the total amount from invoices for the same id. SQL:
SELECT name FROM transactions AS gev WHERE value > ( SELECT SUM(amount) FROM invoices AS fal WHERE fal.id = gev.id );
{ "outer_table": "transactions", "inner_table": "invoices", "outer_alias": "gev", "inner_alias": "fal", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07276
train
v2
Schema: sales (alias: cif)(salary, value, date, id) staff(status, name, value, amount) Task: Find salary from sales where a matching record exists in staff with the same status. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = cif.status );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "salary", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07277
train
v3
Schema: categories (alias: egiv)(level, salary, code, type) invoices(name, date, type, value) Task: Find id from categories where salary exceeds the maximum salary from invoices for the same status. SQL:
SELECT id FROM categories AS egiv WHERE salary > ( SELECT MAX(salary) FROM invoices AS fal WHERE fal.status = egiv.status );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07278
train
v2
Schema: orders (alias: kab)(type, amount, id, name) regions(date, code, id, name) Task: Retrieve amount from orders that have at least one corresponding entry in regions sharing the same type. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = kab.type );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "kab", "inner_alias": "okiv", "proj_col": "amount", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07279
train
v3
Schema: shipments (alias: vnob)(date, status, salary, id) requests(type, code, status, value) Task: Find amount from shipments where value exceeds the total value from requests for the same status. SQL:
SELECT amount FROM shipments AS vnob WHERE value > ( SELECT SUM(value) FROM requests AS ejof WHERE ejof.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "requests", "outer_alias": "vnob", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07280
train
v2
Schema: categories (alias: egiv)(type, amount, status, level) schedules(status, amount, name, level) Task: Find code from categories where a matching record exists in schedules with the same type. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "egiv", "inner_alias": "vmob", "proj_col": "code", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07281
train
v2
Schema: categories (alias: egiv)(id, code, name, type) products(code, type, amount, id) Task: Find id from categories where a matching record exists in products with the same level. SQL:
SELECT id FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = egiv.level );
{ "outer_table": "categories", "inner_table": "products", "outer_alias": "egiv", "inner_alias": "nad", "proj_col": "id", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07282
train
v2
Schema: categories (alias: egiv)(value, salary, amount, name) departments(value, id, date, amount) Task: Retrieve salary from categories that have at least one corresponding entry in departments sharing the same id. SQL:
SELECT salary FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = egiv.id );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "salary", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07283
train
v1
Schema: transactions (alias: gev)(value, type, level, code) invoices(level, value, salary, date) Task: Retrieve amount from transactions whose type is found in invoices rows where type matches the outer record. SQL:
SELECT amount FROM transactions AS gev WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.type = gev.type );
{ "outer_table": "transactions", "inner_table": "invoices", "outer_alias": "gev", "inner_alias": "fal", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07284
train
v1
Schema: customers (alias: lex)(name, status, type, salary) schedules(id, date, code, status) Task: Select code from customers where status exists in schedules for the same level. SQL:
SELECT code FROM customers AS lex WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.level = lex.level );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "code", "filter_col": "status", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07285
train
v1
Schema: tasks (alias: znob)(status, amount, code, level) accounts(level, id, value, amount) Task: Select amount from tasks where code exists in accounts for the same type. SQL:
SELECT amount FROM tasks AS znob WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.type = znob.type );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07286
train
v1
Schema: schedules (alias: vmob)(status, date, type, salary) orders(date, name, status, id) Task: Retrieve name from schedules whose code is found in orders rows where code matches the outer record. SQL:
SELECT name 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": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07287
train
v1
Schema: invoices (alias: fal)(value, salary, id, code) accounts(type, amount, status, salary) Task: Retrieve code from invoices whose id is found in accounts rows where level matches the outer record. SQL:
SELECT code FROM invoices AS fal WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.level = fal.level );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07288
train
v3
Schema: invoices (alias: fal)(salary, value, date, id) items(salary, value, name, status) Task: Find name from invoices where salary exceeds the minimum salary from items for the same code. SQL:
SELECT name FROM invoices AS fal WHERE salary > ( SELECT MIN(salary) FROM items AS ikob WHERE ikob.code = fal.code );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "fal", "inner_alias": "ikob", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07289
train
v1
Schema: accounts (alias: jac)(type, level, status, value) schedules(value, name, date, level) Task: Select code from accounts where code exists in schedules for the same code. SQL:
SELECT code FROM accounts AS jac WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.code = jac.code );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07290
train
v2
Schema: schedules (alias: vmob)(amount, code, value, type) requests(amount, status, type, name) Task: Find amount from schedules where a matching record exists in requests with the same level. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "requests", "outer_alias": "vmob", "inner_alias": "ejof", "proj_col": "amount", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07291
train
v2
Schema: projects (alias: uliv)(name, id, amount, level) requests(date, id, level, status) Task: Retrieve value from projects that have at least one corresponding entry in requests sharing the same level. SQL:
SELECT value FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.level = uliv.level );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "value", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07292
train
v1
Schema: branches (alias: agov)(value, date, code, amount) orders(salary, status, id, value) Task: Retrieve code from branches whose id is found in orders rows where id matches the outer record. SQL:
SELECT code FROM branches AS agov WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.id = agov.id );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "code", "filter_col": "id", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07293
train
v2
Schema: regions (alias: okiv)(status, salary, level, type) transactions(date, name, level, value) Task: Retrieve id from regions that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT id FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = okiv.code );
{ "outer_table": "regions", "inner_table": "transactions", "outer_alias": "okiv", "inner_alias": "gev", "proj_col": "id", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07294
train
v2
Schema: schedules (alias: vmob)(code, date, status, name) managers(type, status, amount, level) Task: Find value from schedules where a matching record exists in managers with the same status. SQL:
SELECT value FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "value", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07295
train
v2
Schema: accounts (alias: jac)(level, value, type, id) schedules(level, type, status, date) Task: Retrieve name from accounts that have at least one corresponding entry in schedules sharing the same id. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.id = jac.id );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "name", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07296
train
v1
Schema: orders (alias: kab)(salary, id, value, type) sales(status, level, amount, date) Task: Select name from orders where status exists in sales for the same type. SQL:
SELECT name FROM orders AS kab WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.type = kab.type );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07297
train
v1
Schema: products (alias: nad)(id, name, type, status) shipments(level, date, id, amount) Task: Select amount from products where level exists in shipments for the same type. SQL:
SELECT amount FROM products AS nad WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.type = nad.type );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "level", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07298
train
v3
Schema: orders (alias: kab)(amount, level, code, value) items(status, name, code, level) Task: Retrieve name from orders with amount above the COUNT(amount) of items rows sharing the same type. SQL:
SELECT name FROM orders AS kab WHERE amount > ( SELECT COUNT(amount) FROM items AS ikob WHERE ikob.type = kab.type );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "kab", "inner_alias": "ikob", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07299
train