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
v1
Schema: sales (alias: cif)(type, level, date, name) products(name, code, value, level) Task: Retrieve value from sales whose id is found in products rows where type matches the outer record. SQL:
SELECT value FROM sales AS cif WHERE id IN ( SELECT id FROM products AS nad WHERE nad.type = cif.type );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09000
train
v1
Schema: staff (alias: xnob)(id, code, salary, value) projects(level, amount, value, name) Task: Find code from staff where code appears in projects entries with matching status. SQL:
SELECT code FROM staff AS xnob WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.status = xnob.status );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "xnob", "inner_alias": "uliv", "proj_col": "code", "filter_col": "code", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09001
train
v2
Schema: sales (alias: cif)(name, status, amount, value) orders(id, date, name, status) Task: Retrieve id from sales that have at least one corresponding entry in orders sharing the same level. SQL:
SELECT id FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = cif.level );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "id", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09002
train
v3
Schema: requests (alias: ejof)(code, status, amount, value) tasks(name, date, value, status) Task: Find amount from requests where amount exceeds the total salary from tasks for the same code. SQL:
SELECT amount FROM requests AS ejof WHERE amount > ( SELECT SUM(salary) FROM tasks AS znob WHERE znob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09003
train
v1
Schema: requests (alias: ejof)(id, code, date, name) transactions(type, name, id, value) Task: Select name from requests where type exists in transactions for the same code. SQL:
SELECT name FROM requests AS ejof WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.code = ejof.code );
{ "outer_table": "requests", "inner_table": "transactions", "outer_alias": "ejof", "inner_alias": "gev", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09004
train
v3
Schema: customers (alias: lex)(name, type, level, amount) accounts(status, date, level, type) Task: Find salary from customers where amount exceeds the maximum amount from accounts for the same id. SQL:
SELECT salary FROM customers AS lex WHERE amount > ( SELECT MAX(amount) FROM accounts AS jac WHERE jac.id = lex.id );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "lex", "inner_alias": "jac", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09005
train
v2
Schema: schedules (alias: vmob)(code, type, date, name) transactions(date, level, amount, value) Task: Find code from schedules where a matching record exists in transactions with the same code. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "transactions", "outer_alias": "vmob", "inner_alias": "gev", "proj_col": "code", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09006
train
v3
Schema: transactions (alias: gev)(name, amount, status, type) items(name, type, salary, date) Task: Find name from transactions where amount exceeds the average amount from items for the same id. SQL:
SELECT name FROM transactions AS gev WHERE amount > ( SELECT AVG(amount) FROM items AS ikob WHERE ikob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "gev", "inner_alias": "ikob", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09007
train
v3
Schema: employees (alias: bev)(level, date, type, name) tasks(name, level, status, type) Task: Find id from employees where value exceeds the total value from tasks for the same type. SQL:
SELECT id FROM employees AS bev WHERE value > ( SELECT SUM(value) FROM tasks AS znob WHERE znob.type = bev.type );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09008
train
v2
Schema: categories (alias: egiv)(value, id, status, salary) regions(status, amount, id, salary) Task: Retrieve value from categories that have at least one corresponding entry in regions sharing the same code. SQL:
SELECT value 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": "value", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09009
train
v2
Schema: managers (alias: hac)(level, amount, value, status) departments(value, code, date, type) Task: Retrieve id from managers that have at least one corresponding entry in departments sharing the same status. SQL:
SELECT id FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = hac.status );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "id", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09010
train
v1
Schema: branches (alias: agov)(salary, type, status, date) categories(value, name, status, salary) Task: Select id from branches where status exists in categories for the same status. SQL:
SELECT id FROM branches AS agov WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.status = agov.status );
{ "outer_table": "branches", "inner_table": "categories", "outer_alias": "agov", "inner_alias": "egiv", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09011
train
v1
Schema: requests (alias: ejof)(date, value, level, amount) tasks(code, type, date, amount) Task: Select salary from requests where code exists in tasks for the same id. SQL:
SELECT salary FROM requests AS ejof WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09012
train
v1
Schema: schedules (alias: vmob)(date, type, amount, value) projects(amount, type, id, salary) Task: Select salary from schedules where type exists in projects for the same type. SQL:
SELECT salary FROM schedules AS vmob WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09013
train
v1
Schema: invoices (alias: fal)(type, code, status, amount) staff(id, status, type, code) Task: Retrieve amount from invoices whose status is found in staff rows where type matches the outer record. SQL:
SELECT amount FROM invoices AS fal WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09014
train
v3
Schema: employees (alias: bev)(amount, status, value, level) staff(status, salary, level, amount) Task: Find value from employees where value exceeds the count of amount from staff for the same id. SQL:
SELECT value FROM employees AS bev WHERE value > ( SELECT COUNT(amount) FROM staff AS xnob WHERE xnob.id = bev.id );
{ "outer_table": "employees", "inner_table": "staff", "outer_alias": "bev", "inner_alias": "xnob", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09015
train
v1
Schema: shipments (alias: vnob)(type, level, value, salary) schedules(salary, date, value, type) Task: Select salary from shipments where type exists in schedules for the same type. SQL:
SELECT salary FROM shipments AS vnob WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09016
train
v1
Schema: orders (alias: kab)(value, name, date, id) staff(name, type, status, code) Task: Find code from orders where type appears in staff entries with matching id. SQL:
SELECT code FROM orders AS kab WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.id = kab.id );
{ "outer_table": "orders", "inner_table": "staff", "outer_alias": "kab", "inner_alias": "xnob", "proj_col": "code", "filter_col": "type", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09017
train
v2
Schema: shipments (alias: vnob)(salary, code, value, amount) regions(date, value, salary, name) Task: Retrieve salary from shipments that have at least one corresponding entry in regions sharing the same code. SQL:
SELECT salary FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "salary", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09018
train
v1
Schema: regions (alias: okiv)(value, amount, type, level) branches(date, type, status, level) Task: Retrieve name from regions whose type is found in branches rows where type matches the outer record. SQL:
SELECT name FROM regions AS okiv WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.type = okiv.type );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "okiv", "inner_alias": "agov", "proj_col": "name", "filter_col": "type", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_09019
train
v2
Schema: schedules (alias: vmob)(salary, date, status, amount) orders(code, type, date, value) Task: Find amount from schedules where a matching record exists in orders with the same level. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "orders", "outer_alias": "vmob", "inner_alias": "kab", "proj_col": "amount", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09020
train
v1
Schema: products (alias: nad)(type, value, id, status) categories(level, type, amount, name) Task: Find value from products where type appears in categories entries with matching code. SQL:
SELECT value FROM products AS nad WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.code = nad.code );
{ "outer_table": "products", "inner_table": "categories", "outer_alias": "nad", "inner_alias": "egiv", "proj_col": "value", "filter_col": "type", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09021
train
v1
Schema: invoices (alias: fal)(value, code, id, status) items(value, amount, level, status) Task: Select id from invoices where type exists in items for the same level. SQL:
SELECT id FROM invoices AS fal WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.level = fal.level );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "fal", "inner_alias": "ikob", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09022
train
v1
Schema: invoices (alias: fal)(id, name, type, code) products(code, id, salary, status) Task: Find value from invoices where level appears in products entries with matching type. SQL:
SELECT value FROM invoices AS fal WHERE level IN ( SELECT level FROM products AS nad WHERE nad.type = fal.type );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "value", "filter_col": "level", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09023
train
v1
Schema: departments (alias: dov)(value, amount, date, code) categories(salary, status, date, code) Task: Select code from departments where status exists in categories for the same level. SQL:
SELECT code FROM departments AS dov WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.level = dov.level );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dov", "inner_alias": "egiv", "proj_col": "code", "filter_col": "status", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09024
train
v2
Schema: departments (alias: dov)(date, code, value, status) customers(type, code, status, id) Task: Find name from departments where a matching record exists in customers with the same level. SQL:
SELECT name FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = dov.level );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "name", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09025
train
v2
Schema: branches (alias: agov)(date, code, amount, id) invoices(id, value, level, date) Task: Find value from branches where a matching record exists in invoices with the same id. SQL:
SELECT value FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = agov.id );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "value", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09026
train
v1
Schema: shipments (alias: vnob)(id, name, amount, salary) products(level, code, name, salary) Task: Retrieve value from shipments whose code is found in products rows where id matches the outer record. SQL:
SELECT value FROM shipments AS vnob WHERE code IN ( SELECT code FROM products AS nad WHERE nad.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "value", "filter_col": "code", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09027
train
v3
Schema: branches (alias: agov)(value, level, amount, id) items(status, name, code, value) Task: Retrieve amount from branches with salary above the COUNT(value) of items rows sharing the same type. SQL:
SELECT amount FROM branches AS agov WHERE salary > ( SELECT COUNT(value) FROM items AS ikob WHERE ikob.type = agov.type );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09028
train
v3
Schema: customers (alias: lex)(amount, code, level, value) orders(level, amount, value, code) Task: Retrieve id from customers with amount above the AVG(salary) of orders rows sharing the same status. SQL:
SELECT id FROM customers AS lex WHERE amount > ( SELECT AVG(salary) FROM orders AS kab WHERE kab.status = lex.status );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "lex", "inner_alias": "kab", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09029
train
v3
Schema: departments (alias: dov)(code, status, salary, name) tasks(level, id, type, date) Task: Retrieve amount from departments with salary above the SUM(amount) of tasks rows sharing the same level. SQL:
SELECT amount FROM departments AS dov WHERE salary > ( SELECT SUM(amount) FROM tasks AS znob WHERE znob.level = dov.level );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dov", "inner_alias": "znob", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09030
train
v2
Schema: accounts (alias: jac)(status, id, salary, code) sales(date, type, value, name) Task: Retrieve salary from accounts that have at least one corresponding entry in sales sharing the same code. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = jac.code );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "salary", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09031
train
v2
Schema: branches (alias: agov)(date, status, code, amount) staff(level, name, status, type) Task: Find id from branches where a matching record exists in staff with the same status. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = agov.status );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "id", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09032
train
v1
Schema: transactions (alias: gev)(amount, status, code, value) products(date, salary, id, value) Task: Retrieve id from transactions whose id is found in products rows where level matches the outer record. SQL:
SELECT id FROM transactions AS gev WHERE id IN ( SELECT id FROM products AS nad WHERE nad.level = gev.level );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "id", "filter_col": "id", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09033
train
v2
Schema: schedules (alias: vmob)(amount, salary, value, level) employees(value, name, type, amount) Task: Find code from schedules where a matching record exists in employees with the same id. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "vmob", "inner_alias": "bev", "proj_col": "code", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09034
train
v1
Schema: managers (alias: hac)(id, status, salary, name) invoices(code, status, salary, amount) Task: Retrieve code from managers whose type is found in invoices rows where level matches the outer record. SQL:
SELECT code FROM managers AS hac WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.level = hac.level );
{ "outer_table": "managers", "inner_table": "invoices", "outer_alias": "hac", "inner_alias": "fal", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09035
train
v2
Schema: invoices (alias: fal)(amount, value, status, id) requests(amount, value, salary, status) Task: Find name from invoices where a matching record exists in requests with the same code. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = fal.code );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "name", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09036
train
v2
Schema: items (alias: ikob)(name, amount, date, salary) employees(type, value, id, code) Task: Find salary from items where a matching record exists in employees with the same level. SQL:
SELECT salary FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = ikob.level );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "salary", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09037
train
v2
Schema: categories (alias: egiv)(code, date, status, amount) accounts(name, date, id, code) Task: Find name from categories where a matching record exists in accounts with the same level. SQL:
SELECT name FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = egiv.level );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "egiv", "inner_alias": "jac", "proj_col": "name", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09038
train
v2
Schema: requests (alias: ejof)(id, status, level, date) tasks(code, id, amount, name) Task: Retrieve id from requests that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "id", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09039
train
v1
Schema: requests (alias: ejof)(value, status, id, level) products(status, name, id, salary) Task: Retrieve value from requests whose type is found in products rows where type matches the outer record. SQL:
SELECT value FROM requests AS ejof WHERE type IN ( SELECT type FROM products AS nad WHERE nad.type = ejof.type );
{ "outer_table": "requests", "inner_table": "products", "outer_alias": "ejof", "inner_alias": "nad", "proj_col": "value", "filter_col": "type", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09040
train
v2
Schema: employees (alias: bev)(id, code, level, amount) schedules(level, id, code, value) Task: Retrieve name from employees that have at least one corresponding entry in schedules sharing the same status. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = bev.status );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "name", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09041
train
v3
Schema: staff (alias: xnob)(code, date, amount, salary) sales(value, salary, date, status) Task: Find name from staff where amount exceeds the count of value from sales for the same type. SQL:
SELECT name FROM staff AS xnob WHERE amount > ( SELECT COUNT(value) FROM sales AS cif WHERE cif.type = xnob.type );
{ "outer_table": "staff", "inner_table": "sales", "outer_alias": "xnob", "inner_alias": "cif", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09042
train
v3
Schema: items (alias: ikob)(id, amount, date, salary) employees(value, type, date, salary) Task: Find salary from items where value exceeds the average value from employees for the same id. SQL:
SELECT salary FROM items AS ikob WHERE value > ( SELECT AVG(value) FROM employees AS bev WHERE bev.id = ikob.id );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09043
train
v1
Schema: invoices (alias: fal)(date, name, value, level) transactions(level, id, type, date) Task: Find id from invoices where level appears in transactions entries with matching status. SQL:
SELECT id FROM invoices AS fal WHERE level IN ( SELECT level FROM transactions AS gev WHERE gev.status = fal.status );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "id", "filter_col": "level", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09044
train
v1
Schema: items (alias: ikob)(type, level, date, name) regions(salary, id, type, amount) Task: Select code from items where code exists in regions for the same code. SQL:
SELECT code FROM items AS ikob WHERE code IN ( SELECT code FROM regions AS okiv WHERE okiv.code = ikob.code );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_09045
train
v2
Schema: invoices (alias: fal)(type, salary, name, code) shipments(type, id, date, salary) Task: Find salary from invoices where a matching record exists in shipments with the same level. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.level = fal.level );
{ "outer_table": "invoices", "inner_table": "shipments", "outer_alias": "fal", "inner_alias": "vnob", "proj_col": "salary", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09046
train
v1
Schema: invoices (alias: fal)(status, date, id, name) managers(value, salary, status, level) Task: Select code from invoices where type exists in managers for the same level. SQL:
SELECT code FROM invoices AS fal WHERE type IN ( SELECT type 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": "type", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09047
train
v1
Schema: requests (alias: ejof)(amount, code, date, salary) items(name, salary, id, value) Task: Find name from requests where type appears in items entries with matching code. SQL:
SELECT name FROM requests AS ejof WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "items", "outer_alias": "ejof", "inner_alias": "ikob", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09048
train
v3
Schema: managers (alias: hac)(name, status, type, code) orders(status, date, value, salary) Task: Retrieve amount from managers with salary above the MIN(amount) of orders rows sharing the same id. SQL:
SELECT amount FROM managers AS hac WHERE salary > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.id = hac.id );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09049
train
v3
Schema: departments (alias: dov)(level, salary, type, status) schedules(amount, name, id, value) Task: Retrieve name from departments with amount above the COUNT(salary) of schedules rows sharing the same type. SQL:
SELECT name FROM departments AS dov WHERE amount > ( SELECT COUNT(salary) FROM schedules AS vmob WHERE vmob.type = dov.type );
{ "outer_table": "departments", "inner_table": "schedules", "outer_alias": "dov", "inner_alias": "vmob", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09050
train
v2
Schema: transactions (alias: gev)(type, salary, level, amount) managers(status, value, level, type) Task: Find name from transactions where a matching record exists in managers with the same level. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = gev.level );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "gev", "inner_alias": "hac", "proj_col": "name", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09051
train
v3
Schema: invoices (alias: fal)(type, code, id, amount) managers(date, type, level, id) Task: Retrieve salary from invoices with amount above the AVG(value) of managers rows sharing the same status. SQL:
SELECT salary FROM invoices AS fal WHERE amount > ( SELECT AVG(value) FROM managers AS hac WHERE hac.status = fal.status );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09052
train
v3
Schema: departments (alias: dov)(code, value, level, amount) customers(date, level, status, code) Task: Retrieve code from departments with amount above the MAX(amount) of customers rows sharing the same status. SQL:
SELECT code FROM departments AS dov WHERE amount > ( SELECT MAX(amount) FROM customers AS lex WHERE lex.status = dov.status );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09053
train
v2
Schema: branches (alias: agov)(type, amount, level, name) products(code, value, type, name) Task: Find amount from branches where a matching record exists in products with the same level. SQL:
SELECT amount 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": "amount", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09054
train
v2
Schema: invoices (alias: fal)(type, salary, code, id) departments(amount, name, date, status) Task: Find salary from invoices where a matching record exists in departments with the same code. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = fal.code );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "salary", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09055
train
v3
Schema: projects (alias: uliv)(id, type, salary, level) requests(date, level, amount, value) Task: Retrieve value from projects with salary above the COUNT(salary) of requests rows sharing the same code. SQL:
SELECT value FROM projects AS uliv WHERE salary > ( SELECT COUNT(salary) FROM requests AS ejof WHERE ejof.code = uliv.code );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09056
train
v3
Schema: branches (alias: agov)(name, id, type, status) departments(status, code, id, value) Task: Retrieve value from branches with amount above the MIN(salary) of departments rows sharing the same code. SQL:
SELECT value FROM branches AS agov WHERE amount > ( SELECT MIN(salary) FROM departments AS dov WHERE dov.code = agov.code );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09057
train
v3
Schema: shipments (alias: vnob)(salary, type, status, value) staff(code, value, level, type) Task: Find id from shipments where amount exceeds the count of salary from staff for the same code. SQL:
SELECT id FROM shipments AS vnob WHERE amount > ( SELECT COUNT(salary) FROM staff AS xnob WHERE xnob.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_09058
train
v1
Schema: accounts (alias: jac)(status, level, amount, type) invoices(amount, value, id, date) Task: Retrieve name from accounts whose status is found in invoices rows where type matches the outer record. SQL:
SELECT name FROM accounts AS jac WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.type = jac.type );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09059
train
v1
Schema: projects (alias: uliv)(date, id, amount, status) transactions(type, code, name, date) Task: Find amount from projects where status appears in transactions entries with matching id. SQL:
SELECT amount FROM projects AS uliv WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.id = uliv.id );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09060
train
v2
Schema: orders (alias: kab)(date, id, status, salary) managers(date, amount, salary, value) Task: Retrieve amount from orders that have at least one corresponding entry in managers sharing the same level. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = kab.level );
{ "outer_table": "orders", "inner_table": "managers", "outer_alias": "kab", "inner_alias": "hac", "proj_col": "amount", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09061
train
v1
Schema: projects (alias: uliv)(salary, type, amount, value) accounts(id, level, value, status) Task: Find amount from projects where code appears in accounts entries with matching type. SQL:
SELECT amount FROM projects AS uliv WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.type = uliv.type );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09062
train
v1
Schema: schedules (alias: vmob)(value, date, salary, status) departments(id, salary, type, name) Task: Find code from schedules where id appears in departments entries with matching id. SQL:
SELECT code FROM schedules AS vmob WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "vmob", "inner_alias": "dov", "proj_col": "code", "filter_col": "id", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09063
train
v3
Schema: sales (alias: cif)(amount, level, type, status) departments(type, status, name, code) Task: Find id from sales where value exceeds the total amount from departments for the same type. SQL:
SELECT id FROM sales AS cif WHERE value > ( SELECT SUM(amount) FROM departments AS dov WHERE dov.type = cif.type );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09064
train
v2
Schema: employees (alias: bev)(id, value, amount, status) orders(type, date, code, salary) Task: Retrieve name from employees that have at least one corresponding entry in orders sharing the same status. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = bev.status );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "name", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09065
train
v1
Schema: accounts (alias: jac)(type, value, id, date) customers(code, type, level, amount) Task: Retrieve value from accounts whose level is found in customers rows where type matches the outer record. SQL:
SELECT value FROM accounts AS jac WHERE level IN ( SELECT level FROM customers AS lex WHERE lex.type = jac.type );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "value", "filter_col": "level", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09066
train
v1
Schema: sales (alias: cif)(salary, status, level, name) tasks(date, id, status, salary) Task: Find id from sales where status appears in tasks entries with matching id. SQL:
SELECT id FROM sales AS cif WHERE status IN ( SELECT status FROM tasks AS znob WHERE znob.id = cif.id );
{ "outer_table": "sales", "inner_table": "tasks", "outer_alias": "cif", "inner_alias": "znob", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09067
train
v1
Schema: projects (alias: uliv)(name, id, salary, level) schedules(level, date, status, salary) Task: Find code from projects where type appears in schedules entries with matching code. SQL:
SELECT code FROM projects AS uliv WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09068
train
v3
Schema: staff (alias: xnob)(name, value, salary, id) customers(id, salary, name, type) Task: Find salary from staff where amount exceeds the total value from customers for the same level. SQL:
SELECT salary FROM staff AS xnob WHERE amount > ( SELECT SUM(value) FROM customers AS lex WHERE lex.level = xnob.level );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09069
train
v1
Schema: employees (alias: bev)(value, amount, salary, name) schedules(date, name, level, salary) Task: Retrieve amount from employees whose code is found in schedules rows where type matches the outer record. SQL:
SELECT amount FROM employees AS bev WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.type = bev.type );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09070
train
v1
Schema: requests (alias: ejof)(name, date, status, code) orders(type, salary, status, code) Task: Retrieve salary from requests whose level is found in orders rows where id matches the outer record. SQL:
SELECT salary FROM requests AS ejof WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.id = ejof.id );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09071
train
v3
Schema: accounts (alias: jac)(amount, type, value, date) invoices(value, date, code, level) Task: Retrieve name from accounts with amount above the MIN(value) of invoices rows sharing the same type. SQL:
SELECT name FROM accounts AS jac WHERE amount > ( SELECT MIN(value) FROM invoices AS fal WHERE fal.type = jac.type );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09072
train
v2
Schema: invoices (alias: fal)(salary, name, date, level) shipments(code, id, level, date) Task: Retrieve amount from invoices that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT amount FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = fal.code );
{ "outer_table": "invoices", "inner_table": "shipments", "outer_alias": "fal", "inner_alias": "vnob", "proj_col": "amount", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09073
train
v2
Schema: accounts (alias: jac)(status, value, amount, id) invoices(amount, status, value, name) Task: Find salary from accounts where a matching record exists in invoices with the same id. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = jac.id );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "salary", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09074
train
v3
Schema: schedules (alias: vmob)(value, id, salary, date) projects(id, code, level, amount) Task: Find salary from schedules where salary exceeds the minimum value from projects for the same id. SQL:
SELECT salary FROM schedules AS vmob WHERE salary > ( SELECT MIN(value) FROM projects AS uliv WHERE uliv.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_09075
train
v1
Schema: customers (alias: lex)(amount, date, value, id) accounts(value, id, salary, amount) Task: Find name from customers where code appears in accounts entries with matching status. SQL:
SELECT name FROM customers AS lex WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.status = lex.status );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "lex", "inner_alias": "jac", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09076
train
v2
Schema: categories (alias: egiv)(date, type, code, name) regions(amount, date, id, name) Task: Retrieve name from categories that have at least one corresponding entry in regions sharing the same type. SQL:
SELECT name FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = egiv.type );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "name", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09077
train
v3
Schema: projects (alias: uliv)(value, code, id, name) tasks(status, amount, level, value) Task: Retrieve amount from projects with salary above the MAX(amount) of tasks rows sharing the same type. SQL:
SELECT amount FROM projects AS uliv WHERE salary > ( SELECT MAX(amount) FROM tasks AS znob WHERE znob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "uliv", "inner_alias": "znob", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09078
train
v3
Schema: orders (alias: kab)(level, date, code, status) regions(id, type, salary, date) Task: Retrieve id from orders with amount above the AVG(value) of regions rows sharing the same id. SQL:
SELECT id FROM orders AS kab WHERE amount > ( SELECT AVG(value) FROM regions AS okiv WHERE okiv.id = kab.id );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "kab", "inner_alias": "okiv", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09079
train
v3
Schema: invoices (alias: fal)(code, value, level, name) customers(name, salary, amount, id) Task: Retrieve code from invoices with value above the AVG(salary) of customers rows sharing the same id. SQL:
SELECT code FROM invoices AS fal WHERE value > ( SELECT AVG(salary) FROM customers AS lex WHERE lex.id = fal.id );
{ "outer_table": "invoices", "inner_table": "customers", "outer_alias": "fal", "inner_alias": "lex", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09080
train
v3
Schema: invoices (alias: fal)(salary, date, status, code) requests(type, value, salary, status) Task: Find value from invoices where salary exceeds the minimum value from requests for the same type. SQL:
SELECT value FROM invoices AS fal WHERE salary > ( SELECT MIN(value) FROM requests AS ejof WHERE ejof.type = fal.type );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09081
train
v3
Schema: categories (alias: egiv)(code, id, status, amount) accounts(salary, name, type, level) Task: Find code from categories where salary exceeds the average value from accounts for the same status. SQL:
SELECT code FROM categories AS egiv WHERE salary > ( SELECT AVG(value) FROM accounts AS jac WHERE jac.status = egiv.status );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "egiv", "inner_alias": "jac", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_09082
train
v1
Schema: requests (alias: ejof)(type, salary, date, status) sales(type, level, salary, amount) Task: Find salary from requests where status appears in sales entries with matching code. SQL:
SELECT salary FROM requests AS ejof WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.code = ejof.code );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "salary", "filter_col": "status", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09083
train
v1
Schema: requests (alias: ejof)(level, id, amount, date) orders(status, code, id, name) Task: Find name from requests where status appears in orders entries with matching code. SQL:
SELECT name FROM requests AS ejof WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.code = ejof.code );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09084
train
v3
Schema: tasks (alias: znob)(salary, amount, type, name) shipments(status, type, id, level) Task: Retrieve amount from tasks with value above the MAX(value) of shipments rows sharing the same type. SQL:
SELECT amount FROM tasks AS znob WHERE value > ( SELECT MAX(value) FROM shipments AS vnob WHERE vnob.type = znob.type );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_09085
train
v2
Schema: branches (alias: agov)(level, status, type, date) requests(code, level, value, salary) Task: Retrieve salary from branches that have at least one corresponding entry in requests sharing the same status. SQL:
SELECT salary FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = agov.status );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "salary", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09086
train
v3
Schema: staff (alias: xnob)(type, status, salary, value) transactions(salary, amount, code, status) Task: Find id from staff where value exceeds the average amount from transactions for the same id. SQL:
SELECT id FROM staff AS xnob WHERE value > ( SELECT AVG(amount) FROM transactions AS gev WHERE gev.id = xnob.id );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "xnob", "inner_alias": "gev", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09087
train
v3
Schema: departments (alias: dov)(level, id, code, status) shipments(value, type, id, level) Task: Retrieve code from departments with salary above the COUNT(value) of shipments rows sharing the same status. SQL:
SELECT code FROM departments AS dov WHERE salary > ( SELECT COUNT(value) FROM shipments AS vnob WHERE vnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09088
train
v3
Schema: staff (alias: xnob)(date, name, status, value) managers(type, value, status, amount) Task: Find name from staff where salary exceeds the average amount from managers for the same id. SQL:
SELECT name FROM staff AS xnob WHERE salary > ( SELECT AVG(amount) FROM managers AS hac WHERE hac.id = xnob.id );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "xnob", "inner_alias": "hac", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09089
train
v1
Schema: projects (alias: uliv)(code, amount, value, date) requests(salary, amount, name, date) Task: Select code from projects where type exists in requests for the same status. SQL:
SELECT code FROM projects AS uliv WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.status = uliv.status );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09090
train
v1
Schema: managers (alias: hac)(level, code, amount, id) categories(type, code, level, date) Task: Retrieve salary from managers whose id is found in categories rows where status matches the outer record. SQL:
SELECT salary FROM managers AS hac WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.status = hac.status );
{ "outer_table": "managers", "inner_table": "categories", "outer_alias": "hac", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09091
train
v3
Schema: projects (alias: uliv)(type, date, id, amount) staff(code, level, name, amount) Task: Find name from projects where salary exceeds the count of value from staff for the same type. SQL:
SELECT name FROM projects AS uliv WHERE salary > ( SELECT COUNT(value) FROM staff AS xnob WHERE xnob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_09092
train
v2
Schema: staff (alias: xnob)(code, amount, date, type) transactions(status, id, amount, code) Task: Retrieve code from staff that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = xnob.code );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "xnob", "inner_alias": "gev", "proj_col": "code", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_09093
train
v3
Schema: orders (alias: kab)(type, level, code, id) shipments(amount, code, level, id) Task: Find id from orders where amount exceeds the average salary from shipments for the same type. SQL:
SELECT id FROM orders AS kab WHERE amount > ( SELECT AVG(salary) FROM shipments AS vnob WHERE vnob.type = kab.type );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09094
train
v3
Schema: requests (alias: ejof)(value, status, name, amount) projects(id, salary, date, status) Task: Find id from requests where salary exceeds the average value from projects for the same type. SQL:
SELECT id FROM requests AS ejof WHERE salary > ( SELECT AVG(value) FROM projects AS uliv WHERE uliv.type = ejof.type );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_09095
train
v2
Schema: branches (alias: agov)(type, value, code, salary) items(name, amount, date, salary) Task: Find value from branches where a matching record exists in items with the same type. SQL:
SELECT value FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = agov.type );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "value", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_09096
train
v3
Schema: managers (alias: hac)(code, status, level, type) sales(type, name, amount, date) Task: Find amount from managers where amount exceeds the minimum value from sales for the same id. SQL:
SELECT amount FROM managers AS hac WHERE amount > ( SELECT MIN(value) FROM sales AS cif WHERE cif.id = hac.id );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09097
train
v1
Schema: sales (alias: cif)(code, date, type, name) transactions(salary, date, amount, status) Task: Select name from sales where code exists in transactions for the same level. SQL:
SELECT name FROM sales AS cif WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.level = cif.level );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "name", "filter_col": "code", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09098
train
v2
Schema: invoices (alias: fal)(level, date, type, code) accounts(level, salary, id, code) Task: Retrieve id from invoices that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT id 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": "id", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_09099
train