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: employees (alias: bev)(status, value, name, type) orders(amount, name, code, date) Task: Retrieve code from employees that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = bev.type );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "code", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09500
train
v1
Schema: customers (alias: lex)(type, salary, name, amount) requests(amount, type, status, id) Task: Retrieve code from customers whose status is found in requests rows where id matches the outer record. SQL:
SELECT code FROM customers AS lex WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.id = lex.id );
{ "outer_table": "customers", "inner_table": "requests", "outer_alias": "lex", "inner_alias": "ejof", "proj_col": "code", "filter_col": "status", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09501
train
v1
Schema: managers (alias: hac)(amount, value, id, salary) shipments(level, id, name, type) Task: Select name from managers where status exists in shipments for the same status. SQL:
SELECT name FROM managers AS hac WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.status = hac.status );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "hac", "inner_alias": "vnob", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09502
train
v2
Schema: tasks (alias: znob)(code, level, value, type) requests(code, type, date, value) Task: Find salary from tasks where a matching record exists in requests with the same id. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = znob.id );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "salary", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09503
train
v2
Schema: accounts (alias: jac)(salary, value, status, level) invoices(type, value, salary, amount) Task: Retrieve name from accounts that have at least one corresponding entry in invoices sharing the same type. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = jac.type );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "name", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09504
train
v3
Schema: branches (alias: agov)(amount, code, level, id) invoices(status, level, date, code) Task: Find code from branches where salary exceeds the minimum amount from invoices for the same code. SQL:
SELECT code FROM branches AS agov WHERE salary > ( SELECT MIN(amount) FROM invoices AS fal WHERE fal.code = agov.code );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09505
train
v1
Schema: shipments (alias: vnob)(id, salary, level, code) schedules(value, status, amount, id) Task: Find id from shipments where type appears in schedules entries with matching status. SQL:
SELECT id FROM shipments AS vnob WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09506
train
v3
Schema: projects (alias: uliv)(salary, name, date, value) transactions(code, value, level, salary) Task: Find amount from projects where salary exceeds the minimum amount from transactions for the same level. SQL:
SELECT amount FROM projects AS uliv WHERE salary > ( SELECT MIN(amount) FROM transactions AS gev WHERE gev.level = uliv.level );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09507
train
v2
Schema: departments (alias: dov)(level, code, id, value) managers(salary, value, code, name) Task: Retrieve id from departments that have at least one corresponding entry in managers sharing the same id. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = dov.id );
{ "outer_table": "departments", "inner_table": "managers", "outer_alias": "dov", "inner_alias": "hac", "proj_col": "id", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09508
train
v3
Schema: customers (alias: lex)(id, status, value, name) items(name, amount, date, status) Task: Find value from customers where salary exceeds the count of salary from items for the same type. SQL:
SELECT value FROM customers AS lex WHERE salary > ( SELECT COUNT(salary) FROM items AS ikob WHERE ikob.type = lex.type );
{ "outer_table": "customers", "inner_table": "items", "outer_alias": "lex", "inner_alias": "ikob", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09509
train
v3
Schema: employees (alias: bev)(id, date, type, salary) shipments(amount, name, status, type) Task: Retrieve code from employees with amount above the AVG(amount) of shipments rows sharing the same code. SQL:
SELECT code FROM employees AS bev WHERE amount > ( SELECT AVG(amount) FROM shipments AS vnob WHERE vnob.code = bev.code );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09510
train
v1
Schema: regions (alias: okiv)(value, name, salary, type) requests(level, salary, code, amount) Task: Retrieve value from regions whose status is found in requests rows where id matches the outer record. SQL:
SELECT value FROM regions AS okiv WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.id = okiv.id );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "value", "filter_col": "status", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09511
train
v1
Schema: schedules (alias: vmob)(status, date, code, name) customers(status, type, level, amount) Task: Retrieve value from schedules whose code is found in customers rows where code matches the outer record. SQL:
SELECT value FROM schedules AS vmob WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "vmob", "inner_alias": "lex", "proj_col": "value", "filter_col": "code", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09512
train
v1
Schema: accounts (alias: jac)(amount, value, level, name) departments(id, level, value, salary) Task: Find name from accounts where level appears in departments entries with matching type. SQL:
SELECT name FROM accounts AS jac WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.type = jac.type );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09513
train
v2
Schema: shipments (alias: vnob)(date, level, type, amount) departments(date, code, value, name) Task: Find code from shipments where a matching record exists in departments with the same type. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "code", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09514
train
v1
Schema: categories (alias: egiv)(status, salary, code, id) customers(id, salary, amount, level) Task: Find amount from categories where type appears in customers entries with matching id. SQL:
SELECT amount FROM categories AS egiv WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.id = egiv.id );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09515
train
v3
Schema: shipments (alias: vnob)(level, type, date, code) projects(level, type, salary, date) Task: Find code from shipments where amount exceeds the average value from projects for the same level. SQL:
SELECT code FROM shipments AS vnob WHERE amount > ( SELECT AVG(value) FROM projects AS uliv WHERE uliv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "projects", "outer_alias": "vnob", "inner_alias": "uliv", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09516
train
v1
Schema: shipments (alias: vnob)(type, status, id, level) accounts(date, type, id, amount) Task: Retrieve id from shipments whose status is found in accounts rows where code matches the outer record. SQL:
SELECT id FROM shipments AS vnob WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "accounts", "outer_alias": "vnob", "inner_alias": "jac", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09517
train
v1
Schema: accounts (alias: jac)(value, amount, code, type) departments(code, name, amount, date) Task: Find name from accounts where status appears in departments entries with matching level. SQL:
SELECT name FROM accounts AS jac WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.level = jac.level );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09518
train
v2
Schema: schedules (alias: vmob)(code, salary, level, id) orders(value, id, status, name) Task: Retrieve name from schedules that have at least one corresponding entry in orders sharing the same status. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "orders", "outer_alias": "vmob", "inner_alias": "kab", "proj_col": "name", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09519
train
v2
Schema: shipments (alias: vnob)(id, name, amount, type) accounts(code, id, amount, salary) Task: Find id from shipments where a matching record exists in accounts with the same code. SQL:
SELECT id FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "accounts", "outer_alias": "vnob", "inner_alias": "jac", "proj_col": "id", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09520
train
v2
Schema: employees (alias: bev)(amount, date, name, code) staff(name, date, status, code) Task: Retrieve value from employees that have at least one corresponding entry in staff sharing the same code. SQL:
SELECT value FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = bev.code );
{ "outer_table": "employees", "inner_table": "staff", "outer_alias": "bev", "inner_alias": "xnob", "proj_col": "value", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09521
train
v3
Schema: regions (alias: okiv)(salary, code, name, id) projects(level, salary, code, status) Task: Find code from regions where amount exceeds the average value from projects for the same type. SQL:
SELECT code FROM regions AS okiv WHERE amount > ( SELECT AVG(value) FROM projects AS uliv WHERE uliv.type = okiv.type );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09522
train
v3
Schema: orders (alias: kab)(status, amount, value, salary) projects(level, value, status, id) Task: Find amount from orders where value exceeds the average salary from projects for the same id. SQL:
SELECT amount FROM orders AS kab WHERE value > ( SELECT AVG(salary) FROM projects AS uliv WHERE uliv.id = kab.id );
{ "outer_table": "orders", "inner_table": "projects", "outer_alias": "kab", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09523
train
v2
Schema: invoices (alias: fal)(name, amount, status, date) regions(date, code, type, name) Task: Retrieve salary from invoices that have at least one corresponding entry in regions sharing the same type. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = fal.type );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "salary", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09524
train
v1
Schema: branches (alias: agov)(value, amount, id, salary) invoices(salary, level, name, status) Task: Select value from branches where type exists in invoices for the same level. SQL:
SELECT value FROM branches AS agov WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.level = agov.level );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "value", "filter_col": "type", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09525
train
v1
Schema: products (alias: nad)(name, amount, type, status) requests(amount, type, code, level) Task: Select amount from products where level exists in requests for the same status. SQL:
SELECT amount FROM products AS nad WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.status = nad.status );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09526
train
v3
Schema: customers (alias: lex)(amount, code, salary, date) sales(salary, name, level, id) Task: Find id from customers where amount exceeds the minimum amount from sales for the same type. SQL:
SELECT id FROM customers AS lex WHERE amount > ( SELECT MIN(amount) FROM sales AS cif WHERE cif.type = lex.type );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09527
train
v1
Schema: departments (alias: dov)(salary, date, level, amount) managers(level, name, id, value) Task: Find name from departments where status appears in managers entries with matching level. SQL:
SELECT name FROM departments AS dov WHERE status IN ( SELECT status FROM managers AS hac WHERE hac.level = dov.level );
{ "outer_table": "departments", "inner_table": "managers", "outer_alias": "dov", "inner_alias": "hac", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09528
train
v1
Schema: regions (alias: okiv)(code, date, salary, name) requests(code, salary, name, value) Task: Retrieve salary from regions whose level is found in requests rows where code matches the outer record. SQL:
SELECT salary FROM regions AS okiv WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.code = okiv.code );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "level", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09529
train
v1
Schema: requests (alias: ejof)(value, type, name, level) shipments(id, type, salary, date) Task: Select value from requests where id exists in shipments for the same id. SQL:
SELECT value FROM requests AS ejof WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ejof", "inner_alias": "vnob", "proj_col": "value", "filter_col": "id", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09530
train
v3
Schema: staff (alias: xnob)(level, date, type, salary) shipments(code, status, name, amount) Task: Find value from staff where value exceeds the average salary from shipments for the same id. SQL:
SELECT value FROM staff AS xnob WHERE value > ( SELECT AVG(salary) FROM shipments AS vnob WHERE vnob.id = xnob.id );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09531
train
v2
Schema: customers (alias: lex)(level, status, amount, name) departments(status, value, name, amount) Task: Find value from customers where a matching record exists in departments with the same status. SQL:
SELECT value FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = lex.status );
{ "outer_table": "customers", "inner_table": "departments", "outer_alias": "lex", "inner_alias": "dov", "proj_col": "value", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09532
train
v2
Schema: departments (alias: dov)(value, level, code, date) projects(type, code, name, id) Task: Find code from departments where a matching record exists in projects with the same id. SQL:
SELECT code FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.id = dov.id );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "code", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09533
train
v1
Schema: categories (alias: egiv)(value, status, id, date) projects(code, amount, value, name) Task: Retrieve name from categories whose id is found in projects rows where code matches the outer record. SQL:
SELECT name FROM categories AS egiv WHERE id IN ( SELECT id FROM projects AS uliv WHERE uliv.code = egiv.code );
{ "outer_table": "categories", "inner_table": "projects", "outer_alias": "egiv", "inner_alias": "uliv", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09534
train
v1
Schema: orders (alias: kab)(type, salary, code, name) branches(type, value, amount, name) Task: Select value from orders where status exists in branches for the same code. SQL:
SELECT value FROM orders AS kab WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.code = kab.code );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "value", "filter_col": "status", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09535
train
v2
Schema: customers (alias: lex)(value, type, date, salary) staff(code, level, name, id) Task: Retrieve code from customers that have at least one corresponding entry in staff sharing the same status. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = lex.status );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "code", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09536
train
v2
Schema: orders (alias: kab)(status, date, code, amount) employees(level, salary, status, name) Task: Retrieve name from orders that have at least one corresponding entry in employees sharing the same code. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.code = kab.code );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "name", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09537
train
v1
Schema: orders (alias: kab)(status, date, id, amount) employees(salary, status, date, code) Task: Retrieve name from orders whose level is found in employees rows where status matches the outer record. SQL:
SELECT name FROM orders AS kab WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.status = kab.status );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09538
train
v1
Schema: staff (alias: xnob)(date, level, status, name) accounts(amount, salary, value, code) Task: Retrieve value from staff whose status is found in accounts rows where type matches the outer record. SQL:
SELECT value FROM staff AS xnob WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.type = xnob.type );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "value", "filter_col": "status", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09539
train
v2
Schema: transactions (alias: gev)(amount, type, code, value) tasks(name, code, amount, status) Task: Retrieve id from transactions that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT id FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = gev.status );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "id", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09540
train
v3
Schema: requests (alias: ejof)(id, name, date, level) projects(level, amount, status, date) Task: Find amount from requests where salary exceeds the total value from projects for the same id. SQL:
SELECT amount FROM requests AS ejof WHERE salary > ( SELECT SUM(value) FROM projects AS uliv WHERE uliv.id = ejof.id );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09541
train
v3
Schema: customers (alias: lex)(level, amount, id, status) invoices(level, date, amount, name) Task: Find id from customers where amount exceeds the average amount from invoices for the same code. SQL:
SELECT id FROM customers AS lex WHERE amount > ( SELECT AVG(amount) FROM invoices AS fal WHERE fal.code = lex.code );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "lex", "inner_alias": "fal", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09542
train
v2
Schema: products (alias: nad)(code, level, type, amount) tasks(value, id, status, amount) Task: Find amount from products where a matching record exists in tasks with the same level. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.level = nad.level );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "amount", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09543
train
v3
Schema: accounts (alias: jac)(salary, level, type, date) items(date, value, name, code) Task: Find value from accounts where value exceeds the count of salary from items for the same status. SQL:
SELECT value FROM accounts AS jac WHERE value > ( SELECT COUNT(salary) FROM items AS ikob WHERE ikob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09544
train
v2
Schema: schedules (alias: vmob)(status, id, code, amount) branches(code, date, type, salary) Task: Retrieve value from schedules that have at least one corresponding entry in branches sharing the same level. SQL:
SELECT value FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "branches", "outer_alias": "vmob", "inner_alias": "agov", "proj_col": "value", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09545
train
v1
Schema: accounts (alias: jac)(id, status, code, salary) products(amount, type, code, name) Task: Retrieve id from accounts whose code is found in products rows where code matches the outer record. SQL:
SELECT id FROM accounts AS jac WHERE code IN ( SELECT code FROM products AS nad WHERE nad.code = jac.code );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "jac", "inner_alias": "nad", "proj_col": "id", "filter_col": "code", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09546
train
v1
Schema: requests (alias: ejof)(id, amount, code, date) projects(amount, name, level, code) Task: Find code from requests where status appears in projects entries with matching type. SQL:
SELECT code FROM requests AS ejof WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.type = ejof.type );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09547
train
v2
Schema: orders (alias: kab)(level, value, salary, type) branches(date, id, salary, level) Task: Retrieve salary from orders that have at least one corresponding entry in branches sharing the same type. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.type = kab.type );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "salary", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09548
train
v2
Schema: items (alias: ikob)(date, name, level, status) tasks(salary, code, name, level) Task: Retrieve name from items that have at least one corresponding entry in tasks sharing the same level. SQL:
SELECT name FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.level = ikob.level );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "name", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09549
train
v1
Schema: requests (alias: ejof)(amount, type, code, id) regions(status, salary, date, value) Task: Select name from requests where code exists in regions for the same code. SQL:
SELECT name FROM requests AS ejof WHERE code IN ( SELECT code FROM regions AS okiv WHERE okiv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "regions", "outer_alias": "ejof", "inner_alias": "okiv", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09550
train
v1
Schema: departments (alias: dov)(id, name, value, status) schedules(id, type, value, code) Task: Retrieve salary from departments whose status is found in schedules rows where status matches the outer record. SQL:
SELECT salary FROM departments AS dov WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.status = dov.status );
{ "outer_table": "departments", "inner_table": "schedules", "outer_alias": "dov", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "status", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09551
train
v3
Schema: shipments (alias: vnob)(code, amount, status, value) managers(level, id, value, date) Task: Retrieve amount from shipments with salary above the MIN(value) of managers rows sharing the same type. SQL:
SELECT amount FROM shipments AS vnob WHERE salary > ( SELECT MIN(value) FROM managers AS hac WHERE hac.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09552
train
v1
Schema: sales (alias: cif)(name, value, type, level) staff(id, code, date, value) Task: Find name from sales where code appears in staff entries with matching id. SQL:
SELECT name FROM sales AS cif WHERE code IN ( SELECT code FROM staff AS xnob WHERE xnob.id = cif.id );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09553
train
v2
Schema: sales (alias: cif)(salary, id, code, status) items(amount, salary, id, level) Task: Find id from sales where a matching record exists in items with the same type. SQL:
SELECT id FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = cif.type );
{ "outer_table": "sales", "inner_table": "items", "outer_alias": "cif", "inner_alias": "ikob", "proj_col": "id", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09554
train
v1
Schema: schedules (alias: vmob)(value, id, name, status) projects(status, type, amount, id) Task: Find name from schedules where status appears in projects entries with matching type. SQL:
SELECT name FROM schedules AS vmob WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09555
train
v1
Schema: orders (alias: kab)(code, name, level, status) products(id, level, salary, name) Task: Find code from orders where status appears in products entries with matching status. SQL:
SELECT code FROM orders AS kab WHERE status IN ( SELECT status FROM products AS nad WHERE nad.status = kab.status );
{ "outer_table": "orders", "inner_table": "products", "outer_alias": "kab", "inner_alias": "nad", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09556
train
v2
Schema: categories (alias: egiv)(id, amount, status, name) accounts(amount, name, status, value) Task: Retrieve name from categories that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT name FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = egiv.code );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "egiv", "inner_alias": "jac", "proj_col": "name", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09557
train
v2
Schema: departments (alias: dov)(code, type, value, amount) employees(type, name, salary, value) Task: Retrieve id from departments that have at least one corresponding entry in employees sharing the same code. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.code = dov.code );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "id", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09558
train
v2
Schema: categories (alias: egiv)(name, salary, value, type) sales(date, status, id, amount) Task: Find id from categories where a matching record exists in sales with the same type. SQL:
SELECT id 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": "id", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09559
train
v3
Schema: orders (alias: kab)(type, name, amount, id) branches(code, value, status, type) Task: Find amount from orders where amount exceeds the average salary from branches for the same code. SQL:
SELECT amount FROM orders AS kab WHERE amount > ( SELECT AVG(salary) FROM branches AS agov WHERE agov.code = kab.code );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09560
train
v1
Schema: accounts (alias: jac)(date, salary, value, code) products(level, name, salary, date) Task: Retrieve value from accounts whose level is found in products rows where type matches the outer record. SQL:
SELECT value FROM accounts AS jac WHERE level IN ( SELECT level FROM products AS nad WHERE nad.type = jac.type );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "jac", "inner_alias": "nad", "proj_col": "value", "filter_col": "level", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09561
train
v2
Schema: requests (alias: ejof)(code, status, date, type) categories(name, amount, date, code) Task: Retrieve id from requests that have at least one corresponding entry in categories sharing the same id. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.id = ejof.id );
{ "outer_table": "requests", "inner_table": "categories", "outer_alias": "ejof", "inner_alias": "egiv", "proj_col": "id", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09562
train
v3
Schema: products (alias: nad)(salary, amount, type, name) branches(name, id, level, amount) Task: Find amount from products where salary exceeds the total salary from branches for the same code. SQL:
SELECT amount FROM products AS nad WHERE salary > ( SELECT SUM(salary) FROM branches AS agov WHERE agov.code = nad.code );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09563
train
v3
Schema: customers (alias: lex)(id, value, amount, name) categories(date, code, id, salary) Task: Retrieve value from customers with value above the SUM(value) of categories rows sharing the same id. SQL:
SELECT value FROM customers AS lex WHERE value > ( SELECT SUM(value) FROM categories AS egiv WHERE egiv.id = lex.id );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09564
train
v2
Schema: managers (alias: hac)(code, status, id, type) transactions(status, code, level, id) Task: Retrieve amount from managers that have at least one corresponding entry in transactions sharing the same status. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = hac.status );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "amount", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09565
train
v3
Schema: sales (alias: cif)(salary, code, id, amount) products(amount, status, id, date) Task: Retrieve value from sales with salary above the COUNT(amount) of products rows sharing the same level. SQL:
SELECT value FROM sales AS cif WHERE salary > ( SELECT COUNT(amount) FROM products AS nad WHERE nad.level = cif.level );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09566
train
v1
Schema: transactions (alias: gev)(amount, value, name, salary) customers(level, date, amount, salary) Task: Retrieve value from transactions whose level is found in customers rows where level matches the outer record. SQL:
SELECT value FROM transactions AS gev WHERE level IN ( SELECT level FROM customers AS lex WHERE lex.level = gev.level );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "gev", "inner_alias": "lex", "proj_col": "value", "filter_col": "level", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09567
train
v3
Schema: requests (alias: ejof)(value, amount, status, type) invoices(id, amount, status, name) Task: Retrieve salary from requests with salary above the SUM(salary) of invoices rows sharing the same type. SQL:
SELECT salary FROM requests AS ejof WHERE salary > ( SELECT SUM(salary) FROM invoices AS fal WHERE fal.type = ejof.type );
{ "outer_table": "requests", "inner_table": "invoices", "outer_alias": "ejof", "inner_alias": "fal", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09568
train
v2
Schema: accounts (alias: jac)(status, date, code, name) regions(code, status, amount, salary) Task: Find name from accounts where a matching record exists in regions with the same id. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = jac.id );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "name", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09569
train
v1
Schema: shipments (alias: vnob)(amount, name, salary, value) products(type, code, date, level) Task: Select id from shipments where code exists in products for the same status. SQL:
SELECT id FROM shipments AS vnob WHERE code IN ( SELECT code FROM products AS nad WHERE nad.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "id", "filter_col": "code", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09570
train
v3
Schema: products (alias: nad)(value, date, type, name) departments(level, salary, status, value) Task: Retrieve amount from products with value above the SUM(value) of departments rows sharing the same id. SQL:
SELECT amount FROM products AS nad WHERE value > ( SELECT SUM(value) FROM departments AS dov WHERE dov.id = nad.id );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09571
train
v1
Schema: regions (alias: okiv)(type, amount, id, value) products(type, name, value, salary) Task: Select amount from regions where id exists in products for the same type. SQL:
SELECT amount FROM regions AS okiv WHERE id IN ( SELECT id FROM products AS nad WHERE nad.type = okiv.type );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09572
train
v1
Schema: managers (alias: hac)(level, date, amount, value) regions(code, date, salary, type) Task: Select code from managers where code exists in regions for the same type. SQL:
SELECT code FROM managers AS hac WHERE code IN ( SELECT code FROM regions AS okiv WHERE okiv.type = hac.type );
{ "outer_table": "managers", "inner_table": "regions", "outer_alias": "hac", "inner_alias": "okiv", "proj_col": "code", "filter_col": "code", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09573
train
v1
Schema: staff (alias: xnob)(name, id, type, value) regions(value, date, name, amount) Task: Select code from staff where type exists in regions for the same id. SQL:
SELECT code FROM staff AS xnob WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.id = xnob.id );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "type", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09574
train
v3
Schema: invoices (alias: fal)(date, salary, type, level) managers(id, value, level, name) Task: Retrieve code from invoices with value above the MIN(amount) of managers rows sharing the same level. SQL:
SELECT code FROM invoices AS fal WHERE value > ( SELECT MIN(amount) FROM managers AS hac WHERE hac.level = fal.level );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09575
train
v1
Schema: products (alias: nad)(date, salary, id, value) customers(date, status, code, salary) Task: Select amount from products where type exists in customers for the same level. SQL:
SELECT amount FROM products AS nad WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.level = nad.level );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "amount", "filter_col": "type", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09576
train
v1
Schema: categories (alias: egiv)(level, code, amount, status) shipments(salary, code, id, amount) Task: Find salary from categories where level appears in shipments entries with matching type. SQL:
SELECT salary FROM categories AS egiv WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "level", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09577
train
v3
Schema: products (alias: nad)(salary, code, date, amount) orders(salary, status, level, date) Task: Retrieve name from products with salary above the MIN(salary) of orders rows sharing the same code. SQL:
SELECT name FROM products AS nad WHERE salary > ( SELECT MIN(salary) FROM orders AS kab WHERE kab.code = nad.code );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "nad", "inner_alias": "kab", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09578
train
v3
Schema: branches (alias: agov)(amount, code, type, id) products(level, date, type, value) Task: Retrieve code from branches with amount above the AVG(amount) of products rows sharing the same type. SQL:
SELECT code FROM branches AS agov WHERE amount > ( SELECT AVG(amount) FROM products AS nad WHERE nad.type = agov.type );
{ "outer_table": "branches", "inner_table": "products", "outer_alias": "agov", "inner_alias": "nad", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09579
train
v3
Schema: managers (alias: hac)(id, date, type, level) employees(status, type, date, level) Task: Retrieve amount from managers with salary above the SUM(value) of employees rows sharing the same level. SQL:
SELECT amount FROM managers AS hac WHERE salary > ( SELECT SUM(value) FROM employees AS bev WHERE bev.level = hac.level );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09580
train
v3
Schema: categories (alias: egiv)(amount, salary, status, type) projects(amount, id, status, code) Task: Retrieve value from categories with salary above the AVG(value) of projects rows sharing the same code. SQL:
SELECT value FROM categories AS egiv WHERE salary > ( SELECT AVG(value) FROM projects AS uliv WHERE uliv.code = egiv.code );
{ "outer_table": "categories", "inner_table": "projects", "outer_alias": "egiv", "inner_alias": "uliv", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09581
train
v1
Schema: employees (alias: bev)(amount, value, salary, name) schedules(status, amount, id, level) Task: Find code from employees where id appears in schedules entries with matching level. SQL:
SELECT code FROM employees AS bev WHERE id IN ( SELECT id FROM schedules AS vmob WHERE vmob.level = bev.level );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09582
train
v2
Schema: tasks (alias: znob)(code, type, salary, level) transactions(name, level, amount, status) Task: Retrieve salary from tasks that have at least one corresponding entry in transactions sharing the same level. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = znob.level );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "salary", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09583
train
v1
Schema: managers (alias: hac)(name, amount, salary, type) departments(date, level, amount, id) Task: Find amount from managers where status appears in departments entries with matching type. SQL:
SELECT amount FROM managers AS hac WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.type = hac.type );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09584
train
v2
Schema: orders (alias: kab)(value, salary, amount, level) categories(id, salary, status, name) Task: Find name from orders where a matching record exists in categories with the same id. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.id = kab.id );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "name", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09585
train
v1
Schema: departments (alias: dov)(value, amount, name, status) sales(code, status, level, type) Task: Retrieve amount from departments whose id is found in sales rows where type matches the outer record. SQL:
SELECT amount FROM departments AS dov WHERE id IN ( SELECT id FROM sales AS cif WHERE cif.type = dov.type );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09586
train
v3
Schema: employees (alias: bev)(date, amount, name, id) shipments(amount, date, status, id) Task: Retrieve value from employees with salary above the MAX(value) of shipments rows sharing the same code. SQL:
SELECT value FROM employees AS bev WHERE salary > ( SELECT MAX(value) 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": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09587
train
v2
Schema: staff (alias: xnob)(status, id, type, level) invoices(amount, id, value, date) Task: Find code from staff where a matching record exists in invoices with the same id. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = xnob.id );
{ "outer_table": "staff", "inner_table": "invoices", "outer_alias": "xnob", "inner_alias": "fal", "proj_col": "code", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09588
train
v1
Schema: accounts (alias: jac)(id, type, value, code) sales(level, status, code, amount) Task: Find amount from accounts where id appears in sales entries with matching status. SQL:
SELECT amount FROM accounts AS jac WHERE id IN ( SELECT id FROM sales AS cif WHERE cif.status = jac.status );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09589
train
v2
Schema: customers (alias: lex)(code, status, amount, name) departments(amount, salary, code, date) Task: Find code from customers where a matching record exists in departments with the same status. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = lex.status );
{ "outer_table": "customers", "inner_table": "departments", "outer_alias": "lex", "inner_alias": "dov", "proj_col": "code", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09590
train
v2
Schema: transactions (alias: gev)(type, id, salary, code) regions(date, status, name, code) Task: Find name from transactions where a matching record exists in regions with the same level. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = gev.level );
{ "outer_table": "transactions", "inner_table": "regions", "outer_alias": "gev", "inner_alias": "okiv", "proj_col": "name", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09591
train
v2
Schema: accounts (alias: jac)(amount, level, salary, id) tasks(status, id, code, level) Task: Retrieve name from accounts that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = jac.id );
{ "outer_table": "accounts", "inner_table": "tasks", "outer_alias": "jac", "inner_alias": "znob", "proj_col": "name", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09592
train
v1
Schema: sales (alias: cif)(value, level, code, salary) accounts(amount, date, level, name) Task: Find code from sales where code appears in accounts entries with matching level. SQL:
SELECT code FROM sales AS cif WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.level = cif.level );
{ "outer_table": "sales", "inner_table": "accounts", "outer_alias": "cif", "inner_alias": "jac", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09593
train
v2
Schema: items (alias: ikob)(value, type, amount, salary) invoices(level, name, type, id) Task: Find salary from items where a matching record exists in invoices with the same type. SQL:
SELECT salary 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": "salary", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09594
train
v2
Schema: customers (alias: lex)(type, level, salary, amount) schedules(level, name, code, status) Task: Retrieve value from customers that have at least one corresponding entry in schedules sharing the same type. SQL:
SELECT value FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = lex.type );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "value", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09595
train
v1
Schema: orders (alias: kab)(value, amount, level, salary) requests(code, amount, name, type) Task: Find value from orders where status appears in requests entries with matching code. SQL:
SELECT value FROM orders AS kab WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.code = kab.code );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "value", "filter_col": "status", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09596
train
v2
Schema: requests (alias: ejof)(status, level, date, code) staff(id, status, date, name) Task: Retrieve id from requests that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = ejof.level );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ejof", "inner_alias": "xnob", "proj_col": "id", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09597
train
v1
Schema: transactions (alias: gev)(id, date, amount, code) orders(name, code, type, id) Task: Select name from transactions where id exists in orders for the same status. SQL:
SELECT name FROM transactions AS gev WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.status = gev.status );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "gev", "inner_alias": "kab", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09598
train
v2
Schema: transactions (alias: gev)(status, value, date, level) requests(code, status, name, id) Task: Retrieve name from transactions that have at least one corresponding entry in requests sharing the same code. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = gev.code );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "name", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09599
train