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: regions (alias: okiv)(type, salary, date, status) categories(amount, status, value, level) Task: Retrieve amount from regions that have at least one corresponding entry in categories sharing the same code. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = okiv.code );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "amount", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09600
train
v3
Schema: staff (alias: xnob)(name, value, code, salary) requests(code, date, status, level) Task: Find name from staff where amount exceeds the total value from requests for the same code. SQL:
SELECT name FROM staff AS xnob WHERE amount > ( SELECT SUM(value) FROM requests AS ejof WHERE ejof.code = xnob.code );
{ "outer_table": "staff", "inner_table": "requests", "outer_alias": "xnob", "inner_alias": "ejof", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09601
train
v2
Schema: employees (alias: bev)(id, value, name, level) tasks(level, amount, id, type) Task: Find name from employees where a matching record exists in tasks with the same type. SQL:
SELECT name 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": "name", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09602
train
v3
Schema: departments (alias: dov)(date, value, level, id) requests(code, salary, status, date) Task: Find amount from departments where salary exceeds the average amount from requests for the same level. SQL:
SELECT amount FROM departments AS dov WHERE salary > ( SELECT AVG(amount) FROM requests AS ejof WHERE ejof.level = dov.level );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09603
train
v3
Schema: tasks (alias: znob)(salary, status, value, level) employees(status, salary, name, id) Task: Retrieve id from tasks with value above the SUM(value) of employees rows sharing the same status. SQL:
SELECT id FROM tasks AS znob WHERE value > ( SELECT SUM(value) FROM employees AS bev WHERE bev.status = znob.status );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09604
train
v3
Schema: customers (alias: lex)(level, date, value, id) accounts(name, id, level, salary) Task: Find id from customers where value exceeds the count of salary from accounts for the same status. SQL:
SELECT id FROM customers AS lex WHERE value > ( SELECT COUNT(salary) FROM accounts AS jac WHERE jac.status = lex.status );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "lex", "inner_alias": "jac", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09605
train
v1
Schema: managers (alias: hac)(type, value, status, date) accounts(value, code, salary, id) Task: Retrieve name from managers whose code is found in accounts rows where code matches the outer record. SQL:
SELECT name FROM managers AS hac WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.code = hac.code );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09606
train
v3
Schema: staff (alias: xnob)(type, id, status, amount) items(amount, type, name, code) Task: Find amount from staff where amount exceeds the total amount from items for the same level. SQL:
SELECT amount FROM staff AS xnob WHERE amount > ( SELECT SUM(amount) FROM items AS ikob WHERE ikob.level = xnob.level );
{ "outer_table": "staff", "inner_table": "items", "outer_alias": "xnob", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09607
train
v3
Schema: requests (alias: ejof)(id, code, date, name) products(id, amount, status, code) Task: Find salary from requests where salary exceeds the total amount from products for the same code. SQL:
SELECT salary FROM requests AS ejof WHERE salary > ( SELECT SUM(amount) FROM products AS nad WHERE nad.code = ejof.code );
{ "outer_table": "requests", "inner_table": "products", "outer_alias": "ejof", "inner_alias": "nad", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09608
train
v2
Schema: sales (alias: cif)(id, date, amount, value) managers(status, salary, date, type) Task: Retrieve salary from sales that have at least one corresponding entry in managers sharing the same code. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = cif.code );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "cif", "inner_alias": "hac", "proj_col": "salary", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09609
train
v2
Schema: invoices (alias: fal)(level, amount, name, code) categories(id, name, status, salary) Task: Find name from invoices where a matching record exists in categories with the same id. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.id = fal.id );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "name", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09610
train
v3
Schema: transactions (alias: gev)(value, date, level, code) tasks(name, status, date, salary) Task: Retrieve code from transactions with value above the COUNT(amount) of tasks rows sharing the same level. SQL:
SELECT code FROM transactions AS gev WHERE value > ( SELECT COUNT(amount) FROM tasks AS znob WHERE znob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09611
train
v1
Schema: products (alias: nad)(salary, date, amount, id) departments(date, salary, level, value) Task: Find value from products where code appears in departments entries with matching id. SQL:
SELECT value FROM products AS nad WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.id = nad.id );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "value", "filter_col": "code", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09612
train
v3
Schema: customers (alias: lex)(salary, status, amount, type) staff(status, code, salary, name) Task: Retrieve id from customers with salary above the MIN(amount) of staff rows sharing the same status. SQL:
SELECT id FROM customers AS lex WHERE salary > ( SELECT MIN(amount) FROM staff AS xnob WHERE xnob.status = lex.status );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09613
train
v1
Schema: departments (alias: dov)(date, id, name, type) employees(name, id, date, amount) Task: Retrieve value from departments whose code is found in employees rows where level matches the outer record. SQL:
SELECT value FROM departments AS dov WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.level = dov.level );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09614
train
v3
Schema: schedules (alias: vmob)(code, value, type, status) sales(name, value, code, status) Task: Retrieve amount from schedules with value above the SUM(value) of sales rows sharing the same status. SQL:
SELECT amount FROM schedules AS vmob WHERE value > ( SELECT SUM(value) FROM sales AS cif WHERE cif.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "vmob", "inner_alias": "cif", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09615
train
v3
Schema: tasks (alias: znob)(value, date, salary, level) schedules(date, code, id, name) Task: Find id from tasks where value exceeds the maximum amount from schedules for the same id. SQL:
SELECT id FROM tasks AS znob WHERE value > ( SELECT MAX(amount) FROM schedules AS vmob WHERE vmob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09616
train
v1
Schema: shipments (alias: vnob)(name, level, status, id) invoices(status, type, value, salary) Task: Find id from shipments where code appears in invoices entries with matching type. SQL:
SELECT id FROM shipments AS vnob WHERE code IN ( SELECT code FROM invoices AS fal WHERE fal.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "vnob", "inner_alias": "fal", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09617
train
v2
Schema: employees (alias: bev)(code, value, date, type) sales(type, name, salary, level) Task: Find id from employees where a matching record exists in sales with the same status. SQL:
SELECT id FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = bev.status );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "id", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09618
train
v2
Schema: sales (alias: cif)(date, type, salary, name) shipments(salary, date, code, level) Task: Retrieve amount from sales that have at least one corresponding entry in shipments sharing the same status. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.status = cif.status );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "amount", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09619
train
v2
Schema: categories (alias: egiv)(salary, status, id, date) regions(id, date, type, status) Task: Find id from categories where a matching record exists in regions with the same code. SQL:
SELECT id FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = egiv.code );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "id", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09620
train
v2
Schema: invoices (alias: fal)(code, date, value, name) accounts(level, code, amount, salary) Task: Retrieve value from invoices that have at least one corresponding entry in accounts sharing the same type. SQL:
SELECT value FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = fal.type );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "value", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09621
train
v3
Schema: accounts (alias: jac)(status, amount, type, salary) managers(id, type, amount, salary) Task: Retrieve amount from accounts with salary above the AVG(amount) of managers rows sharing the same level. SQL:
SELECT amount FROM accounts AS jac WHERE salary > ( SELECT AVG(amount) FROM managers AS hac WHERE hac.level = jac.level );
{ "outer_table": "accounts", "inner_table": "managers", "outer_alias": "jac", "inner_alias": "hac", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09622
train
v2
Schema: categories (alias: egiv)(id, code, date, name) departments(value, date, id, salary) Task: Retrieve amount from categories that have at least one corresponding entry in departments sharing the same id. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = egiv.id );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "amount", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09623
train
v2
Schema: orders (alias: kab)(level, name, amount, value) invoices(code, type, name, id) Task: Retrieve name from orders that have at least one corresponding entry in invoices sharing the same id. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = kab.id );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "kab", "inner_alias": "fal", "proj_col": "name", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09624
train
v1
Schema: products (alias: nad)(salary, code, amount, level) branches(status, code, id, salary) Task: Retrieve value from products whose level is found in branches rows where id matches the outer record. SQL:
SELECT value FROM products AS nad WHERE level IN ( SELECT level 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": "level", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09625
train
v2
Schema: invoices (alias: fal)(level, value, id, date) branches(amount, salary, status, code) Task: Find amount from invoices where a matching record exists in branches with the same type. SQL:
SELECT amount FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.type = fal.type );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "amount", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09626
train
v2
Schema: regions (alias: okiv)(amount, value, status, type) shipments(date, type, status, amount) Task: Find code from regions where a matching record exists in shipments with the same type. SQL:
SELECT code FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = okiv.type );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "okiv", "inner_alias": "vnob", "proj_col": "code", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09627
train
v1
Schema: tasks (alias: znob)(date, status, id, value) transactions(date, code, level, salary) Task: Retrieve id from tasks whose type is found in transactions rows where id matches the outer record. SQL:
SELECT id FROM tasks AS znob WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.id = znob.id );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "id", "filter_col": "type", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09628
train
v2
Schema: staff (alias: xnob)(date, status, code, salary) regions(level, value, amount, status) Task: Find name from staff where a matching record exists in regions with the same id. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = xnob.id );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "name", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09629
train
v1
Schema: products (alias: nad)(code, amount, type, status) departments(date, status, salary, name) Task: Find value from products where status appears in departments entries with matching type. SQL:
SELECT value FROM products AS nad WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.type = nad.type );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "value", "filter_col": "status", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09630
train
v2
Schema: schedules (alias: vmob)(level, id, date, amount) branches(name, status, level, code) Task: Retrieve amount from schedules that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "branches", "outer_alias": "vmob", "inner_alias": "agov", "proj_col": "amount", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09631
train
v2
Schema: shipments (alias: vnob)(value, name, type, salary) orders(level, id, code, date) Task: Find name from shipments where a matching record exists in orders with the same code. SQL:
SELECT name FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "name", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09632
train
v3
Schema: regions (alias: okiv)(date, id, status, name) projects(id, value, level, code) Task: Retrieve id from regions with value above the MAX(amount) of projects rows sharing the same id. SQL:
SELECT id FROM regions AS okiv WHERE value > ( SELECT MAX(amount) FROM projects AS uliv WHERE uliv.id = okiv.id );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09633
train
v2
Schema: managers (alias: hac)(date, level, amount, value) shipments(status, value, date, code) Task: Retrieve name from managers that have at least one corresponding entry in shipments sharing the same type. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = hac.type );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "hac", "inner_alias": "vnob", "proj_col": "name", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09634
train
v1
Schema: managers (alias: hac)(type, code, name, date) accounts(level, status, name, type) Task: Select salary from managers where type exists in accounts for the same code. SQL:
SELECT salary FROM managers AS hac WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.code = hac.code );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09635
train
v1
Schema: schedules (alias: vmob)(id, amount, type, date) branches(status, id, code, amount) Task: Retrieve id from schedules whose code is found in branches rows where type matches the outer record. SQL:
SELECT id FROM schedules AS vmob WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "branches", "outer_alias": "vmob", "inner_alias": "agov", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09636
train
v3
Schema: branches (alias: agov)(salary, status, name, amount) requests(date, name, type, id) Task: Find name from branches where salary exceeds the count of amount from requests for the same status. SQL:
SELECT name FROM branches AS agov WHERE salary > ( SELECT COUNT(amount) FROM requests AS ejof WHERE ejof.status = agov.status );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09637
train
v2
Schema: shipments (alias: vnob)(id, name, type, status) accounts(id, level, salary, name) Task: Retrieve value from shipments that have at least one corresponding entry in accounts sharing the same level. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "accounts", "outer_alias": "vnob", "inner_alias": "jac", "proj_col": "value", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09638
train
v1
Schema: managers (alias: hac)(type, code, level, name) sales(value, level, amount, salary) Task: Retrieve salary from managers whose level is found in sales rows where level matches the outer record. SQL:
SELECT salary FROM managers AS hac WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.level = hac.level );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "salary", "filter_col": "level", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09639
train
v3
Schema: customers (alias: lex)(level, salary, date, name) accounts(value, level, code, type) Task: Find id from customers where salary exceeds the total amount from accounts for the same status. SQL:
SELECT id FROM customers AS lex WHERE salary > ( SELECT SUM(amount) FROM accounts AS jac WHERE jac.status = lex.status );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "lex", "inner_alias": "jac", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09640
train
v3
Schema: employees (alias: bev)(level, name, salary, type) schedules(value, status, type, salary) Task: Find amount from employees where salary exceeds the maximum value from schedules for the same id. SQL:
SELECT amount FROM employees AS bev WHERE salary > ( SELECT MAX(value) FROM schedules AS vmob WHERE vmob.id = bev.id );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09641
train
v2
Schema: categories (alias: egiv)(code, id, value, level) regions(amount, type, value, salary) Task: Retrieve salary from categories that have at least one corresponding entry in regions sharing the same status. SQL:
SELECT salary FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = egiv.status );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "salary", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09642
train
v2
Schema: departments (alias: dov)(code, value, amount, date) invoices(level, status, amount, code) Task: Find amount from departments where a matching record exists in invoices with the same type. SQL:
SELECT amount FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = dov.type );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "amount", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09643
train
v2
Schema: employees (alias: bev)(type, date, value, code) projects(id, status, code, name) Task: Retrieve name from employees that have at least one corresponding entry in projects sharing the same status. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = bev.status );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "name", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09644
train
v3
Schema: accounts (alias: jac)(date, amount, type, level) managers(salary, id, status, value) Task: Retrieve value from accounts with value above the AVG(amount) of managers rows sharing the same code. SQL:
SELECT value FROM accounts AS jac WHERE value > ( SELECT AVG(amount) FROM managers AS hac WHERE hac.code = jac.code );
{ "outer_table": "accounts", "inner_table": "managers", "outer_alias": "jac", "inner_alias": "hac", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09645
train
v1
Schema: items (alias: ikob)(salary, level, type, date) tasks(status, code, name, date) Task: Find id from items where level appears in tasks entries with matching code. SQL:
SELECT id FROM items AS ikob WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.code = ikob.code );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09646
train
v2
Schema: staff (alias: xnob)(amount, id, name, type) branches(id, code, amount, name) Task: Find value from staff where a matching record exists in branches with the same status. SQL:
SELECT value FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = xnob.status );
{ "outer_table": "staff", "inner_table": "branches", "outer_alias": "xnob", "inner_alias": "agov", "proj_col": "value", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09647
train
v3
Schema: departments (alias: dov)(id, status, salary, value) categories(date, id, level, value) Task: Retrieve code from departments with salary above the MIN(value) of categories rows sharing the same id. SQL:
SELECT code FROM departments AS dov WHERE salary > ( SELECT MIN(value) FROM categories AS egiv WHERE egiv.id = dov.id );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dov", "inner_alias": "egiv", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09648
train
v3
Schema: shipments (alias: vnob)(code, value, salary, id) transactions(type, salary, name, status) Task: Retrieve id from shipments with value above the MIN(salary) of transactions rows sharing the same id. SQL:
SELECT id FROM shipments AS vnob WHERE value > ( SELECT MIN(salary) FROM transactions AS gev WHERE gev.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "transactions", "outer_alias": "vnob", "inner_alias": "gev", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09649
train
v3
Schema: staff (alias: xnob)(value, name, amount, date) regions(salary, status, id, code) Task: Retrieve amount from staff with salary above the MAX(value) of regions rows sharing the same code. SQL:
SELECT amount FROM staff AS xnob WHERE salary > ( SELECT MAX(value) FROM regions AS okiv WHERE okiv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09650
train
v2
Schema: projects (alias: uliv)(amount, status, salary, name) employees(amount, value, salary, name) Task: Retrieve amount from projects that have at least one corresponding entry in employees sharing the same type. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.type = uliv.type );
{ "outer_table": "projects", "inner_table": "employees", "outer_alias": "uliv", "inner_alias": "bev", "proj_col": "amount", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09651
train
v2
Schema: sales (alias: cif)(name, id, status, type) projects(code, date, name, status) Task: Find amount from sales where a matching record exists in projects with the same id. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.id = cif.id );
{ "outer_table": "sales", "inner_table": "projects", "outer_alias": "cif", "inner_alias": "uliv", "proj_col": "amount", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09652
train
v1
Schema: categories (alias: egiv)(value, salary, type, amount) transactions(amount, status, name, code) Task: Retrieve value from categories whose status is found in transactions rows where level matches the outer record. SQL:
SELECT value FROM categories AS egiv WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.level = egiv.level );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "egiv", "inner_alias": "gev", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09653
train
v3
Schema: customers (alias: lex)(level, status, value, id) tasks(name, status, type, id) Task: Retrieve salary from customers with amount above the MAX(salary) of tasks rows sharing the same id. SQL:
SELECT salary FROM customers AS lex WHERE amount > ( SELECT MAX(salary) FROM tasks AS znob WHERE znob.id = lex.id );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09654
train
v1
Schema: employees (alias: bev)(date, amount, name, code) items(status, type, date, salary) Task: Select amount from employees where status exists in items for the same status. SQL:
SELECT amount FROM employees AS bev WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.status = bev.status );
{ "outer_table": "employees", "inner_table": "items", "outer_alias": "bev", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09655
train
v2
Schema: departments (alias: dov)(value, status, type, code) managers(type, date, salary, name) Task: Retrieve salary from departments that have at least one corresponding entry in managers sharing the same code. SQL:
SELECT salary FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = dov.code );
{ "outer_table": "departments", "inner_table": "managers", "outer_alias": "dov", "inner_alias": "hac", "proj_col": "salary", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09656
train
v2
Schema: orders (alias: kab)(date, id, code, level) employees(value, salary, level, name) Task: Retrieve name from orders that have at least one corresponding entry in employees sharing the same status. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = kab.status );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "name", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09657
train
v2
Schema: employees (alias: bev)(type, id, status, amount) branches(id, salary, amount, level) Task: Retrieve name from employees that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = bev.code );
{ "outer_table": "employees", "inner_table": "branches", "outer_alias": "bev", "inner_alias": "agov", "proj_col": "name", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09658
train
v1
Schema: categories (alias: egiv)(name, amount, salary, level) accounts(level, salary, id, code) Task: Select id from categories where id exists in accounts for the same status. SQL:
SELECT id FROM categories AS egiv WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.status = egiv.status );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "egiv", "inner_alias": "jac", "proj_col": "id", "filter_col": "id", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09659
train
v2
Schema: requests (alias: ejof)(code, id, name, date) invoices(code, status, id, date) Task: Retrieve amount from requests that have at least one corresponding entry in invoices sharing the same id. SQL:
SELECT amount FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = ejof.id );
{ "outer_table": "requests", "inner_table": "invoices", "outer_alias": "ejof", "inner_alias": "fal", "proj_col": "amount", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09660
train
v3
Schema: orders (alias: kab)(name, type, level, id) schedules(date, value, level, type) Task: Retrieve name from orders with salary above the MAX(value) of schedules rows sharing the same level. SQL:
SELECT name FROM orders AS kab WHERE salary > ( SELECT MAX(value) FROM schedules AS vmob WHERE vmob.level = kab.level );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09661
train
v3
Schema: accounts (alias: jac)(amount, level, date, code) regions(name, salary, status, date) Task: Retrieve id from accounts with salary above the COUNT(value) of regions rows sharing the same type. SQL:
SELECT id FROM accounts AS jac WHERE salary > ( SELECT COUNT(value) FROM regions AS okiv WHERE okiv.type = jac.type );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09662
train
v3
Schema: projects (alias: uliv)(salary, value, id, amount) branches(type, status, value, name) Task: Find code from projects where value exceeds the average amount from branches for the same type. SQL:
SELECT code FROM projects AS uliv WHERE value > ( SELECT AVG(amount) FROM branches AS agov WHERE agov.type = uliv.type );
{ "outer_table": "projects", "inner_table": "branches", "outer_alias": "uliv", "inner_alias": "agov", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09663
train
v1
Schema: orders (alias: kab)(salary, status, value, type) branches(salary, id, value, amount) Task: Retrieve name from orders whose code is found in branches rows where status matches the outer record. SQL:
SELECT name FROM orders AS kab WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.status = kab.status );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09664
train
v2
Schema: departments (alias: dov)(type, amount, status, level) transactions(status, salary, date, amount) Task: Find amount from departments where a matching record exists in transactions with the same type. SQL:
SELECT amount FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = dov.type );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dov", "inner_alias": "gev", "proj_col": "amount", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09665
train
v1
Schema: tasks (alias: znob)(amount, name, id, value) departments(code, value, status, type) Task: Retrieve amount from tasks whose id is found in departments rows where type matches the outer record. SQL:
SELECT amount FROM tasks AS znob WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.type = znob.type );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09666
train
v2
Schema: projects (alias: uliv)(date, salary, name, status) sales(value, amount, code, salary) Task: Retrieve id from projects that have at least one corresponding entry in sales sharing the same level. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = uliv.level );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "id", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09667
train
v1
Schema: categories (alias: egiv)(salary, value, id, amount) managers(status, amount, level, salary) Task: Retrieve code from categories whose code is found in managers rows where status matches the outer record. SQL:
SELECT code FROM categories AS egiv WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.status = egiv.status );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "code", "filter_col": "code", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09668
train
v3
Schema: categories (alias: egiv)(date, amount, code, type) shipments(amount, value, status, salary) Task: Find id from categories where salary exceeds the total value from shipments for the same level. SQL:
SELECT id FROM categories AS egiv WHERE salary > ( SELECT SUM(value) FROM shipments AS vnob WHERE vnob.level = egiv.level );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09669
train
v1
Schema: transactions (alias: gev)(amount, level, code, date) categories(name, salary, id, value) Task: Find salary from transactions where level appears in categories entries with matching status. SQL:
SELECT salary FROM transactions AS gev WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.status = gev.status );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09670
train
v1
Schema: accounts (alias: jac)(status, value, name, type) regions(id, name, date, code) Task: Retrieve value from accounts whose id is found in regions rows where id matches the outer record. SQL:
SELECT value FROM accounts AS jac WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.id = jac.id );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "value", "filter_col": "id", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09671
train
v1
Schema: orders (alias: kab)(type, level, salary, value) items(code, salary, amount, status) Task: Retrieve id from orders whose level is found in items rows where level matches the outer record. SQL:
SELECT id FROM orders AS kab WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.level = kab.level );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "kab", "inner_alias": "ikob", "proj_col": "id", "filter_col": "level", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09672
train
v3
Schema: shipments (alias: vnob)(level, amount, status, value) transactions(level, value, name, code) Task: Find id from shipments where salary exceeds the count of salary from transactions for the same id. SQL:
SELECT id FROM shipments AS vnob WHERE salary > ( SELECT COUNT(salary) FROM transactions AS gev WHERE gev.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "transactions", "outer_alias": "vnob", "inner_alias": "gev", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09673
train
v2
Schema: transactions (alias: gev)(status, code, name, amount) customers(name, value, id, status) Task: Retrieve name from transactions that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = gev.type );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "gev", "inner_alias": "lex", "proj_col": "name", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09674
train
v2
Schema: sales (alias: cif)(value, id, date, name) shipments(code, status, level, date) Task: Retrieve value from sales that have at least one corresponding entry in shipments sharing the same status. SQL:
SELECT value FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.status = cif.status );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "value", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09675
train
v2
Schema: staff (alias: xnob)(salary, name, level, id) customers(level, name, salary, value) Task: Retrieve salary from staff that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT salary FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = xnob.type );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "salary", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09676
train
v2
Schema: customers (alias: lex)(name, value, date, salary) departments(type, level, value, status) Task: Retrieve code from customers that have at least one corresponding entry in departments sharing the same id. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = lex.id );
{ "outer_table": "customers", "inner_table": "departments", "outer_alias": "lex", "inner_alias": "dov", "proj_col": "code", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09677
train
v3
Schema: items (alias: ikob)(value, amount, salary, type) categories(amount, type, value, name) Task: Retrieve id from items with value above the MIN(value) of categories rows sharing the same id. SQL:
SELECT id FROM items AS ikob WHERE value > ( SELECT MIN(value) FROM categories AS egiv WHERE egiv.id = ikob.id );
{ "outer_table": "items", "inner_table": "categories", "outer_alias": "ikob", "inner_alias": "egiv", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09678
train
v1
Schema: items (alias: ikob)(id, status, amount, value) transactions(id, type, value, code) Task: Retrieve amount from items whose code is found in transactions rows where level matches the outer record. SQL:
SELECT amount FROM items AS ikob WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.level = ikob.level );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "ikob", "inner_alias": "gev", "proj_col": "amount", "filter_col": "code", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09679
train
v1
Schema: customers (alias: lex)(code, id, type, salary) categories(amount, salary, id, status) Task: Retrieve amount from customers whose code is found in categories rows where id matches the outer record. SQL:
SELECT amount FROM customers AS lex WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.id = lex.id );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "code", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09680
train
v1
Schema: transactions (alias: gev)(date, type, id, amount) sales(name, code, level, amount) Task: Select name from transactions where status exists in sales for the same id. SQL:
SELECT name FROM transactions AS gev WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.id = gev.id );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09681
train
v3
Schema: requests (alias: ejof)(name, date, code, id) items(type, status, name, id) Task: Find value from requests where value exceeds the maximum salary from items for the same status. SQL:
SELECT value FROM requests AS ejof WHERE value > ( SELECT MAX(salary) FROM items AS ikob WHERE ikob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "items", "outer_alias": "ejof", "inner_alias": "ikob", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09682
train
v1
Schema: orders (alias: kab)(date, id, code, amount) projects(level, salary, status, amount) Task: Find id from orders where code appears in projects entries with matching type. SQL:
SELECT id FROM orders AS kab WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.type = kab.type );
{ "outer_table": "orders", "inner_table": "projects", "outer_alias": "kab", "inner_alias": "uliv", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09683
train
v2
Schema: orders (alias: kab)(id, value, type, salary) accounts(status, type, value, salary) Task: Retrieve amount from orders that have at least one corresponding entry in accounts sharing the same status. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = kab.status );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "kab", "inner_alias": "jac", "proj_col": "amount", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09684
train
v2
Schema: invoices (alias: fal)(level, code, name, id) accounts(value, amount, id, date) Task: Retrieve code from invoices that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT code FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = fal.code );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "code", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09685
train
v1
Schema: departments (alias: dov)(type, date, code, salary) requests(salary, name, status, level) Task: Find name from departments where id appears in requests entries with matching type. SQL:
SELECT name FROM departments AS dov WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.type = dov.type );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "name", "filter_col": "id", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09686
train
v2
Schema: departments (alias: dov)(type, salary, level, amount) tasks(value, date, level, status) Task: Find id from departments where a matching record exists in tasks with the same level. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.level = dov.level );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dov", "inner_alias": "znob", "proj_col": "id", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09687
train
v3
Schema: managers (alias: hac)(date, amount, type, value) schedules(code, amount, date, id) Task: Find id from managers where salary exceeds the average value from schedules for the same code. SQL:
SELECT id FROM managers AS hac WHERE salary > ( SELECT AVG(value) FROM schedules AS vmob WHERE vmob.code = hac.code );
{ "outer_table": "managers", "inner_table": "schedules", "outer_alias": "hac", "inner_alias": "vmob", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09688
train
v1
Schema: shipments (alias: vnob)(level, id, date, type) items(level, amount, date, status) Task: Find code from shipments where type appears in items entries with matching status. SQL:
SELECT code FROM shipments AS vnob WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "items", "outer_alias": "vnob", "inner_alias": "ikob", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09689
train
v1
Schema: requests (alias: ejof)(id, date, value, level) orders(type, date, value, level) Task: Select amount from requests where type exists in orders for the same status. SQL:
SELECT amount FROM requests AS ejof WHERE type IN ( SELECT type FROM orders AS kab WHERE kab.status = ejof.status );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "amount", "filter_col": "type", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09690
train
v3
Schema: sales (alias: cif)(date, name, salary, status) customers(type, date, id, value) Task: Find code from sales where salary exceeds the count of salary from customers for the same code. SQL:
SELECT code FROM sales AS cif WHERE salary > ( SELECT COUNT(salary) FROM customers AS lex WHERE lex.code = cif.code );
{ "outer_table": "sales", "inner_table": "customers", "outer_alias": "cif", "inner_alias": "lex", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09691
train
v3
Schema: shipments (alias: vnob)(id, status, salary, type) staff(id, amount, code, name) Task: Retrieve id from shipments with salary above the MIN(value) of staff rows sharing the same id. SQL:
SELECT id FROM shipments AS vnob WHERE salary > ( SELECT MIN(value) FROM staff AS xnob WHERE xnob.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09692
train
v2
Schema: customers (alias: lex)(date, value, salary, id) items(id, amount, value, level) Task: Retrieve id from customers that have at least one corresponding entry in items sharing the same status. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = lex.status );
{ "outer_table": "customers", "inner_table": "items", "outer_alias": "lex", "inner_alias": "ikob", "proj_col": "id", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09693
train
v2
Schema: branches (alias: agov)(id, value, code, amount) products(status, type, id, level) Task: Find salary from branches where a matching record exists in products with the same level. SQL:
SELECT salary FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = agov.level );
{ "outer_table": "branches", "inner_table": "products", "outer_alias": "agov", "inner_alias": "nad", "proj_col": "salary", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09694
train
v3
Schema: transactions (alias: gev)(status, amount, value, date) customers(level, salary, type, name) Task: Find id from transactions where amount exceeds the minimum amount from customers for the same type. SQL:
SELECT id FROM transactions AS gev WHERE amount > ( SELECT MIN(amount) FROM customers AS lex WHERE lex.type = gev.type );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "gev", "inner_alias": "lex", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09695
train
v1
Schema: items (alias: ikob)(name, code, salary, type) projects(level, code, status, name) Task: Select salary from items where status exists in projects for the same code. SQL:
SELECT salary FROM items AS ikob WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.code = ikob.code );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "status", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09696
train
v2
Schema: staff (alias: xnob)(type, id, code, value) requests(type, date, level, name) Task: Find id from staff where a matching record exists in requests with the same status. SQL:
SELECT id FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = xnob.status );
{ "outer_table": "staff", "inner_table": "requests", "outer_alias": "xnob", "inner_alias": "ejof", "proj_col": "id", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09697
train
v1
Schema: categories (alias: egiv)(type, level, code, date) managers(salary, status, id, date) Task: Retrieve value from categories whose level is found in managers rows where id matches the outer record. SQL:
SELECT value FROM categories AS egiv WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.id = egiv.id );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "value", "filter_col": "level", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09698
train
v3
Schema: schedules (alias: vmob)(salary, id, date, status) accounts(type, level, name, salary) Task: Retrieve name from schedules with salary above the AVG(amount) of accounts rows sharing the same code. SQL:
SELECT name FROM schedules AS vmob WHERE salary > ( SELECT AVG(amount) FROM accounts AS jac WHERE jac.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "accounts", "outer_alias": "vmob", "inner_alias": "jac", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09699
train