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: shipments (alias: vnob)(id, status, type, name) regions(date, name, status, amount) Task: Find name from shipments where salary exceeds the average value from regions for the same code. SQL:
SELECT name FROM shipments AS vnob WHERE salary > ( SELECT AVG(value) FROM regions AS okiv WHERE okiv.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_05300
train
v2
Schema: tasks (alias: znob)(amount, code, salary, id) managers(date, amount, code, value) Task: Find id from tasks where a matching record exists in managers with the same level. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = znob.level );
{ "outer_table": "tasks", "inner_table": "managers", "outer_alias": "znob", "inner_alias": "hac", "proj_col": "id", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_05301
train
v1
Schema: tasks (alias: znob)(name, value, code, date) items(salary, type, level, id) Task: Retrieve name from tasks whose level is found in items rows where id matches the outer record. SQL:
SELECT name FROM tasks AS znob WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "name", "filter_col": "level", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_05302
train
v3
Schema: employees (alias: bev)(amount, date, name, code) tasks(code, name, value, status) Task: Retrieve salary from employees with value above the COUNT(salary) of tasks rows sharing the same level. SQL:
SELECT salary FROM employees AS bev WHERE value > ( SELECT COUNT(salary) FROM tasks AS znob WHERE znob.level = bev.level );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05303
train
v3
Schema: managers (alias: hac)(amount, type, level, code) projects(id, name, salary, value) Task: Retrieve value from managers with salary above the MAX(value) of projects rows sharing the same id. SQL:
SELECT value FROM managers AS hac WHERE salary > ( SELECT MAX(value) FROM projects AS uliv WHERE uliv.id = hac.id );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "hac", "inner_alias": "uliv", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05304
train
v1
Schema: regions (alias: okiv)(type, id, amount, value) sales(date, salary, amount, code) Task: Retrieve name from regions whose status is found in sales rows where id matches the outer record. SQL:
SELECT name FROM regions AS okiv WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.id = okiv.id );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_05305
train
v2
Schema: invoices (alias: fal)(level, status, id, date) customers(status, code, id, amount) Task: Find id from invoices where a matching record exists in customers with the same status. SQL:
SELECT id 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": "id", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05306
train
v3
Schema: invoices (alias: fal)(level, name, type, value) departments(salary, value, code, amount) Task: Find name from invoices where amount exceeds the maximum salary from departments for the same status. SQL:
SELECT name FROM invoices AS fal WHERE amount > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.status = fal.status );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05307
train
v3
Schema: tasks (alias: znob)(name, date, status, type) employees(name, level, salary, code) Task: Find salary from tasks where salary exceeds the average value from employees for the same id. SQL:
SELECT salary FROM tasks AS znob WHERE salary > ( SELECT AVG(value) FROM employees AS bev WHERE bev.id = znob.id );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_05308
train
v3
Schema: tasks (alias: znob)(salary, code, value, type) projects(name, value, type, id) Task: Find salary from tasks where salary exceeds the maximum salary from projects for the same code. SQL:
SELECT salary FROM tasks AS znob WHERE salary > ( SELECT MAX(salary) FROM projects AS uliv WHERE uliv.code = znob.code );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_05309
train
v3
Schema: requests (alias: ejof)(level, date, status, salary) items(type, status, value, id) Task: Retrieve name from requests with salary above the AVG(value) of items rows sharing the same type. SQL:
SELECT name FROM requests AS ejof WHERE salary > ( SELECT AVG(value) FROM items AS ikob WHERE ikob.type = ejof.type );
{ "outer_table": "requests", "inner_table": "items", "outer_alias": "ejof", "inner_alias": "ikob", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_05310
train
v3
Schema: regions (alias: okiv)(amount, value, salary, status) products(level, type, value, salary) Task: Retrieve amount from regions with value above the AVG(amount) of products rows sharing the same level. SQL:
SELECT amount FROM regions AS okiv WHERE value > ( SELECT AVG(amount) FROM products AS nad WHERE nad.level = okiv.level );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_05311
train
v2
Schema: shipments (alias: vnob)(type, value, amount, name) transactions(date, name, salary, id) Task: Find value from shipments where a matching record exists in transactions with the same status. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "transactions", "outer_alias": "vnob", "inner_alias": "gev", "proj_col": "value", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_05312
train
v3
Schema: transactions (alias: gev)(salary, amount, status, date) projects(name, code, date, id) Task: Retrieve code from transactions with value above the MAX(value) of projects rows sharing the same status. SQL:
SELECT code FROM transactions AS gev WHERE value > ( SELECT MAX(value) FROM projects AS uliv WHERE uliv.status = gev.status );
{ "outer_table": "transactions", "inner_table": "projects", "outer_alias": "gev", "inner_alias": "uliv", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05313
train
v1
Schema: employees (alias: bev)(salary, name, code, level) items(name, code, value, status) Task: Retrieve salary from employees whose id is found in items rows where status matches the outer record. SQL:
SELECT salary FROM employees AS bev WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.status = bev.status );
{ "outer_table": "employees", "inner_table": "items", "outer_alias": "bev", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05314
train
v2
Schema: products (alias: nad)(date, name, status, code) branches(salary, level, code, name) Task: Find value from products where a matching record exists in branches with the same id. SQL:
SELECT value FROM products AS nad WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = nad.id );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "value", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05315
train
v2
Schema: regions (alias: okiv)(date, amount, salary, status) tasks(code, name, id, amount) Task: Retrieve amount from regions that have at least one corresponding entry in tasks sharing the same type. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = okiv.type );
{ "outer_table": "regions", "inner_table": "tasks", "outer_alias": "okiv", "inner_alias": "znob", "proj_col": "amount", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_05316
train
v3
Schema: shipments (alias: vnob)(type, status, amount, code) categories(level, amount, code, id) Task: Retrieve name from shipments with value above the MIN(salary) of categories rows sharing the same type. SQL:
SELECT name FROM shipments AS vnob WHERE value > ( SELECT MIN(salary) FROM categories AS egiv WHERE egiv.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "categories", "outer_alias": "vnob", "inner_alias": "egiv", "proj_col": "name", "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_05317
train
v3
Schema: staff (alias: xnob)(id, salary, status, level) shipments(amount, name, id, type) Task: Find salary from staff where value exceeds the maximum amount from shipments for the same status. SQL:
SELECT salary FROM staff AS xnob WHERE value > ( SELECT MAX(amount) FROM shipments AS vnob WHERE vnob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_05318
train
v3
Schema: accounts (alias: jac)(value, name, date, code) sales(name, level, type, amount) Task: Find code from accounts where value exceeds the average salary from sales for the same status. SQL:
SELECT code FROM accounts AS jac WHERE value > ( SELECT AVG(salary) FROM sales AS cif WHERE cif.status = jac.status );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05319
train
v3
Schema: branches (alias: agov)(value, type, id, salary) accounts(name, salary, value, level) Task: Retrieve value from branches with value above the COUNT(value) of accounts rows sharing the same type. SQL:
SELECT value FROM branches AS agov WHERE value > ( SELECT COUNT(value) FROM accounts AS jac WHERE jac.type = agov.type );
{ "outer_table": "branches", "inner_table": "accounts", "outer_alias": "agov", "inner_alias": "jac", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_05320
train
v3
Schema: schedules (alias: vmob)(code, date, type, id) sales(code, id, salary, type) Task: Find amount from schedules where salary exceeds the maximum salary from sales for the same code. SQL:
SELECT amount FROM schedules AS vmob WHERE salary > ( SELECT MAX(salary) FROM sales AS cif WHERE cif.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "vmob", "inner_alias": "cif", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_05321
train
v2
Schema: requests (alias: ejof)(status, value, id, level) managers(name, amount, level, id) Task: Retrieve name from requests that have at least one corresponding entry in managers sharing the same level. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = ejof.level );
{ "outer_table": "requests", "inner_table": "managers", "outer_alias": "ejof", "inner_alias": "hac", "proj_col": "name", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_05322
train
v3
Schema: orders (alias: kab)(status, salary, name, type) projects(salary, code, id, level) Task: Retrieve code from orders with value above the COUNT(salary) of projects rows sharing the same code. SQL:
SELECT code FROM orders AS kab WHERE value > ( SELECT COUNT(salary) FROM projects AS uliv WHERE uliv.code = kab.code );
{ "outer_table": "orders", "inner_table": "projects", "outer_alias": "kab", "inner_alias": "uliv", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05323
train
v2
Schema: items (alias: ikob)(code, name, salary, level) accounts(status, date, level, salary) Task: Retrieve value from items that have at least one corresponding entry in accounts sharing the same id. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = ikob.id );
{ "outer_table": "items", "inner_table": "accounts", "outer_alias": "ikob", "inner_alias": "jac", "proj_col": "value", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_05324
train
v3
Schema: requests (alias: ejof)(code, status, amount, salary) shipments(status, salary, code, type) Task: Retrieve id from requests with amount above the MIN(salary) of shipments rows sharing the same code. SQL:
SELECT id FROM requests AS ejof WHERE amount > ( SELECT MIN(salary) FROM shipments AS vnob WHERE vnob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ejof", "inner_alias": "vnob", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_05325
train
v3
Schema: products (alias: nad)(status, type, value, code) departments(level, code, type, id) Task: Find id from products where value exceeds the count of amount from departments for the same code. SQL:
SELECT id FROM products AS nad WHERE value > ( SELECT COUNT(amount) FROM departments AS dov WHERE dov.code = nad.code );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "id", "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_05326
train
v3
Schema: sales (alias: cif)(type, status, id, name) accounts(amount, value, salary, level) Task: Find code from sales where value exceeds the average salary from accounts for the same code. SQL:
SELECT code FROM sales AS cif WHERE value > ( SELECT AVG(salary) FROM accounts AS jac WHERE jac.code = cif.code );
{ "outer_table": "sales", "inner_table": "accounts", "outer_alias": "cif", "inner_alias": "jac", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05327
train
v1
Schema: transactions (alias: gev)(name, id, salary, code) projects(date, status, code, name) Task: Retrieve value from transactions whose status is found in projects rows where type matches the outer record. SQL:
SELECT value FROM transactions AS gev WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.type = gev.type );
{ "outer_table": "transactions", "inner_table": "projects", "outer_alias": "gev", "inner_alias": "uliv", "proj_col": "value", "filter_col": "status", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05328
train
v1
Schema: branches (alias: agov)(salary, amount, id, name) regions(date, level, type, name) Task: Retrieve code from branches whose id is found in regions rows where id matches the outer record. SQL:
SELECT code FROM branches AS agov WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.id = agov.id );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "code", "filter_col": "id", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_05329
train
v1
Schema: projects (alias: uliv)(name, level, type, date) items(type, amount, level, code) Task: Retrieve value from projects whose status is found in items rows where level matches the outer record. SQL:
SELECT value FROM projects AS uliv WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_05330
train
v1
Schema: regions (alias: okiv)(value, amount, code, id) sales(amount, name, salary, status) Task: Find name from regions where status appears in sales entries with matching status. SQL:
SELECT name FROM regions AS okiv WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.status = okiv.status );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_05331
train
v2
Schema: employees (alias: bev)(salary, date, level, code) regions(salary, level, id, name) Task: Find salary from employees where a matching record exists in regions with the same status. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = bev.status );
{ "outer_table": "employees", "inner_table": "regions", "outer_alias": "bev", "inner_alias": "okiv", "proj_col": "salary", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05332
train
v3
Schema: requests (alias: ejof)(level, name, salary, type) accounts(name, value, type, status) Task: Find code from requests where salary exceeds the minimum salary from accounts for the same level. SQL:
SELECT code FROM requests AS ejof WHERE salary > ( SELECT MIN(salary) FROM accounts AS jac WHERE jac.level = ejof.level );
{ "outer_table": "requests", "inner_table": "accounts", "outer_alias": "ejof", "inner_alias": "jac", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_05333
train
v3
Schema: managers (alias: hac)(code, level, value, status) departments(code, name, value, level) Task: Find salary from managers where amount exceeds the total salary from departments for the same level. SQL:
SELECT salary FROM managers AS hac WHERE amount > ( SELECT SUM(salary) FROM departments AS dov WHERE dov.level = hac.level );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05334
train
v1
Schema: transactions (alias: gev)(status, id, code, date) regions(value, name, date, amount) Task: Retrieve value from transactions whose level is found in regions rows where type matches the outer record. SQL:
SELECT value FROM transactions AS gev WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.type = gev.type );
{ "outer_table": "transactions", "inner_table": "regions", "outer_alias": "gev", "inner_alias": "okiv", "proj_col": "value", "filter_col": "level", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05335
train
v2
Schema: requests (alias: ejof)(level, code, name, amount) shipments(name, type, value, id) Task: Find id from requests where a matching record exists in shipments with the same id. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ejof", "inner_alias": "vnob", "proj_col": "id", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_05336
train
v1
Schema: shipments (alias: vnob)(code, value, type, amount) orders(value, name, id, amount) Task: Retrieve amount from shipments whose id is found in orders rows where type matches the outer record. SQL:
SELECT amount FROM shipments AS vnob WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_05337
train
v1
Schema: managers (alias: hac)(amount, level, status, code) projects(status, amount, value, id) Task: Select code from managers where id exists in projects for the same status. SQL:
SELECT code FROM managers AS hac WHERE id IN ( SELECT id FROM projects AS uliv WHERE uliv.status = hac.status );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "hac", "inner_alias": "uliv", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05338
train
v2
Schema: customers (alias: lex)(code, status, date, name) items(level, status, type, code) Task: Find name from customers where a matching record exists in items with the same type. SQL:
SELECT name 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": "name", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05339
train
v3
Schema: categories (alias: egiv)(name, id, salary, level) departments(id, type, salary, status) Task: Retrieve name from categories with salary above the MAX(amount) of departments rows sharing the same level. SQL:
SELECT name FROM categories AS egiv WHERE salary > ( SELECT MAX(amount) FROM departments AS dov WHERE dov.level = egiv.level );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_05340
train
v2
Schema: tasks (alias: znob)(status, id, salary, level) customers(status, type, name, code) Task: Retrieve amount from tasks that have at least one corresponding entry in customers sharing the same status. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = znob.status );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "znob", "inner_alias": "lex", "proj_col": "amount", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_05341
train
v3
Schema: departments (alias: dov)(id, date, name, amount) transactions(status, level, name, salary) Task: Retrieve name from departments with amount above the MIN(salary) of transactions rows sharing the same type. SQL:
SELECT name FROM departments AS dov WHERE amount > ( SELECT MIN(salary) FROM transactions AS gev WHERE gev.type = dov.type );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dov", "inner_alias": "gev", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05342
train
v1
Schema: items (alias: ikob)(name, level, code, date) employees(name, amount, status, salary) Task: Find code from items where id appears in employees entries with matching type. SQL:
SELECT code FROM items AS ikob WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.type = ikob.type );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "code", "filter_col": "id", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_05343
train
v1
Schema: managers (alias: hac)(name, level, id, date) sales(name, salary, id, type) Task: Select value from managers where type exists in sales for the same level. SQL:
SELECT value FROM managers AS hac WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.level = hac.level );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "value", "filter_col": "type", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05344
train
v3
Schema: projects (alias: uliv)(value, id, salary, level) accounts(type, status, name, date) Task: Retrieve name from projects with value above the AVG(salary) of accounts rows sharing the same status. SQL:
SELECT name FROM projects AS uliv WHERE value > ( SELECT AVG(salary) FROM accounts AS jac WHERE jac.status = uliv.status );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_05345
train
v3
Schema: managers (alias: hac)(level, date, salary, type) accounts(salary, amount, value, status) Task: Find code from managers where salary exceeds the maximum amount from accounts for the same code. SQL:
SELECT code FROM managers AS hac WHERE salary > ( SELECT MAX(amount) FROM accounts AS jac WHERE jac.code = hac.code );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05346
train
v1
Schema: accounts (alias: jac)(value, type, code, date) employees(amount, value, code, id) Task: Find id from accounts where code appears in employees entries with matching type. SQL:
SELECT id FROM accounts AS jac WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.type = jac.type );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05347
train
v2
Schema: regions (alias: okiv)(code, amount, type, level) sales(name, code, date, type) Task: Find amount from regions where a matching record exists in sales with the same level. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = okiv.level );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "amount", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_05348
train
v3
Schema: items (alias: ikob)(code, type, value, date) customers(status, id, amount, name) Task: Find amount from items where salary exceeds the total value from customers for the same type. SQL:
SELECT amount FROM items AS ikob WHERE salary > ( SELECT SUM(value) FROM customers AS lex WHERE lex.type = ikob.type );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_05349
train
v3
Schema: regions (alias: okiv)(type, name, salary, level) shipments(level, amount, code, type) Task: Retrieve code from regions with amount above the COUNT(value) of shipments rows sharing the same status. SQL:
SELECT code FROM regions AS okiv WHERE amount > ( SELECT COUNT(value) FROM shipments AS vnob WHERE vnob.status = okiv.status );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "okiv", "inner_alias": "vnob", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_05350
train
v3
Schema: tasks (alias: znob)(value, name, type, salary) items(value, level, type, salary) Task: Retrieve name from tasks with salary above the MAX(value) of items rows sharing the same status. SQL:
SELECT name FROM tasks AS znob WHERE salary > ( SELECT MAX(value) FROM items AS ikob WHERE ikob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_05351
train
v1
Schema: customers (alias: lex)(id, amount, salary, code) requests(value, level, salary, code) Task: Retrieve value from customers whose type is found in requests rows where code matches the outer record. SQL:
SELECT value FROM customers AS lex WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.code = lex.code );
{ "outer_table": "customers", "inner_table": "requests", "outer_alias": "lex", "inner_alias": "ejof", "proj_col": "value", "filter_col": "type", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05352
train
v3
Schema: shipments (alias: vnob)(id, date, code, salary) employees(date, status, salary, level) Task: Retrieve value from shipments with amount above the COUNT(amount) of employees rows sharing the same code. SQL:
SELECT value FROM shipments AS vnob WHERE amount > ( SELECT COUNT(amount) FROM employees AS bev WHERE bev.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_05353
train
v3
Schema: staff (alias: xnob)(name, code, id, amount) products(name, id, salary, type) Task: Find amount from staff where value exceeds the count of salary from products for the same type. SQL:
SELECT amount FROM staff AS xnob WHERE value > ( SELECT COUNT(salary) FROM products AS nad WHERE nad.type = xnob.type );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_05354
train
v1
Schema: requests (alias: ejof)(type, name, id, date) orders(type, amount, id, level) Task: Find amount from requests where level appears in orders entries with matching id. SQL:
SELECT amount FROM requests AS ejof WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.id = ejof.id );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_05355
train
v1
Schema: regions (alias: okiv)(date, type, amount, name) items(level, amount, name, salary) Task: Select value from regions where level exists in items for the same id. SQL:
SELECT value FROM regions AS okiv WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.id = okiv.id );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "value", "filter_col": "level", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_05356
train
v2
Schema: schedules (alias: vmob)(date, code, name, id) regions(type, code, salary, value) Task: Retrieve salary from schedules that have at least one corresponding entry in regions sharing the same id. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "salary", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_05357
train
v3
Schema: tasks (alias: znob)(name, date, amount, salary) orders(id, salary, amount, date) 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_05358
train
v3
Schema: departments (alias: dov)(amount, date, salary, level) projects(type, salary, name, amount) Task: Find name from departments where salary exceeds the maximum salary from projects for the same status. SQL:
SELECT name FROM departments AS dov WHERE salary > ( SELECT MAX(salary) FROM projects AS uliv WHERE uliv.status = dov.status );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05359
train
v1
Schema: shipments (alias: vnob)(salary, amount, name, type) regions(status, value, salary, type) Task: Find id from shipments where status appears in regions entries with matching status. SQL:
SELECT id FROM shipments AS vnob WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_05360
train
v2
Schema: projects (alias: uliv)(value, name, amount, date) customers(date, status, amount, level) Task: Retrieve id from projects that have at least one corresponding entry in customers sharing the same level. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = uliv.level );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "uliv", "inner_alias": "lex", "proj_col": "id", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_05361
train
v2
Schema: managers (alias: hac)(id, name, status, amount) tasks(name, id, date, value) Task: Retrieve id from managers that have at least one corresponding entry in tasks sharing the same type. SQL:
SELECT id FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = hac.type );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "id", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05362
train
v1
Schema: staff (alias: xnob)(amount, id, name, date) departments(code, level, value, id) Task: Retrieve value from staff whose type is found in departments rows where id matches the outer record. SQL:
SELECT value FROM staff AS xnob WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.id = xnob.id );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "value", "filter_col": "type", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_05363
train
v2
Schema: branches (alias: agov)(type, value, date, code) customers(type, level, status, code) Task: Retrieve code from branches that have at least one corresponding entry in customers sharing the same status. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = agov.status );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "code", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_05364
train
v3
Schema: transactions (alias: gev)(id, value, amount, salary) staff(status, code, date, amount) Task: Find name from transactions where amount exceeds the minimum salary from staff for the same id. SQL:
SELECT name FROM transactions AS gev WHERE amount > ( SELECT MIN(salary) FROM staff AS xnob WHERE xnob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05365
train
v2
Schema: products (alias: nad)(amount, id, date, type) managers(amount, level, status, value) Task: Find value from products where a matching record exists in managers with the same type. SQL:
SELECT value FROM products AS nad WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = nad.type );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "nad", "inner_alias": "hac", "proj_col": "value", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05366
train
v1
Schema: categories (alias: egiv)(name, id, salary, level) invoices(id, amount, salary, status) Task: Find id from categories where status appears in invoices entries with matching code. SQL:
SELECT id FROM categories AS egiv WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.code = egiv.code );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_05367
train
v2
Schema: employees (alias: bev)(salary, type, code, id) products(level, id, code, salary) Task: Find id from employees where a matching record exists in products with the same type. SQL:
SELECT id FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = bev.type );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "id", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05368
train
v1
Schema: schedules (alias: vmob)(date, id, level, amount) tasks(code, status, value, type) Task: Retrieve id from schedules whose id is found in tasks rows where code matches the outer record. SQL:
SELECT id FROM schedules AS vmob WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "id", "filter_col": "id", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_05369
train
v3
Schema: products (alias: nad)(id, date, salary, name) projects(id, level, amount, name) Task: Retrieve name from products with amount above the SUM(salary) of projects rows sharing the same id. SQL:
SELECT name FROM products AS nad WHERE amount > ( SELECT SUM(salary) FROM projects AS uliv WHERE uliv.id = nad.id );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05370
train
v1
Schema: schedules (alias: vmob)(status, type, salary, value) managers(name, date, value, salary) Task: Retrieve id from schedules whose status is found in managers rows where code matches the outer record. SQL:
SELECT id FROM schedules AS vmob WHERE status IN ( SELECT status FROM managers AS hac WHERE hac.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_05371
train
v3
Schema: regions (alias: okiv)(type, id, amount, value) tasks(level, amount, code, status) Task: Find amount from regions where salary exceeds the average salary from tasks for the same status. SQL:
SELECT amount FROM regions AS okiv WHERE salary > ( SELECT AVG(salary) FROM tasks AS znob WHERE znob.status = okiv.status );
{ "outer_table": "regions", "inner_table": "tasks", "outer_alias": "okiv", "inner_alias": "znob", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_05372
train
v2
Schema: tasks (alias: znob)(value, amount, id, salary) requests(id, name, code, level) Task: Retrieve name from tasks that have at least one corresponding entry in requests sharing the same code. SQL:
SELECT name FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = znob.code );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "name", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_05373
train
v2
Schema: transactions (alias: gev)(code, status, id, value) products(level, value, date, type) Task: Find value from transactions where a matching record exists in products with the same code. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = gev.code );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "value", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05374
train
v1
Schema: branches (alias: agov)(name, level, value, amount) customers(name, level, type, code) Task: Select id from branches where code exists in customers for the same type. SQL:
SELECT id FROM branches AS agov WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.type = agov.type );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_05375
train
v2
Schema: shipments (alias: vnob)(value, salary, name, level) regions(id, code, amount, value) Task: Find amount from shipments where a matching record exists in regions with the same type. SQL:
SELECT amount FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "amount", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_05376
train
v1
Schema: customers (alias: lex)(name, code, value, amount) sales(level, status, name, date) Task: Find id from customers where type appears in sales entries with matching code. SQL:
SELECT id FROM customers AS lex WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.code = lex.code );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05377
train
v3
Schema: regions (alias: okiv)(amount, code, type, date) staff(value, status, level, name) Task: Find name from regions where value exceeds the count of salary from staff for the same level. SQL:
SELECT name FROM regions AS okiv WHERE value > ( SELECT COUNT(salary) FROM staff AS xnob WHERE xnob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "okiv", "inner_alias": "xnob", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_05378
train
v3
Schema: requests (alias: ejof)(level, type, name, code) sales(value, level, type, status) Task: Retrieve value from requests with amount above the SUM(amount) of sales rows sharing the same type. SQL:
SELECT value FROM requests AS ejof WHERE amount > ( SELECT SUM(amount) FROM sales AS cif WHERE cif.type = ejof.type );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_05379
train
v1
Schema: schedules (alias: vmob)(date, value, name, salary) items(name, salary, level, type) Task: Retrieve code from schedules whose code is found in items rows where level matches the outer record. SQL:
SELECT code FROM schedules AS vmob WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "vmob", "inner_alias": "ikob", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_05380
train
v2
Schema: tasks (alias: znob)(date, level, status, id) employees(value, status, id, date) Task: Find id from tasks where a matching record exists in employees with the same status. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = znob.status );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "id", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_05381
train
v2
Schema: items (alias: ikob)(name, code, date, type) accounts(type, salary, value, id) Task: Find id from items where a matching record exists in accounts with the same type. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = ikob.type );
{ "outer_table": "items", "inner_table": "accounts", "outer_alias": "ikob", "inner_alias": "jac", "proj_col": "id", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_05382
train
v1
Schema: regions (alias: okiv)(amount, value, type, name) managers(code, type, date, salary) Task: Find amount from regions where level appears in managers entries with matching id. SQL:
SELECT amount FROM regions AS okiv WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.id = okiv.id );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "okiv", "inner_alias": "hac", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_05383
train
v1
Schema: orders (alias: kab)(type, value, salary, name) items(salary, type, amount, name) Task: Retrieve salary from orders whose code is found in items rows where level matches the outer record. SQL:
SELECT salary FROM orders AS kab WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.level = kab.level );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "kab", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "code", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05384
train
v1
Schema: shipments (alias: vnob)(name, date, salary, amount) invoices(id, status, name, date) Task: Select code from shipments where id exists in invoices for the same code. SQL:
SELECT code FROM shipments AS vnob WHERE id IN ( SELECT id FROM invoices AS fal WHERE fal.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "vnob", "inner_alias": "fal", "proj_col": "code", "filter_col": "id", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_05385
train
v2
Schema: schedules (alias: vmob)(code, level, id, amount) items(id, level, date, type) Task: Find salary from schedules where a matching record exists in items with the same id. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "vmob", "inner_alias": "ikob", "proj_col": "salary", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_05386
train
v1
Schema: employees (alias: bev)(code, type, level, status) tasks(date, code, name, value) Task: Retrieve code from employees whose code is found in tasks rows where level matches the outer record. SQL:
SELECT code FROM employees AS bev WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.level = bev.level );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05387
train
v3
Schema: departments (alias: dov)(value, amount, code, type) requests(date, amount, value, id) Task: Retrieve name from departments with salary above the SUM(value) of requests rows sharing the same code. SQL:
SELECT name FROM departments AS dov WHERE salary > ( SELECT SUM(value) FROM requests AS ejof WHERE ejof.code = dov.code );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05388
train
v2
Schema: transactions (alias: gev)(code, date, status, level) categories(id, status, value, type) Task: Retrieve value from transactions that have at least one corresponding entry in categories sharing the same code. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = gev.code );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "value", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05389
train
v2
Schema: staff (alias: xnob)(level, date, salary, code) departments(id, code, level, date) Task: Find salary from staff where a matching record exists in departments with the same id. SQL:
SELECT salary FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = xnob.id );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "salary", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_05390
train
v1
Schema: schedules (alias: vmob)(date, value, name, level) items(name, id, salary, code) Task: Retrieve code from schedules whose level is found in items rows where id matches the outer record. SQL:
SELECT code FROM schedules AS vmob WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "vmob", "inner_alias": "ikob", "proj_col": "code", "filter_col": "level", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_05391
train
v3
Schema: shipments (alias: vnob)(salary, level, id, status) invoices(type, level, id, status) Task: Retrieve value from shipments with amount above the MIN(value) of invoices rows sharing the same type. SQL:
SELECT value FROM shipments AS vnob WHERE amount > ( SELECT MIN(value) FROM invoices AS fal WHERE fal.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "vnob", "inner_alias": "fal", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_05392
train
v2
Schema: staff (alias: xnob)(status, id, name, type) requests(salary, type, code, amount) Task: Retrieve code from staff that have at least one corresponding entry in requests sharing the same status. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = xnob.status );
{ "outer_table": "staff", "inner_table": "requests", "outer_alias": "xnob", "inner_alias": "ejof", "proj_col": "code", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_05393
train
v3
Schema: regions (alias: okiv)(salary, level, type, value) branches(id, status, type, code) Task: Retrieve salary from regions with value above the COUNT(salary) of branches rows sharing the same level. SQL:
SELECT salary FROM regions AS okiv WHERE value > ( SELECT COUNT(salary) FROM branches AS agov WHERE agov.level = okiv.level );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "okiv", "inner_alias": "agov", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_05394
train
v2
Schema: shipments (alias: vnob)(status, code, id, value) accounts(salary, id, amount, date) Task: Retrieve code from shipments that have at least one corresponding entry in accounts sharing the same id. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "accounts", "outer_alias": "vnob", "inner_alias": "jac", "proj_col": "code", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_05395
train
v3
Schema: accounts (alias: jac)(name, amount, code, value) staff(salary, name, date, level) Task: Retrieve code from accounts with value above the AVG(salary) of staff rows sharing the same status. SQL:
SELECT code FROM accounts AS jac WHERE value > ( SELECT AVG(salary) FROM staff AS xnob WHERE xnob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "jac", "inner_alias": "xnob", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05396
train
v3
Schema: accounts (alias: jac)(id, type, name, value) transactions(level, type, name, date) Task: Find name from accounts where salary exceeds the minimum value from transactions for the same id. SQL:
SELECT name FROM accounts AS jac WHERE salary > ( SELECT MIN(value) FROM transactions AS gev WHERE gev.id = jac.id );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "jac", "inner_alias": "gev", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_05397
train
v3
Schema: branches (alias: agov)(name, salary, status, amount) regions(id, salary, type, date) Task: Find name from branches where value exceeds the average amount from regions for the same id. SQL:
SELECT name FROM branches AS agov WHERE value > ( SELECT AVG(amount) FROM regions AS okiv WHERE okiv.id = agov.id );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_05398
train
v3
Schema: shipments (alias: vnob)(status, date, amount, name) tasks(level, status, amount, type) Task: Retrieve id from shipments with amount above the COUNT(salary) of tasks rows sharing the same id. SQL:
SELECT id FROM shipments AS vnob WHERE amount > ( SELECT COUNT(salary) FROM tasks AS znob WHERE znob.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "tasks", "outer_alias": "vnob", "inner_alias": "znob", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_05399
train