variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v2
Schema: managers (alias: hac)(amount, code, value, salary) categories(amount, type, status, code) Task: Find amount from managers where a matching record exists in categories with the same id. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.id = hac.id );
{ "outer_table": "managers", "inner_table": "categories", "outer_alias": "hac", "inner_alias": "egiv", "proj_col": "amount", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06400
train
v1
Schema: items (alias: ikob)(id, level, type, salary) tasks(status, amount, type, date) Task: Retrieve id from items whose type is found in tasks rows where code matches the outer record. SQL:
SELECT id FROM items AS ikob WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.code = ikob.code );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06401
train
v3
Schema: accounts (alias: jac)(code, level, name, type) customers(date, amount, salary, value) Task: Find name from accounts where value exceeds the total amount from customers for the same code. SQL:
SELECT name FROM accounts AS jac WHERE value > ( SELECT SUM(amount) FROM customers AS lex WHERE lex.code = jac.code );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06402
train
v3
Schema: schedules (alias: vmob)(type, date, code, value) requests(id, salary, amount, name) Task: Retrieve salary from schedules with value above the SUM(value) of requests rows sharing the same id. SQL:
SELECT salary FROM schedules AS vmob WHERE value > ( SELECT SUM(value) FROM requests AS ejof WHERE ejof.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "requests", "outer_alias": "vmob", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06403
train
v1
Schema: orders (alias: kab)(date, name, salary, amount) transactions(name, value, level, salary) Task: Select name from orders where level exists in transactions for the same level. SQL:
SELECT name FROM orders AS kab WHERE level IN ( SELECT level FROM transactions AS gev WHERE gev.level = kab.level );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "name", "filter_col": "level", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06404
train
v2
Schema: schedules (alias: vmob)(amount, value, code, date) sales(amount, value, name, status) Task: Find amount from schedules where a matching record exists in sales with the same status. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "vmob", "inner_alias": "cif", "proj_col": "amount", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06405
train
v2
Schema: projects (alias: uliv)(type, level, date, id) staff(value, salary, amount, type) Task: Find salary from projects where a matching record exists in staff with the same type. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "salary", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06406
train
v2
Schema: categories (alias: egiv)(status, type, id, date) products(date, name, type, amount) Task: Find amount from categories where a matching record exists in products with the same level. SQL:
SELECT amount 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": "amount", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06407
train
v3
Schema: requests (alias: ejof)(value, code, date, name) departments(id, level, status, amount) Task: Find name from requests where salary exceeds the minimum value from departments for the same status. SQL:
SELECT name FROM requests AS ejof WHERE salary > ( SELECT MIN(value) FROM departments AS dov WHERE dov.status = ejof.status );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06408
train
v3
Schema: projects (alias: uliv)(salary, value, date, name) departments(id, salary, status, type) Task: Find name from projects where salary exceeds the maximum salary from departments for the same level. SQL:
SELECT name FROM projects AS uliv WHERE salary > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.level = uliv.level );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "uliv", "inner_alias": "dov", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06409
train
v2
Schema: branches (alias: agov)(date, salary, type, level) items(id, value, code, amount) Task: Find name from branches where a matching record exists in items with the same code. SQL:
SELECT name FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = agov.code );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "name", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06410
train
v2
Schema: managers (alias: hac)(code, salary, id, status) shipments(code, salary, date, level) Task: Retrieve value from managers that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT value FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = hac.code );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "hac", "inner_alias": "vnob", "proj_col": "value", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06411
train
v1
Schema: projects (alias: uliv)(amount, date, level, name) tasks(type, value, amount, name) Task: Select salary from projects where id exists in tasks for the same id. SQL:
SELECT salary FROM projects AS uliv WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.id = uliv.id );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "uliv", "inner_alias": "znob", "proj_col": "salary", "filter_col": "id", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06412
train
v1
Schema: projects (alias: uliv)(level, code, status, type) invoices(status, type, code, id) Task: Retrieve amount from projects whose type is found in invoices rows where code matches the outer record. SQL:
SELECT amount FROM projects AS uliv WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.code = uliv.code );
{ "outer_table": "projects", "inner_table": "invoices", "outer_alias": "uliv", "inner_alias": "fal", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06413
train
v3
Schema: customers (alias: lex)(code, name, amount, value) transactions(value, date, id, name) Task: Retrieve code from customers with salary above the SUM(amount) of transactions rows sharing the same status. SQL:
SELECT code FROM customers AS lex WHERE salary > ( SELECT SUM(amount) FROM transactions AS gev WHERE gev.status = lex.status );
{ "outer_table": "customers", "inner_table": "transactions", "outer_alias": "lex", "inner_alias": "gev", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06414
train
v1
Schema: requests (alias: ejof)(salary, date, level, name) branches(name, value, type, amount) Task: Select amount from requests where status exists in branches for the same id. SQL:
SELECT amount FROM requests AS ejof WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.id = ejof.id );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06415
train
v1
Schema: branches (alias: agov)(date, amount, salary, value) staff(type, value, date, code) Task: Retrieve name from branches whose level is found in staff rows where status matches the outer record. SQL:
SELECT name FROM branches AS agov WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.status = agov.status );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06416
train
v1
Schema: transactions (alias: gev)(name, status, value, salary) staff(status, date, code, value) Task: Select amount from transactions where level exists in staff for the same code. SQL:
SELECT amount FROM transactions AS gev WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.code = gev.code );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06417
train
v3
Schema: shipments (alias: vnob)(name, amount, id, status) departments(id, type, status, level) Task: Find code from shipments where salary exceeds the total amount from departments for the same code. SQL:
SELECT code FROM shipments AS vnob WHERE salary > ( SELECT SUM(amount) FROM departments AS dov WHERE dov.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06418
train
v1
Schema: accounts (alias: jac)(salary, code, amount, value) projects(id, name, code, date) Task: Find id from accounts where type appears in projects entries with matching level. SQL:
SELECT id FROM accounts AS jac WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.level = jac.level );
{ "outer_table": "accounts", "inner_table": "projects", "outer_alias": "jac", "inner_alias": "uliv", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06419
train
v2
Schema: branches (alias: agov)(type, name, value, amount) regions(salary, level, type, status) Task: Retrieve salary from branches that have at least one corresponding entry in regions sharing the same level. SQL:
SELECT salary FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = agov.level );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "salary", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06420
train
v1
Schema: schedules (alias: vmob)(id, type, status, salary) categories(amount, name, date, id) Task: Find value from schedules where id appears in categories entries with matching type. SQL:
SELECT value FROM schedules AS vmob WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06421
train
v2
Schema: items (alias: ikob)(value, salary, type, id) departments(amount, name, salary, code) Task: Retrieve name from items that have at least one corresponding entry in departments sharing the same level. SQL:
SELECT name 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": "name", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06422
train
v3
Schema: tasks (alias: znob)(level, type, amount, date) invoices(code, name, salary, id) Task: Retrieve amount from tasks with value above the MIN(salary) of invoices rows sharing the same code. SQL:
SELECT amount FROM tasks AS znob WHERE value > ( SELECT MIN(salary) FROM invoices AS fal WHERE fal.code = znob.code );
{ "outer_table": "tasks", "inner_table": "invoices", "outer_alias": "znob", "inner_alias": "fal", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06423
train
v1
Schema: items (alias: ikob)(code, type, amount, status) projects(date, code, salary, type) Task: Select name from items where type exists in projects for the same level. SQL:
SELECT name FROM items AS ikob WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.level = ikob.level );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "name", "filter_col": "type", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06424
train
v3
Schema: departments (alias: dov)(level, status, name, date) accounts(date, name, type, salary) Task: Retrieve name from departments with value above the COUNT(value) of accounts rows sharing the same code. SQL:
SELECT name FROM departments AS dov WHERE value > ( SELECT COUNT(value) FROM accounts AS jac WHERE jac.code = dov.code );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06425
train
v2
Schema: invoices (alias: fal)(amount, value, salary, level) requests(level, name, status, date) Task: Find name from invoices where a matching record exists in requests with the same id. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = fal.id );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "name", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06426
train
v3
Schema: tasks (alias: znob)(status, id, amount, level) customers(id, level, value, salary) Task: Retrieve amount from tasks with value above the COUNT(amount) of customers rows sharing the same type. SQL:
SELECT amount FROM tasks AS znob WHERE value > ( SELECT COUNT(amount) FROM customers AS lex WHERE lex.type = znob.type );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "znob", "inner_alias": "lex", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06427
train
v1
Schema: accounts (alias: jac)(salary, date, value, name) tasks(salary, type, value, date) Task: Retrieve amount from accounts whose type is found in tasks rows where type matches the outer record. SQL:
SELECT amount FROM accounts AS jac WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "tasks", "outer_alias": "jac", "inner_alias": "znob", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06428
train
v2
Schema: shipments (alias: vnob)(name, salary, status, amount) orders(name, level, status, date) Task: Find salary from shipments where a matching record exists in orders with the same type. SQL:
SELECT salary 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": "salary", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06429
train
v1
Schema: requests (alias: ejof)(date, code, salary, level) departments(name, id, salary, type) Task: Select name from requests where type exists in departments for the same status. SQL:
SELECT name FROM requests AS ejof WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.status = ejof.status );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "name", "filter_col": "type", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06430
train
v3
Schema: categories (alias: egiv)(id, salary, value, amount) tasks(type, id, status, value) Task: Retrieve value from categories with salary above the AVG(salary) of tasks rows sharing the same type. SQL:
SELECT value FROM categories AS egiv WHERE salary > ( SELECT AVG(salary) FROM tasks AS znob WHERE znob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "tasks", "outer_alias": "egiv", "inner_alias": "znob", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06431
train
v3
Schema: orders (alias: kab)(date, name, value, level) sales(code, date, type, amount) Task: Retrieve amount from orders with amount above the AVG(amount) of sales rows sharing the same status. SQL:
SELECT amount FROM orders AS kab WHERE amount > ( SELECT AVG(amount) FROM sales AS cif WHERE cif.status = kab.status );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06432
train
v1
Schema: staff (alias: xnob)(salary, code, status, name) categories(value, salary, amount, id) Task: Find name from staff where id appears in categories entries with matching status. SQL:
SELECT name FROM staff AS xnob WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.status = xnob.status );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06433
train
v3
Schema: requests (alias: ejof)(amount, status, code, id) tasks(type, id, code, date) Task: Retrieve name from requests with value above the MAX(amount) of tasks rows sharing the same id. SQL:
SELECT name FROM requests AS ejof WHERE value > ( SELECT MAX(amount) FROM tasks AS znob WHERE znob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06434
train
v2
Schema: invoices (alias: fal)(status, name, type, amount) orders(date, code, status, type) Task: Retrieve value from invoices that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT value FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = fal.type );
{ "outer_table": "invoices", "inner_table": "orders", "outer_alias": "fal", "inner_alias": "kab", "proj_col": "value", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06435
train
v1
Schema: shipments (alias: vnob)(name, type, value, level) staff(status, salary, code, type) Task: Find id from shipments where id appears in staff entries with matching level. SQL:
SELECT id FROM shipments AS vnob WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "id", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06436
train
v3
Schema: items (alias: ikob)(salary, id, value, status) sales(code, type, name, date) Task: Find code from items where amount exceeds the minimum salary from sales for the same status. SQL:
SELECT code FROM items AS ikob WHERE amount > ( SELECT MIN(salary) FROM sales AS cif WHERE cif.status = ikob.status );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06437
train
v2
Schema: tasks (alias: znob)(type, level, date, amount) regions(code, amount, date, id) Task: Find salary from tasks where a matching record exists in regions with the same id. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = znob.id );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "salary", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06438
train
v3
Schema: customers (alias: lex)(id, name, salary, code) staff(salary, name, value, id) Task: Find value from customers where salary exceeds the average salary from staff for the same id. SQL:
SELECT value FROM customers AS lex WHERE salary > ( SELECT AVG(salary) FROM staff AS xnob WHERE xnob.id = lex.id );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06439
train
v1
Schema: requests (alias: ejof)(amount, salary, level, type) projects(id, amount, status, name) Task: Find id from requests where id appears in projects entries with matching code. SQL:
SELECT id FROM requests AS ejof WHERE id IN ( SELECT id FROM projects AS uliv WHERE uliv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "id", "filter_col": "id", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06440
train
v3
Schema: products (alias: nad)(type, amount, date, id) categories(type, amount, level, date) Task: Retrieve code from products with salary above the SUM(amount) of categories rows sharing the same type. SQL:
SELECT code FROM products AS nad WHERE salary > ( SELECT SUM(amount) FROM categories AS egiv WHERE egiv.type = nad.type );
{ "outer_table": "products", "inner_table": "categories", "outer_alias": "nad", "inner_alias": "egiv", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06441
train
v3
Schema: schedules (alias: vmob)(name, type, date, amount) invoices(salary, code, type, name) Task: Retrieve value from schedules with salary above the COUNT(value) of invoices rows sharing the same status. SQL:
SELECT value FROM schedules AS vmob WHERE salary > ( SELECT COUNT(value) FROM invoices AS fal WHERE fal.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "vmob", "inner_alias": "fal", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06442
train
v1
Schema: customers (alias: lex)(name, status, date, code) transactions(date, code, name, value) Task: Retrieve salary from customers whose code is found in transactions rows where id matches the outer record. SQL:
SELECT salary FROM customers AS lex WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.id = lex.id );
{ "outer_table": "customers", "inner_table": "transactions", "outer_alias": "lex", "inner_alias": "gev", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06443
train
v1
Schema: customers (alias: lex)(id, type, level, code) managers(id, date, salary, value) Task: Select id from customers where code exists in managers for the same level. SQL:
SELECT id FROM customers AS lex WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.level = lex.level );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "id", "filter_col": "code", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06444
train
v1
Schema: requests (alias: ejof)(status, level, name, code) tasks(status, code, level, amount) Task: Retrieve salary from requests whose id is found in tasks rows where code matches the outer record. SQL:
SELECT salary FROM requests AS ejof WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "salary", "filter_col": "id", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06445
train
v3
Schema: departments (alias: dov)(type, code, level, salary) accounts(name, value, id, code) Task: Find id from departments where salary exceeds the maximum value from accounts for the same status. SQL:
SELECT id FROM departments AS dov WHERE salary > ( SELECT MAX(value) FROM accounts AS jac WHERE jac.status = dov.status );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06446
train
v1
Schema: managers (alias: hac)(status, date, salary, amount) sales(id, level, value, type) Task: Select amount from managers where type exists in sales for the same id. SQL:
SELECT amount FROM managers AS hac WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.id = hac.id );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06447
train
v2
Schema: orders (alias: kab)(level, salary, type, amount) sales(id, name, level, value) Task: Find id from orders where a matching record exists in sales with the same status. SQL:
SELECT id FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = kab.status );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "id", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06448
train
v2
Schema: transactions (alias: gev)(value, date, type, status) requests(type, level, date, code) Task: Find salary from transactions where a matching record exists in requests with the same id. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = gev.id );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "salary", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06449
train
v1
Schema: invoices (alias: fal)(type, date, level, code) branches(id, amount, name, value) Task: Find code from invoices where level appears in branches entries with matching type. SQL:
SELECT code FROM invoices AS fal WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.type = fal.type );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06450
train
v2
Schema: shipments (alias: vnob)(code, id, date, level) requests(name, type, status, amount) Task: Find name from shipments where a matching record exists in requests with the same id. SQL:
SELECT name FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "requests", "outer_alias": "vnob", "inner_alias": "ejof", "proj_col": "name", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06451
train
v2
Schema: items (alias: ikob)(date, id, amount, code) projects(value, name, code, salary) Task: Retrieve id from items that have at least one corresponding entry in projects sharing the same status. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = ikob.status );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "id", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06452
train
v1
Schema: employees (alias: bev)(salary, type, code, amount) orders(code, id, level, status) Task: Find name from employees where id appears in orders entries with matching status. SQL:
SELECT name FROM employees AS bev WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.status = bev.status );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06453
train
v2
Schema: requests (alias: ejof)(salary, name, type, date) sales(id, amount, date, value) Task: Retrieve name from requests that have at least one corresponding entry in sales sharing the same code. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = ejof.code );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "name", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06454
train
v3
Schema: requests (alias: ejof)(type, amount, date, status) branches(value, status, type, name) Task: Find code from requests where salary exceeds the average salary from branches for the same level. SQL:
SELECT code FROM requests AS ejof WHERE salary > ( SELECT AVG(salary) FROM branches AS agov WHERE agov.level = ejof.level );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06455
train
v3
Schema: products (alias: nad)(status, level, code, id) accounts(name, type, id, status) Task: Find id from products where amount exceeds the count of value from accounts for the same status. SQL:
SELECT id FROM products AS nad WHERE amount > ( SELECT COUNT(value) FROM accounts AS jac WHERE jac.status = nad.status );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06456
train
v2
Schema: staff (alias: xnob)(status, name, id, level) shipments(date, salary, level, value) Task: Retrieve id from staff that have at least one corresponding entry in shipments sharing the same type. SQL:
SELECT id FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = xnob.type );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "id", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06457
train
v3
Schema: managers (alias: hac)(code, status, type, id) transactions(status, salary, amount, type) Task: Retrieve code from managers with value above the SUM(amount) of transactions rows sharing the same id. SQL:
SELECT code FROM managers AS hac WHERE value > ( SELECT SUM(amount) FROM transactions AS gev WHERE gev.id = hac.id );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06458
train
v1
Schema: shipments (alias: vnob)(date, amount, type, salary) sales(value, status, name, code) Task: Select id from shipments where level exists in sales for the same id. SQL:
SELECT id FROM shipments AS vnob WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "id", "filter_col": "level", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06459
train
v1
Schema: schedules (alias: vmob)(id, level, name, amount) invoices(date, level, salary, name) Task: Select code from schedules where status exists in invoices for the same level. SQL:
SELECT code FROM schedules AS vmob WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "vmob", "inner_alias": "fal", "proj_col": "code", "filter_col": "status", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06460
train
v2
Schema: branches (alias: agov)(amount, date, level, code) invoices(name, code, date, status) Task: Find amount from branches where a matching record exists in invoices with the same status. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.status = agov.status );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "amount", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06461
train
v2
Schema: customers (alias: lex)(id, code, name, type) categories(code, salary, date, level) Task: Find code from customers where a matching record exists in categories with the same type. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = lex.type );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "code", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06462
train
v2
Schema: orders (alias: kab)(status, value, date, level) regions(level, name, id, date) Task: Find value from orders where a matching record exists in regions with the same code. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = kab.code );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "kab", "inner_alias": "okiv", "proj_col": "value", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06463
train
v2
Schema: shipments (alias: vnob)(type, value, id, amount) employees(date, status, level, type) Task: Find salary from shipments where a matching record exists in employees with the same code. SQL:
SELECT salary FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "salary", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06464
train
v1
Schema: regions (alias: okiv)(level, type, amount, id) items(id, name, code, type) Task: Find code from regions where status appears in items entries with matching type. SQL:
SELECT code FROM regions AS okiv WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.type = okiv.type );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06465
train
v3
Schema: orders (alias: kab)(amount, type, status, code) employees(value, amount, date, code) Task: Find name from orders where amount exceeds the minimum salary from employees for the same code. SQL:
SELECT name FROM orders AS kab WHERE amount > ( SELECT MIN(salary) FROM employees AS bev WHERE bev.code = kab.code );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06466
train
v3
Schema: tasks (alias: znob)(type, amount, status, value) employees(salary, id, date, name) Task: Find code from tasks where amount exceeds the total value from employees for the same level. SQL:
SELECT code FROM tasks AS znob WHERE amount > ( SELECT SUM(value) FROM employees AS bev WHERE bev.level = znob.level );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06467
train
v1
Schema: invoices (alias: fal)(type, value, code, date) departments(name, id, date, amount) Task: Find salary from invoices where level appears in departments entries with matching status. SQL:
SELECT salary FROM invoices AS fal WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.status = fal.status );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06468
train
v1
Schema: schedules (alias: vmob)(value, amount, level, date) orders(salary, type, date, value) Task: Find value from schedules where level appears in orders entries with matching id. SQL:
SELECT value FROM schedules AS vmob WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "orders", "outer_alias": "vmob", "inner_alias": "kab", "proj_col": "value", "filter_col": "level", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06469
train
v2
Schema: invoices (alias: fal)(id, code, salary, type) categories(value, status, date, id) Task: Retrieve id from invoices that have at least one corresponding entry in categories sharing the same level. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = fal.level );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "id", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06470
train
v1
Schema: accounts (alias: jac)(value, status, level, type) requests(id, salary, name, code) Task: Find salary from accounts where type appears in requests entries with matching type. SQL:
SELECT salary FROM accounts AS jac WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.type = jac.type );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "jac", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06471
train
v1
Schema: projects (alias: uliv)(name, date, level, id) employees(code, date, value, id) Task: Retrieve amount from projects whose status is found in employees rows where status matches the outer record. SQL:
SELECT amount FROM projects AS uliv WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.status = uliv.status );
{ "outer_table": "projects", "inner_table": "employees", "outer_alias": "uliv", "inner_alias": "bev", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06472
train
v1
Schema: items (alias: ikob)(amount, status, id, name) schedules(salary, id, amount, level) Task: Find value from items where level appears in schedules entries with matching status. SQL:
SELECT value FROM items AS ikob WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.status = ikob.status );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "ikob", "inner_alias": "vmob", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06473
train
v1
Schema: orders (alias: kab)(value, level, id, salary) regions(level, value, status, name) Task: Retrieve amount from orders whose level is found in regions rows where status matches the outer record. SQL:
SELECT amount FROM orders AS kab WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.status = kab.status );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "kab", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06474
train
v1
Schema: products (alias: nad)(date, level, amount, name) accounts(level, value, status, salary) Task: Retrieve salary from products whose code is found in accounts rows where status matches the outer record. SQL:
SELECT salary FROM products AS nad WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.status = nad.status );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06475
train
v3
Schema: invoices (alias: fal)(amount, value, date, level) branches(id, type, salary, status) Task: Retrieve name from invoices with amount above the AVG(amount) of branches rows sharing the same level. SQL:
SELECT name FROM invoices AS fal WHERE amount > ( SELECT AVG(amount) FROM branches AS agov WHERE agov.level = fal.level );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06476
train
v1
Schema: products (alias: nad)(salary, level, value, id) items(level, id, type, status) Task: Retrieve code from products whose status is found in items rows where code matches the outer record. SQL:
SELECT code FROM products AS nad WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.code = nad.code );
{ "outer_table": "products", "inner_table": "items", "outer_alias": "nad", "inner_alias": "ikob", "proj_col": "code", "filter_col": "status", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06477
train
v1
Schema: sales (alias: cif)(salary, level, id, amount) schedules(value, amount, code, name) Task: Retrieve id from sales whose type is found in schedules rows where type matches the outer record. SQL:
SELECT id FROM sales AS cif WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.type = cif.type );
{ "outer_table": "sales", "inner_table": "schedules", "outer_alias": "cif", "inner_alias": "vmob", "proj_col": "id", "filter_col": "type", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06478
train
v3
Schema: regions (alias: okiv)(level, value, amount, type) staff(salary, id, status, type) Task: Find salary from regions where salary exceeds the maximum salary from staff for the same status. SQL:
SELECT salary FROM regions AS okiv WHERE salary > ( SELECT MAX(salary) FROM staff AS xnob WHERE xnob.status = okiv.status );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "okiv", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06479
train
v3
Schema: sales (alias: cif)(value, date, level, type) projects(date, type, value, name) Task: Retrieve code from sales with salary above the MIN(salary) of projects rows sharing the same code. SQL:
SELECT code FROM sales AS cif WHERE salary > ( SELECT MIN(salary) FROM projects AS uliv WHERE uliv.code = cif.code );
{ "outer_table": "sales", "inner_table": "projects", "outer_alias": "cif", "inner_alias": "uliv", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06480
train
v3
Schema: staff (alias: xnob)(value, level, date, salary) customers(date, id, value, level) Task: Find id from staff where amount exceeds the total value from customers for the same status. SQL:
SELECT id FROM staff AS xnob WHERE amount > ( SELECT SUM(value) FROM customers AS lex WHERE lex.status = xnob.status );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06481
train
v2
Schema: branches (alias: agov)(salary, name, type, status) staff(value, id, status, date) Task: Retrieve code from branches that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = agov.level );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "code", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06482
train
v1
Schema: customers (alias: lex)(status, name, amount, salary) shipments(id, code, name, salary) Task: Select name from customers where type exists in shipments for the same code. SQL:
SELECT name FROM customers AS lex WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.code = lex.code );
{ "outer_table": "customers", "inner_table": "shipments", "outer_alias": "lex", "inner_alias": "vnob", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06483
train
v3
Schema: tasks (alias: znob)(level, value, date, status) staff(value, amount, date, level) Task: Find name from tasks where amount exceeds the maximum amount from staff for the same status. SQL:
SELECT name FROM tasks AS znob WHERE amount > ( SELECT MAX(amount) FROM staff AS xnob WHERE xnob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06484
train
v2
Schema: branches (alias: agov)(salary, name, date, value) departments(value, type, salary, name) Task: Find salary from branches where a matching record exists in departments with the same code. SQL:
SELECT salary FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = agov.code );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "salary", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06485
train
v3
Schema: sales (alias: cif)(level, code, name, type) transactions(code, status, value, id) Task: Find name from sales where value exceeds the count of value from transactions for the same id. SQL:
SELECT name FROM sales AS cif WHERE value > ( SELECT COUNT(value) FROM transactions AS gev WHERE gev.id = cif.id );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06486
train
v1
Schema: orders (alias: kab)(amount, value, status, date) managers(salary, name, value, code) Task: Find code from orders where status appears in managers entries with matching type. SQL:
SELECT code FROM orders AS kab WHERE status IN ( SELECT status FROM managers AS hac WHERE hac.type = kab.type );
{ "outer_table": "orders", "inner_table": "managers", "outer_alias": "kab", "inner_alias": "hac", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06487
train
v2
Schema: invoices (alias: fal)(status, id, salary, amount) tasks(status, type, id, level) Task: Retrieve id from invoices that have at least one corresponding entry in tasks sharing the same type. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "tasks", "outer_alias": "fal", "inner_alias": "znob", "proj_col": "id", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06488
train
v3
Schema: branches (alias: agov)(id, amount, code, value) shipments(status, salary, code, id) Task: Find code from branches where amount exceeds the count of salary from shipments for the same id. SQL:
SELECT code FROM branches AS agov WHERE amount > ( SELECT COUNT(salary) FROM shipments AS vnob WHERE vnob.id = agov.id );
{ "outer_table": "branches", "inner_table": "shipments", "outer_alias": "agov", "inner_alias": "vnob", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06489
train
v1
Schema: branches (alias: agov)(amount, name, type, id) regions(value, id, salary, name) Task: Retrieve salary from branches whose type is found in regions rows where status matches the outer record. SQL:
SELECT salary FROM branches AS agov WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.status = agov.status );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "type", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06490
train
v2
Schema: items (alias: ikob)(value, code, id, status) categories(value, name, date, amount) Task: Retrieve code from items that have at least one corresponding entry in categories sharing the same id. SQL:
SELECT code FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.id = ikob.id );
{ "outer_table": "items", "inner_table": "categories", "outer_alias": "ikob", "inner_alias": "egiv", "proj_col": "code", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06491
train
v3
Schema: categories (alias: egiv)(type, salary, code, id) tasks(amount, level, id, status) Task: Retrieve code from categories with amount above the MAX(salary) of tasks rows sharing the same id. SQL:
SELECT code FROM categories AS egiv WHERE amount > ( SELECT MAX(salary) FROM tasks AS znob WHERE znob.id = egiv.id );
{ "outer_table": "categories", "inner_table": "tasks", "outer_alias": "egiv", "inner_alias": "znob", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06492
train
v1
Schema: transactions (alias: gev)(id, date, status, amount) departments(name, type, amount, salary) Task: Select code from transactions where code exists in departments for the same level. SQL:
SELECT code FROM transactions AS gev WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.level = gev.level );
{ "outer_table": "transactions", "inner_table": "departments", "outer_alias": "gev", "inner_alias": "dov", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06493
train
v1
Schema: items (alias: ikob)(salary, code, value, status) projects(name, date, id, status) Task: Find salary from items where code appears in projects entries with matching status. SQL:
SELECT salary FROM items AS ikob WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.status = ikob.status );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06494
train
v3
Schema: regions (alias: okiv)(salary, level, date, id) products(id, type, code, salary) Task: Find name from regions where amount exceeds the average value from products for the same level. SQL:
SELECT name FROM regions AS okiv WHERE amount > ( SELECT AVG(value) FROM products AS nad WHERE nad.level = okiv.level );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06495
train
v2
Schema: categories (alias: egiv)(id, code, type, salary) sales(amount, name, status, value) Task: Retrieve amount from categories that have at least one corresponding entry in sales sharing the same type. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = egiv.type );
{ "outer_table": "categories", "inner_table": "sales", "outer_alias": "egiv", "inner_alias": "cif", "proj_col": "amount", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06496
train
v2
Schema: transactions (alias: gev)(level, amount, date, salary) managers(date, type, amount, value) Task: Find code from transactions where a matching record exists in managers with the same code. SQL:
SELECT code FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = gev.code );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "gev", "inner_alias": "hac", "proj_col": "code", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06497
train
v1
Schema: managers (alias: hac)(level, code, type, status) requests(salary, code, id, value) Task: Retrieve amount from managers whose id is found in requests rows where status matches the outer record. SQL:
SELECT amount FROM managers AS hac WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.status = hac.status );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06498
train
v1
Schema: categories (alias: egiv)(salary, date, level, id) shipments(salary, level, amount, date) Task: Find id from categories where code appears in shipments entries with matching code. SQL:
SELECT id FROM categories AS egiv WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.code = egiv.code );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "id", "filter_col": "code", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06499
train