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: schedules (alias: vmob)(amount, date, salary, type) products(value, status, type, amount) Task: Retrieve amount from schedules with amount above the SUM(amount) of products rows sharing the same type. SQL:
SELECT amount FROM schedules AS vmob WHERE amount > ( SELECT SUM(amount) FROM products AS nad WHERE nad.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03600
train
v2
Schema: customers (alias: lex)(salary, status, code, date) tasks(type, level, name, status) Task: Retrieve id from customers that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = lex.id );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "id", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03601
train
v2
Schema: regions (alias: okiv)(id, code, name, salary) items(value, type, level, code) Task: Retrieve value from regions that have at least one corresponding entry in items sharing the same level. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "value", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_03602
train
v1
Schema: requests (alias: ejof)(name, date, code, amount) regions(value, amount, salary, date) Task: Find salary from requests where id appears in regions entries with matching code. SQL:
SELECT salary FROM requests AS ejof WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "regions", "outer_alias": "ejof", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "id", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_03603
train
v1
Schema: orders (alias: kab)(amount, level, code, type) regions(id, type, value, amount) Task: Select code from orders where status exists in regions for the same id. SQL:
SELECT code FROM orders AS kab WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.id = kab.id );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "kab", "inner_alias": "okiv", "proj_col": "code", "filter_col": "status", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03604
train
v1
Schema: categories (alias: egiv)(amount, salary, value, type) staff(date, salary, value, name) Task: Find amount from categories where type appears in staff entries with matching id. SQL:
SELECT amount FROM categories AS egiv WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.id = egiv.id );
{ "outer_table": "categories", "inner_table": "staff", "outer_alias": "egiv", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03605
train
v3
Schema: sales (alias: cif)(level, name, value, code) transactions(id, status, value, name) Task: Find value from sales where value exceeds the minimum salary from transactions for the same type. SQL:
SELECT value FROM sales AS cif WHERE value > ( SELECT MIN(salary) FROM transactions AS gev WHERE gev.type = cif.type );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03606
train
v1
Schema: projects (alias: uliv)(level, date, id, code) orders(level, status, salary, code) Task: Select name from projects where code exists in orders for the same status. SQL:
SELECT name FROM projects AS uliv WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.status = uliv.status );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_03607
train
v3
Schema: customers (alias: lex)(status, date, value, level) orders(date, id, status, value) Task: Find code from customers where amount exceeds the total value from orders for the same status. SQL:
SELECT code FROM customers AS lex WHERE amount > ( SELECT SUM(value) FROM orders AS kab WHERE kab.status = lex.status );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "lex", "inner_alias": "kab", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03608
train
v3
Schema: sales (alias: cif)(salary, name, id, value) shipments(level, code, amount, salary) Task: Find name from sales where value exceeds the total value from shipments for the same status. SQL:
SELECT name FROM sales AS cif WHERE value > ( SELECT SUM(value) FROM shipments AS vnob WHERE vnob.status = cif.status );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03609
train
v1
Schema: products (alias: nad)(date, status, value, amount) accounts(name, level, id, salary) Task: Retrieve amount from products whose type is found in accounts rows where level matches the outer record. SQL:
SELECT amount FROM products AS nad WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.level = nad.level );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "amount", "filter_col": "type", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03610
train
v1
Schema: sales (alias: cif)(amount, salary, type, id) transactions(code, value, status, date) Task: Retrieve id from sales whose id is found in transactions rows where code matches the outer record. SQL:
SELECT id FROM sales AS cif WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.code = cif.code );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "id", "filter_col": "id", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03611
train
v2
Schema: sales (alias: cif)(status, id, value, name) orders(level, type, status, amount) Task: Retrieve value from sales that have at least one corresponding entry in orders sharing the same id. SQL:
SELECT value FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = cif.id );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "value", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03612
train
v1
Schema: branches (alias: agov)(amount, name, value, date) requests(value, code, salary, date) Task: Retrieve salary from branches whose level is found in requests rows where code matches the outer record. SQL:
SELECT salary FROM branches AS agov WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.code = agov.code );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "level", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03613
train
v1
Schema: invoices (alias: fal)(value, code, level, id) managers(value, level, id, name) Task: Select name from invoices where type exists in managers for the same status. SQL:
SELECT name FROM invoices AS fal WHERE type IN ( SELECT type FROM managers AS hac WHERE hac.status = fal.status );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "name", "filter_col": "type", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03614
train
v3
Schema: invoices (alias: fal)(id, name, amount, date) projects(id, date, type, level) Task: Retrieve value from invoices with amount above the MIN(value) of projects rows sharing the same status. SQL:
SELECT value FROM invoices AS fal WHERE amount > ( SELECT MIN(value) FROM projects AS uliv WHERE uliv.status = fal.status );
{ "outer_table": "invoices", "inner_table": "projects", "outer_alias": "fal", "inner_alias": "uliv", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03615
train
v2
Schema: accounts (alias: jac)(date, code, name, level) managers(status, id, date, salary) Task: Retrieve id from accounts that have at least one corresponding entry in managers sharing the same code. SQL:
SELECT id FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = jac.code );
{ "outer_table": "accounts", "inner_table": "managers", "outer_alias": "jac", "inner_alias": "hac", "proj_col": "id", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03616
train
v3
Schema: customers (alias: lex)(code, salary, level, status) products(value, date, code, status) Task: Retrieve value from customers with value above the MIN(value) of products rows sharing the same status. SQL:
SELECT value FROM customers AS lex WHERE value > ( SELECT MIN(value) FROM products AS nad WHERE nad.status = lex.status );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03617
train
v3
Schema: staff (alias: xnob)(salary, level, type, code) items(type, level, date, code) Task: Retrieve id from staff with value above the SUM(amount) of items rows sharing the same status. SQL:
SELECT id FROM staff AS xnob WHERE value > ( SELECT SUM(amount) FROM items AS ikob WHERE ikob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "items", "outer_alias": "xnob", "inner_alias": "ikob", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03618
train
v2
Schema: branches (alias: agov)(code, status, amount, value) requests(type, amount, salary, status) Task: Retrieve name from branches that have at least one corresponding entry in requests sharing the same level. SQL:
SELECT name FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.level = agov.level );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "name", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03619
train
v2
Schema: schedules (alias: vmob)(value, code, level, type) categories(amount, name, code, status) Task: Retrieve amount from schedules that have at least one corresponding entry in categories sharing the same status. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "amount", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03620
train
v2
Schema: branches (alias: agov)(type, name, level, date) regions(code, level, type, date) Task: Find code from branches where a matching record exists in regions with the same id. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = agov.id );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "code", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03621
train
v3
Schema: items (alias: ikob)(amount, code, level, name) customers(level, date, amount, type) Task: Retrieve name from items with value above the SUM(value) of customers rows sharing the same level. SQL:
SELECT name FROM items AS ikob WHERE value > ( SELECT SUM(value) FROM customers AS lex WHERE lex.level = ikob.level );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03622
train
v1
Schema: items (alias: ikob)(type, level, value, salary) requests(name, amount, id, level) Task: Retrieve name from items whose status is found in requests rows where level matches the outer record. SQL:
SELECT name FROM items AS ikob WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.level = ikob.level );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "ikob", "inner_alias": "ejof", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03623
train
v1
Schema: branches (alias: agov)(level, status, value, name) staff(amount, id, type, code) Task: Find code from branches where type appears in staff entries with matching type. SQL:
SELECT code FROM branches AS agov WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.type = agov.type );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "code", "filter_col": "type", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03624
train
v1
Schema: branches (alias: agov)(id, code, name, date) items(amount, value, code, type) Task: Select code from branches where code exists in items for the same status. SQL:
SELECT code FROM branches AS agov WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.status = agov.status );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "code", "filter_col": "code", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03625
train
v2
Schema: tasks (alias: znob)(amount, id, type, level) orders(type, status, value, code) Task: Find salary from tasks where a matching record exists in orders with the same level. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = znob.level );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "salary", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03626
train
v3
Schema: branches (alias: agov)(id, salary, date, value) accounts(amount, type, id, date) Task: Retrieve code from branches with salary above the MAX(value) of accounts rows sharing the same level. SQL:
SELECT code FROM branches AS agov WHERE salary > ( SELECT MAX(value) FROM accounts AS jac WHERE jac.level = agov.level );
{ "outer_table": "branches", "inner_table": "accounts", "outer_alias": "agov", "inner_alias": "jac", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03627
train
v2
Schema: managers (alias: hac)(salary, amount, code, type) invoices(level, date, code, amount) Task: Retrieve code from managers that have at least one corresponding entry in invoices sharing the same code. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = hac.code );
{ "outer_table": "managers", "inner_table": "invoices", "outer_alias": "hac", "inner_alias": "fal", "proj_col": "code", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03628
train
v1
Schema: staff (alias: xnob)(level, id, salary, status) regions(name, type, level, amount) Task: Select id from staff where type exists in regions for the same type. SQL:
SELECT id FROM staff AS xnob WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.type = xnob.type );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "id", "filter_col": "type", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03629
train
v2
Schema: employees (alias: bev)(date, type, value, level) invoices(type, level, name, status) Task: Find value from employees where a matching record exists in invoices with the same type. SQL:
SELECT value FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = bev.type );
{ "outer_table": "employees", "inner_table": "invoices", "outer_alias": "bev", "inner_alias": "fal", "proj_col": "value", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03630
train
v2
Schema: shipments (alias: vnob)(type, date, amount, salary) customers(status, type, level, date) Task: Retrieve name from shipments that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT name FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "name", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03631
train
v2
Schema: projects (alias: uliv)(id, status, code, type) categories(status, code, name, value) Task: Find value from projects where a matching record exists in categories with the same code. SQL:
SELECT value FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = uliv.code );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "value", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_03632
train
v2
Schema: regions (alias: okiv)(date, salary, id, level) products(name, code, date, status) Task: Find id from regions where a matching record exists in products with the same type. SQL:
SELECT id FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = okiv.type );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "id", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_03633
train
v3
Schema: tasks (alias: znob)(status, salary, amount, name) branches(code, status, amount, date) Task: Retrieve value from tasks with value above the MAX(salary) of branches rows sharing the same id. SQL:
SELECT value FROM tasks AS znob WHERE value > ( SELECT MAX(salary) FROM branches AS agov WHERE agov.id = znob.id );
{ "outer_table": "tasks", "inner_table": "branches", "outer_alias": "znob", "inner_alias": "agov", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03634
train
v2
Schema: schedules (alias: vmob)(value, id, level, salary) categories(type, amount, salary, name) Task: Retrieve amount from schedules that have at least one corresponding entry in categories sharing the same code. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "amount", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03635
train
v2
Schema: tasks (alias: znob)(level, salary, value, status) schedules(level, id, salary, date) Task: Retrieve salary from tasks that have at least one corresponding entry in schedules sharing the same level. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.level = znob.level );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "salary", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03636
train
v1
Schema: accounts (alias: jac)(amount, id, type, name) customers(level, type, code, date) Task: Find salary from accounts where id appears in customers entries with matching code. SQL:
SELECT salary FROM accounts AS jac WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.code = jac.code );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "salary", "filter_col": "id", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03637
train
v3
Schema: schedules (alias: vmob)(value, type, name, id) categories(type, level, name, value) Task: Retrieve value from schedules with value above the MAX(value) of categories rows sharing the same status. SQL:
SELECT value FROM schedules AS vmob WHERE value > ( SELECT MAX(value) FROM categories AS egiv WHERE egiv.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03638
train
v3
Schema: projects (alias: uliv)(type, amount, date, value) tasks(code, value, level, date) Task: Find salary from projects where salary exceeds the count of salary from tasks for the same level. SQL:
SELECT salary FROM projects AS uliv WHERE salary > ( SELECT COUNT(salary) FROM tasks AS znob WHERE znob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "uliv", "inner_alias": "znob", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_03639
train
v1
Schema: orders (alias: kab)(level, amount, date, code) managers(value, date, status, type) Task: Find id from orders where level appears in managers entries with matching code. SQL:
SELECT id FROM orders AS kab WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.code = kab.code );
{ "outer_table": "orders", "inner_table": "managers", "outer_alias": "kab", "inner_alias": "hac", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03640
train
v2
Schema: invoices (alias: fal)(amount, salary, level, id) items(id, code, level, amount) Task: Find amount from invoices where a matching record exists in items with the same type. SQL:
SELECT amount FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "fal", "inner_alias": "ikob", "proj_col": "amount", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03641
train
v2
Schema: customers (alias: lex)(id, amount, status, value) managers(status, value, id, amount) Task: Find name from customers where a matching record exists in managers with the same code. SQL:
SELECT name FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = lex.code );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "name", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03642
train
v2
Schema: categories (alias: egiv)(value, date, amount, status) departments(code, salary, date, status) Task: Find code from categories where a matching record exists in departments with the same status. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = egiv.status );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "code", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03643
train
v3
Schema: regions (alias: okiv)(name, id, level, date) sales(name, code, date, type) Task: Retrieve amount from regions with amount above the MIN(value) of sales rows sharing the same level. SQL:
SELECT amount FROM regions AS okiv WHERE amount > ( SELECT MIN(value) FROM sales AS cif WHERE cif.level = okiv.level );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_03644
train
v3
Schema: items (alias: ikob)(amount, date, level, type) transactions(salary, type, id, amount) Task: Find name from items where salary exceeds the count of value from transactions for the same level. SQL:
SELECT name FROM items AS ikob WHERE salary > ( SELECT COUNT(value) FROM transactions AS gev WHERE gev.level = ikob.level );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "ikob", "inner_alias": "gev", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03645
train
v2
Schema: employees (alias: bev)(type, name, level, salary) tasks(id, type, level, amount) Task: Find code from employees where a matching record exists in tasks with the same type. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = bev.type );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "code", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03646
train
v2
Schema: employees (alias: bev)(name, type, level, value) regions(value, code, salary, date) Task: Retrieve value from employees that have at least one corresponding entry in regions sharing the same type. SQL:
SELECT value FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = bev.type );
{ "outer_table": "employees", "inner_table": "regions", "outer_alias": "bev", "inner_alias": "okiv", "proj_col": "value", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03647
train
v2
Schema: customers (alias: lex)(status, date, type, id) employees(value, amount, type, id) Task: Retrieve name from customers that have at least one corresponding entry in employees sharing the same status. SQL:
SELECT name FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = lex.status );
{ "outer_table": "customers", "inner_table": "employees", "outer_alias": "lex", "inner_alias": "bev", "proj_col": "name", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03648
train
v3
Schema: sales (alias: cif)(date, value, name, status) branches(level, name, type, value) Task: Find name from sales where amount exceeds the maximum amount from branches for the same id. SQL:
SELECT name FROM sales AS cif WHERE amount > ( SELECT MAX(amount) FROM branches AS agov WHERE agov.id = cif.id );
{ "outer_table": "sales", "inner_table": "branches", "outer_alias": "cif", "inner_alias": "agov", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03649
train
v3
Schema: sales (alias: cif)(code, type, id, amount) categories(name, type, value, amount) Task: Find salary from sales where amount exceeds the maximum salary from categories for the same status. SQL:
SELECT salary FROM sales AS cif WHERE amount > ( SELECT MAX(salary) FROM categories AS egiv WHERE egiv.status = cif.status );
{ "outer_table": "sales", "inner_table": "categories", "outer_alias": "cif", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03650
train
v3
Schema: customers (alias: lex)(id, status, date, name) branches(amount, date, value, name) Task: Find amount from customers where value exceeds the minimum salary from branches for the same id. SQL:
SELECT amount FROM customers AS lex WHERE value > ( SELECT MIN(salary) FROM branches AS agov WHERE agov.id = lex.id );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03651
train
v1
Schema: branches (alias: agov)(id, amount, level, type) managers(level, value, date, status) Task: Retrieve value from branches whose status is found in managers rows where id matches the outer record. SQL:
SELECT value FROM branches AS agov WHERE status IN ( SELECT status FROM managers AS hac WHERE hac.id = agov.id );
{ "outer_table": "branches", "inner_table": "managers", "outer_alias": "agov", "inner_alias": "hac", "proj_col": "value", "filter_col": "status", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03652
train
v2
Schema: branches (alias: agov)(amount, level, date, name) regions(level, salary, status, value) Task: Find name from branches where a matching record exists in regions with the same type. SQL:
SELECT name FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = agov.type );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "name", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03653
train
v2
Schema: regions (alias: okiv)(name, amount, code, level) requests(salary, status, code, amount) Task: Find salary from regions where a matching record exists in requests with the same id. SQL:
SELECT salary FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = okiv.id );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "salary", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_03654
train
v3
Schema: managers (alias: hac)(amount, date, name, level) orders(type, value, status, amount) Task: Retrieve id from managers with value above the SUM(amount) of orders rows sharing the same id. SQL:
SELECT id FROM managers AS hac WHERE value > ( SELECT SUM(amount) FROM orders AS kab WHERE kab.id = hac.id );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "id", "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_03655
train
v1
Schema: items (alias: ikob)(status, date, salary, level) invoices(status, level, id, salary) Task: Select id from items where type exists in invoices for the same code. SQL:
SELECT id FROM items AS ikob WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.code = ikob.code );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03656
train
v3
Schema: transactions (alias: gev)(value, name, type, id) staff(name, status, id, level) Task: Find name from transactions where salary exceeds the maximum amount from staff for the same type. SQL:
SELECT name FROM transactions AS gev WHERE salary > ( SELECT MAX(amount) FROM staff AS xnob WHERE xnob.type = gev.type );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03657
train
v3
Schema: regions (alias: okiv)(id, code, salary, amount) shipments(code, amount, type, name) Task: Find amount from regions where amount exceeds the average salary from shipments for the same level. SQL:
SELECT amount FROM regions AS okiv WHERE amount > ( SELECT AVG(salary) FROM shipments AS vnob WHERE vnob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "okiv", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_03658
train
v1
Schema: invoices (alias: fal)(value, salary, status, code) orders(salary, date, value, amount) Task: Find value from invoices where status appears in orders entries with matching status. SQL:
SELECT value FROM invoices AS fal WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.status = fal.status );
{ "outer_table": "invoices", "inner_table": "orders", "outer_alias": "fal", "inner_alias": "kab", "proj_col": "value", "filter_col": "status", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03659
train
v3
Schema: products (alias: nad)(code, status, name, value) branches(id, value, type, amount) Task: Retrieve value from products with salary above the SUM(amount) of branches rows sharing the same id. SQL:
SELECT value FROM products AS nad WHERE salary > ( SELECT SUM(amount) FROM branches AS agov WHERE agov.id = nad.id );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03660
train
v2
Schema: invoices (alias: fal)(id, date, level, amount) requests(level, value, type, salary) Task: Find amount from invoices where a matching record exists in requests with the same id. SQL:
SELECT amount 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": "amount", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03661
train
v3
Schema: branches (alias: agov)(salary, type, level, status) accounts(name, salary, date, status) Task: Retrieve code from branches with salary above the SUM(amount) of accounts rows sharing the same id. SQL:
SELECT code FROM branches AS agov WHERE salary > ( SELECT SUM(amount) FROM accounts AS jac WHERE jac.id = agov.id );
{ "outer_table": "branches", "inner_table": "accounts", "outer_alias": "agov", "inner_alias": "jac", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03662
train
v2
Schema: invoices (alias: fal)(status, value, code, level) staff(date, value, name, amount) Task: Retrieve name from invoices that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = fal.level );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "name", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03663
train
v1
Schema: branches (alias: agov)(id, type, code, value) staff(level, status, date, value) Task: Select salary from branches where status exists in staff for the same id. SQL:
SELECT salary FROM branches AS agov WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.id = agov.id );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03664
train
v1
Schema: employees (alias: bev)(code, id, value, salary) shipments(code, level, name, salary) Task: Select value from employees where id exists in shipments for the same id. SQL:
SELECT value FROM employees AS bev WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.id = bev.id );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "value", "filter_col": "id", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03665
train
v3
Schema: tasks (alias: znob)(code, amount, status, id) regions(name, salary, level, date) Task: Find salary from tasks where value exceeds the total amount from regions for the same level. SQL:
SELECT salary FROM tasks AS znob WHERE value > ( SELECT SUM(amount) FROM regions AS okiv WHERE okiv.level = znob.level );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03666
train
v1
Schema: schedules (alias: vmob)(id, amount, code, status) requests(name, date, amount, id) Task: Retrieve name from schedules whose status is found in requests rows where code matches the outer record. SQL:
SELECT name FROM schedules AS vmob WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "requests", "outer_alias": "vmob", "inner_alias": "ejof", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03667
train
v1
Schema: departments (alias: dov)(type, code, salary, status) shipments(amount, name, type, id) Task: Retrieve id from departments whose level is found in shipments rows where level matches the outer record. SQL:
SELECT id FROM departments AS dov WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.level = dov.level );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "id", "filter_col": "level", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03668
train
v2
Schema: items (alias: ikob)(status, level, name, amount) invoices(date, id, salary, status) Task: Retrieve name from items that have at least one corresponding entry in invoices sharing the same type. SQL:
SELECT name FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = ikob.type );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "name", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03669
train
v1
Schema: employees (alias: bev)(amount, value, date, code) schedules(name, level, type, amount) Task: Retrieve value from employees whose status is found in schedules rows where type matches the outer record. SQL:
SELECT value FROM employees AS bev WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.type = bev.type );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "value", "filter_col": "status", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03670
train
v2
Schema: orders (alias: kab)(code, status, level, amount) departments(status, name, code, id) Task: Retrieve salary from orders that have at least one corresponding entry in departments sharing the same id. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = kab.id );
{ "outer_table": "orders", "inner_table": "departments", "outer_alias": "kab", "inner_alias": "dov", "proj_col": "salary", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03671
train
v2
Schema: branches (alias: agov)(salary, level, amount, code) projects(type, id, value, code) Task: Find code from branches where a matching record exists in projects with the same level. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.level = agov.level );
{ "outer_table": "branches", "inner_table": "projects", "outer_alias": "agov", "inner_alias": "uliv", "proj_col": "code", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03672
train
v2
Schema: categories (alias: egiv)(value, level, salary, amount) schedules(code, level, value, amount) Task: Find value from categories where a matching record exists in schedules with the same id. SQL:
SELECT value FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.id = egiv.id );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "egiv", "inner_alias": "vmob", "proj_col": "value", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03673
train
v3
Schema: schedules (alias: vmob)(amount, type, salary, code) items(amount, id, code, type) Task: Find id from schedules where salary exceeds the maximum value from items for the same type. SQL:
SELECT id FROM schedules AS vmob WHERE salary > ( SELECT MAX(value) FROM items AS ikob WHERE ikob.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "vmob", "inner_alias": "ikob", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03674
train
v1
Schema: shipments (alias: vnob)(value, level, code, status) orders(level, id, date, amount) Task: Find amount from shipments where id appears in orders entries with matching level. SQL:
SELECT amount FROM shipments AS vnob WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "amount", "filter_col": "id", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03675
train
v2
Schema: managers (alias: hac)(status, salary, name, date) shipments(status, type, code, date) Task: Retrieve code from managers that have at least one corresponding entry in shipments sharing the same id. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = hac.id );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "hac", "inner_alias": "vnob", "proj_col": "code", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03676
train
v2
Schema: requests (alias: ejof)(amount, type, status, date) regions(amount, value, code, level) Task: Find id from requests where a matching record exists in regions with the same level. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = ejof.level );
{ "outer_table": "requests", "inner_table": "regions", "outer_alias": "ejof", "inner_alias": "okiv", "proj_col": "id", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_03677
train
v3
Schema: customers (alias: lex)(value, type, amount, status) branches(name, level, status, type) Task: Retrieve salary from customers with salary above the MAX(amount) of branches rows sharing the same status. SQL:
SELECT salary FROM customers AS lex WHERE salary > ( SELECT MAX(amount) FROM branches AS agov WHERE agov.status = lex.status );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03678
train
v2
Schema: transactions (alias: gev)(salary, date, value, name) branches(name, level, amount, salary) Task: Find id from transactions where a matching record exists in branches with the same status. SQL:
SELECT id FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = gev.status );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "gev", "inner_alias": "agov", "proj_col": "id", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03679
train
v3
Schema: invoices (alias: fal)(amount, date, status, name) departments(status, date, code, amount) Task: Find id from invoices where salary exceeds the maximum salary from departments for the same type. SQL:
SELECT id FROM invoices AS fal WHERE salary > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.type = fal.type );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03680
train
v1
Schema: accounts (alias: jac)(level, name, code, date) regions(name, level, amount, salary) Task: Select amount from accounts where id exists in regions for the same level. SQL:
SELECT amount FROM accounts AS jac WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.level = jac.level );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "id", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03681
train
v3
Schema: products (alias: nad)(salary, type, amount, level) transactions(type, salary, amount, level) Task: Retrieve name from products with salary above the COUNT(amount) of transactions rows sharing the same id. SQL:
SELECT name FROM products AS nad WHERE salary > ( SELECT COUNT(amount) FROM transactions AS gev WHERE gev.id = nad.id );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03682
train
v2
Schema: invoices (alias: fal)(amount, name, date, id) departments(name, status, id, type) Task: Find name from invoices where a matching record exists in departments with the same type. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = fal.type );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "name", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03683
train
v1
Schema: employees (alias: bev)(code, level, value, amount) orders(date, code, type, amount) Task: Select name from employees where code exists in orders for the same status. SQL:
SELECT name FROM employees AS bev WHERE code IN ( SELECT code 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": "code", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03684
train
v1
Schema: items (alias: ikob)(code, name, id, status) employees(name, amount, date, value) Task: Select id from items where level exists in employees for the same code. SQL:
SELECT id FROM items AS ikob WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.code = ikob.code );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03685
train
v2
Schema: branches (alias: agov)(name, status, code, type) departments(code, salary, value, name) Task: Find id from branches where a matching record exists in departments with the same level. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = agov.level );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "id", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03686
train
v2
Schema: managers (alias: hac)(date, amount, name, level) tasks(date, status, value, amount) Task: Find name from managers where a matching record exists in tasks with the same id. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = hac.id );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "name", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03687
train
v1
Schema: products (alias: nad)(amount, status, date, value) invoices(salary, name, status, amount) Task: Find name from products where level appears in invoices entries with matching code. SQL:
SELECT name FROM products AS nad WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.code = nad.code );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03688
train
v3
Schema: shipments (alias: vnob)(type, name, salary, status) regions(name, status, code, salary) Task: Retrieve code from shipments with amount above the MAX(value) of regions rows sharing the same type. SQL:
SELECT code FROM shipments AS vnob WHERE amount > ( SELECT MAX(value) FROM regions AS okiv WHERE okiv.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03689
train
v1
Schema: products (alias: nad)(id, date, value, type) schedules(name, level, id, date) Task: Retrieve amount from products whose level is found in schedules rows where level matches the outer record. SQL:
SELECT amount FROM products AS nad WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.level = nad.level );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "level", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03690
train
v1
Schema: staff (alias: xnob)(level, date, amount, name) categories(code, id, date, level) Task: Select salary from staff where status exists in categories for the same level. SQL:
SELECT salary FROM staff AS xnob WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.level = xnob.level );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03691
train
v2
Schema: managers (alias: hac)(code, salary, id, status) branches(code, id, value, date) Task: Find salary from managers where a matching record exists in branches with the same id. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = hac.id );
{ "outer_table": "managers", "inner_table": "branches", "outer_alias": "hac", "inner_alias": "agov", "proj_col": "salary", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03692
train
v2
Schema: customers (alias: lex)(type, level, status, salary) products(name, salary, type, id) Task: Retrieve id from customers that have at least one corresponding entry in products sharing the same level. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = lex.level );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "id", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03693
train
v1
Schema: staff (alias: xnob)(value, type, name, id) schedules(salary, type, id, status) Task: Retrieve amount from staff whose level is found in schedules rows where code matches the outer record. SQL:
SELECT amount FROM staff AS xnob WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.code = xnob.code );
{ "outer_table": "staff", "inner_table": "schedules", "outer_alias": "xnob", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03694
train
v1
Schema: employees (alias: bev)(date, code, amount, salary) shipments(code, type, name, salary) Task: Retrieve value from employees whose type is found in shipments rows where code matches the outer record. SQL:
SELECT value FROM employees AS bev WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.code = bev.code );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "value", "filter_col": "type", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03695
train
v1
Schema: branches (alias: agov)(id, code, level, status) transactions(status, type, value, amount) Task: Retrieve amount from branches whose status is found in transactions rows where id matches the outer record. SQL:
SELECT amount FROM branches AS agov WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.id = agov.id );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03696
train
v2
Schema: transactions (alias: gev)(status, date, code, name) projects(type, id, value, date) Task: Retrieve value from transactions that have at least one corresponding entry in projects sharing the same type. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = gev.type );
{ "outer_table": "transactions", "inner_table": "projects", "outer_alias": "gev", "inner_alias": "uliv", "proj_col": "value", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03697
train
v3
Schema: sales (alias: cif)(name, type, level, date) branches(type, salary, name, value) Task: Find value from sales where salary exceeds the total amount from branches for the same id. SQL:
SELECT value FROM sales AS cif WHERE salary > ( SELECT SUM(amount) FROM branches AS agov WHERE agov.id = cif.id );
{ "outer_table": "sales", "inner_table": "branches", "outer_alias": "cif", "inner_alias": "agov", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03698
train
v2
Schema: managers (alias: hac)(level, salary, type, status) items(code, level, salary, amount) Task: Retrieve amount from managers that have at least one corresponding entry in items sharing the same type. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = hac.type );
{ "outer_table": "managers", "inner_table": "items", "outer_alias": "hac", "inner_alias": "ikob", "proj_col": "amount", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03699
train