variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v3
Schema: managers (alias: hac)(date, type, code, amount) orders(value, type, id, code) Task: Find id from managers where value exceeds the average salary from orders for the same status. SQL:
SELECT id FROM managers AS hac WHERE value > ( SELECT AVG(salary) FROM orders AS kab WHERE kab.status = hac.status );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01000
train
v1
Schema: employees (alias: bev)(type, status, id, level) schedules(name, amount, level, code) Task: Select value from employees where id exists in schedules for the same status. SQL:
SELECT value FROM employees AS bev WHERE id IN ( SELECT id FROM schedules AS vmob WHERE vmob.status = bev.status );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "value", "filter_col": "id", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01001
train
v1
Schema: accounts (alias: jac)(value, date, amount, status) categories(id, level, code, date) Task: Retrieve salary from accounts whose level is found in categories rows where code matches the outer record. SQL:
SELECT salary FROM accounts AS jac WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.code = jac.code );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "jac", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "level", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01002
train
v2
Schema: staff (alias: xnob)(value, type, status, name) invoices(type, status, amount, salary) Task: Retrieve id from staff that have at least one corresponding entry in invoices sharing the same code. SQL:
SELECT id FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = xnob.code );
{ "outer_table": "staff", "inner_table": "invoices", "outer_alias": "xnob", "inner_alias": "fal", "proj_col": "id", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_01003
train
v3
Schema: schedules (alias: vmob)(value, type, salary, status) employees(amount, value, name, id) Task: Retrieve code from schedules with value above the SUM(salary) of employees rows sharing the same level. SQL:
SELECT code FROM schedules AS vmob WHERE value > ( SELECT SUM(salary) FROM employees AS bev WHERE bev.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "vmob", "inner_alias": "bev", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01004
train
v1
Schema: sales (alias: cif)(date, status, id, code) categories(value, id, code, level) Task: Select id from sales where type exists in categories for the same code. SQL:
SELECT id FROM sales AS cif WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.code = cif.code );
{ "outer_table": "sales", "inner_table": "categories", "outer_alias": "cif", "inner_alias": "egiv", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01005
train
v1
Schema: items (alias: ikob)(level, date, type, status) schedules(id, date, amount, level) Task: Select code from items where code exists in schedules for the same id. SQL:
SELECT code FROM items AS ikob WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.id = ikob.id );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "ikob", "inner_alias": "vmob", "proj_col": "code", "filter_col": "code", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01006
train
v1
Schema: accounts (alias: jac)(salary, level, code, value) schedules(amount, type, date, salary) Task: Find salary from accounts where code appears in schedules entries with matching type. SQL:
SELECT salary FROM accounts AS jac WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "code", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01007
train
v1
Schema: schedules (alias: vmob)(value, amount, salary, id) products(value, name, level, id) Task: Find id from schedules where status appears in products entries with matching code. SQL:
SELECT id FROM schedules AS vmob WHERE status IN ( SELECT status FROM products AS nad WHERE nad.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01008
train
v1
Schema: tasks (alias: znob)(id, name, type, level) staff(name, id, salary, type) Task: Retrieve amount from tasks whose status is found in staff rows where type matches the outer record. SQL:
SELECT amount FROM tasks AS znob WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.type = znob.type );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01009
train
v1
Schema: employees (alias: bev)(code, salary, name, date) products(date, salary, amount, status) Task: Select id from employees where code exists in products for the same code. SQL:
SELECT id FROM employees AS bev WHERE code IN ( SELECT code FROM products AS nad WHERE nad.code = bev.code );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "id", "filter_col": "code", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01010
train
v2
Schema: tasks (alias: znob)(status, id, value, salary) customers(salary, code, status, name) Task: Find salary from tasks where a matching record exists in customers with the same code. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = znob.code );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "znob", "inner_alias": "lex", "proj_col": "salary", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01011
train
v3
Schema: sales (alias: cif)(id, status, value, date) transactions(code, salary, id, level) Task: Find id from sales where salary exceeds the count of amount from transactions for the same level. SQL:
SELECT id FROM sales AS cif WHERE salary > ( SELECT COUNT(amount) FROM transactions AS gev WHERE gev.level = cif.level );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01012
train
v2
Schema: categories (alias: egiv)(amount, name, level, code) employees(status, id, name, level) Task: Retrieve value from categories that have at least one corresponding entry in employees sharing the same id. SQL:
SELECT value FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = egiv.id );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "egiv", "inner_alias": "bev", "proj_col": "value", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01013
train
v3
Schema: employees (alias: bev)(id, level, name, value) departments(date, name, value, type) Task: Find value from employees where amount exceeds the maximum salary from departments for the same level. SQL:
SELECT value FROM employees AS bev WHERE amount > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.level = bev.level );
{ "outer_table": "employees", "inner_table": "departments", "outer_alias": "bev", "inner_alias": "dov", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01014
train
v3
Schema: invoices (alias: fal)(date, type, level, status) departments(status, salary, name, type) Task: Find amount from invoices where amount exceeds the maximum salary from departments for the same id. SQL:
SELECT amount FROM invoices AS fal WHERE amount > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.id = fal.id );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01015
train
v3
Schema: items (alias: ikob)(amount, name, level, id) departments(level, date, id, status) Task: Retrieve name from items with amount above the SUM(value) of departments rows sharing the same id. SQL:
SELECT name FROM items AS ikob WHERE amount > ( SELECT SUM(value) FROM departments AS dov WHERE dov.id = ikob.id );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "ikob", "inner_alias": "dov", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01016
train
v3
Schema: branches (alias: agov)(type, level, code, value) managers(amount, value, salary, status) Task: Retrieve id from branches with salary above the SUM(value) of managers rows sharing the same type. SQL:
SELECT id FROM branches AS agov WHERE salary > ( SELECT SUM(value) FROM managers AS hac WHERE hac.type = agov.type );
{ "outer_table": "branches", "inner_table": "managers", "outer_alias": "agov", "inner_alias": "hac", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01017
train
v2
Schema: managers (alias: hac)(level, code, value, salary) departments(amount, date, value, id) Task: Retrieve name from managers that have at least one corresponding entry in departments sharing the same status. SQL:
SELECT name 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": "name", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01018
train
v3
Schema: accounts (alias: jac)(id, level, name, date) items(type, code, status, value) Task: Find salary from accounts where salary exceeds the minimum amount from items for the same type. SQL:
SELECT salary FROM accounts AS jac WHERE salary > ( SELECT MIN(amount) FROM items AS ikob WHERE ikob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01019
train
v1
Schema: employees (alias: bev)(value, date, code, status) products(date, code, id, type) Task: Retrieve name from employees whose id is found in products rows where status matches the outer record. SQL:
SELECT name FROM employees AS bev WHERE id IN ( SELECT id FROM products AS nad WHERE nad.status = bev.status );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01020
train
v3
Schema: products (alias: nad)(level, type, code, name) regions(level, status, amount, salary) Task: Find salary from products where salary exceeds the average salary from regions for the same status. SQL:
SELECT salary FROM products AS nad WHERE salary > ( SELECT AVG(salary) FROM regions AS okiv WHERE okiv.status = nad.status );
{ "outer_table": "products", "inner_table": "regions", "outer_alias": "nad", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01021
train
v1
Schema: managers (alias: hac)(amount, id, value, status) schedules(level, value, amount, date) Task: Select code from managers where level exists in schedules for the same type. SQL:
SELECT code FROM managers AS hac WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.type = hac.type );
{ "outer_table": "managers", "inner_table": "schedules", "outer_alias": "hac", "inner_alias": "vmob", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01022
train
v3
Schema: branches (alias: agov)(name, amount, status, type) employees(amount, code, date, status) Task: Find amount from branches where salary exceeds the total value from employees for the same code. SQL:
SELECT amount FROM branches AS agov WHERE salary > ( SELECT SUM(value) FROM employees AS bev WHERE bev.code = agov.code );
{ "outer_table": "branches", "inner_table": "employees", "outer_alias": "agov", "inner_alias": "bev", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01023
train
v1
Schema: shipments (alias: vnob)(value, salary, level, date) regions(type, id, name, salary) Task: Retrieve code from shipments whose level is found in regions rows where type matches the outer record. SQL:
SELECT code FROM shipments AS vnob WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01024
train
v1
Schema: branches (alias: agov)(type, id, status, value) employees(code, name, date, salary) Task: Find code from branches where status appears in employees entries with matching type. SQL:
SELECT code FROM branches AS agov WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.type = agov.type );
{ "outer_table": "branches", "inner_table": "employees", "outer_alias": "agov", "inner_alias": "bev", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01025
train
v1
Schema: invoices (alias: fal)(amount, level, type, salary) items(code, level, type, name) Task: Find name from invoices where type appears in items entries with matching level. SQL:
SELECT name 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": "name", "filter_col": "type", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01026
train
v2
Schema: requests (alias: ejof)(level, value, id, type) managers(level, salary, amount, date) Task: Retrieve value from requests that have at least one corresponding entry in managers sharing the same id. SQL:
SELECT value FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = ejof.id );
{ "outer_table": "requests", "inner_table": "managers", "outer_alias": "ejof", "inner_alias": "hac", "proj_col": "value", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_01027
train
v1
Schema: managers (alias: hac)(type, level, date, amount) departments(type, id, amount, level) Task: Select value from managers where code exists in departments for the same code. SQL:
SELECT value FROM managers AS hac WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.code = hac.code );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "value", "filter_col": "code", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01028
train
v1
Schema: invoices (alias: fal)(salary, status, value, level) accounts(name, salary, date, value) Task: Retrieve name from invoices whose id is found in accounts rows where level matches the outer record. SQL:
SELECT name FROM invoices AS fal WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.level = fal.level );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "name", "filter_col": "id", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01029
train
v1
Schema: employees (alias: bev)(value, status, level, code) tasks(date, type, level, status) Task: Select value from employees where level exists in tasks for the same id. SQL:
SELECT value FROM employees AS bev WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.id = bev.id );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "value", "filter_col": "level", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01030
train
v2
Schema: transactions (alias: gev)(amount, name, status, level) departments(amount, status, level, salary) Task: Find salary from transactions where a matching record exists in departments with the same code. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = gev.code );
{ "outer_table": "transactions", "inner_table": "departments", "outer_alias": "gev", "inner_alias": "dov", "proj_col": "salary", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01031
train
v2
Schema: branches (alias: agov)(value, level, status, code) schedules(id, code, level, value) Task: Retrieve amount from branches that have at least one corresponding entry in schedules sharing the same type. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = agov.type );
{ "outer_table": "branches", "inner_table": "schedules", "outer_alias": "agov", "inner_alias": "vmob", "proj_col": "amount", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01032
train
v3
Schema: categories (alias: egiv)(date, salary, name, type) regions(date, status, code, value) Task: Retrieve value from categories with salary above the SUM(amount) of regions rows sharing the same id. SQL:
SELECT value FROM categories AS egiv WHERE salary > ( SELECT SUM(amount) FROM regions AS okiv WHERE okiv.id = egiv.id );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01033
train
v2
Schema: staff (alias: xnob)(amount, level, value, type) shipments(amount, level, salary, value) Task: Retrieve amount from staff that have at least one corresponding entry in shipments sharing the same level. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.level = xnob.level );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "amount", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_01034
train
v2
Schema: schedules (alias: vmob)(level, status, code, id) tasks(status, salary, amount, name) Task: Retrieve amount from schedules that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "amount", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01035
train
v3
Schema: items (alias: ikob)(id, type, salary, value) projects(name, salary, code, type) Task: Retrieve code from items with salary above the SUM(amount) of projects rows sharing the same level. SQL:
SELECT code FROM items AS ikob WHERE salary > ( SELECT SUM(amount) FROM projects AS uliv WHERE uliv.level = ikob.level );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01036
train
v1
Schema: employees (alias: bev)(status, code, type, id) staff(amount, status, code, id) Task: Retrieve id from employees whose code is found in staff rows where code matches the outer record. SQL:
SELECT id FROM employees AS bev WHERE code IN ( SELECT code FROM staff AS xnob WHERE xnob.code = bev.code );
{ "outer_table": "employees", "inner_table": "staff", "outer_alias": "bev", "inner_alias": "xnob", "proj_col": "id", "filter_col": "code", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01037
train
v1
Schema: requests (alias: ejof)(id, code, level, amount) employees(code, level, amount, type) Task: Select value from requests where status exists in employees for the same id. SQL:
SELECT value FROM requests AS ejof WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.id = ejof.id );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ejof", "inner_alias": "bev", "proj_col": "value", "filter_col": "status", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_01038
train
v1
Schema: products (alias: nad)(code, type, status, level) customers(date, status, name, id) Task: Retrieve name from products whose code is found in customers rows where code matches the outer record. SQL:
SELECT name FROM products AS nad WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.code = nad.code );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01039
train
v2
Schema: branches (alias: agov)(name, salary, id, type) orders(date, name, amount, value) Task: Find name from branches where a matching record exists in orders with the same level. SQL:
SELECT name FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = agov.level );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "name", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_01040
train
v3
Schema: customers (alias: lex)(date, name, value, salary) sales(level, amount, code, date) Task: Retrieve value from customers with amount above the MIN(salary) of sales rows sharing the same level. SQL:
SELECT value FROM customers AS lex WHERE amount > ( SELECT MIN(salary) FROM sales AS cif WHERE cif.level = lex.level );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01041
train
v2
Schema: customers (alias: lex)(status, salary, id, value) departments(code, id, status, value) Task: Retrieve amount from customers that have at least one corresponding entry in departments sharing the same status. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = lex.status );
{ "outer_table": "customers", "inner_table": "departments", "outer_alias": "lex", "inner_alias": "dov", "proj_col": "amount", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01042
train
v3
Schema: tasks (alias: znob)(amount, type, id, value) categories(name, code, salary, amount) Task: Retrieve amount from tasks with salary above the SUM(salary) of categories rows sharing the same code. SQL:
SELECT amount FROM tasks AS znob WHERE salary > ( SELECT SUM(salary) FROM categories AS egiv WHERE egiv.code = znob.code );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01043
train
v3
Schema: tasks (alias: znob)(type, name, code, level) products(id, type, value, name) Task: Find name from tasks where amount exceeds the count of value from products for the same level. SQL:
SELECT name FROM tasks AS znob WHERE amount > ( SELECT COUNT(value) FROM products AS nad WHERE nad.level = znob.level );
{ "outer_table": "tasks", "inner_table": "products", "outer_alias": "znob", "inner_alias": "nad", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01044
train
v1
Schema: items (alias: ikob)(level, name, salary, amount) requests(type, amount, status, value) Task: Find salary from items where level appears in requests entries with matching type. SQL:
SELECT salary FROM items AS ikob WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.type = ikob.type );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "ikob", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "level", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01045
train
v2
Schema: projects (alias: uliv)(date, name, id, value) shipments(level, type, name, value) Task: Find salary from projects where a matching record exists in shipments with the same code. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "shipments", "outer_alias": "uliv", "inner_alias": "vnob", "proj_col": "salary", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01046
train
v3
Schema: categories (alias: egiv)(level, salary, code, type) accounts(salary, value, code, date) Task: Find code from categories where amount exceeds the maximum salary from accounts for the same type. SQL:
SELECT code FROM categories AS egiv WHERE amount > ( SELECT MAX(salary) FROM accounts AS jac WHERE jac.type = egiv.type );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "egiv", "inner_alias": "jac", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01047
train
v3
Schema: departments (alias: dov)(status, id, date, amount) tasks(type, level, value, id) Task: Retrieve salary from departments with salary above the COUNT(value) of tasks rows sharing the same code. SQL:
SELECT salary FROM departments AS dov WHERE salary > ( SELECT COUNT(value) FROM tasks AS znob WHERE znob.code = dov.code );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dov", "inner_alias": "znob", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01048
train
v1
Schema: shipments (alias: vnob)(value, salary, status, code) products(id, status, date, value) Task: Select name from shipments where level exists in products for the same code. SQL:
SELECT name FROM shipments AS vnob WHERE level IN ( SELECT level FROM products AS nad WHERE nad.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01049
train
v2
Schema: regions (alias: okiv)(level, amount, salary, date) requests(value, name, code, status) Task: Retrieve amount from regions that have at least one corresponding entry in requests sharing the same type. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.type = okiv.type );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "amount", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01050
train
v1
Schema: items (alias: ikob)(name, amount, status, date) shipments(name, value, type, level) Task: Select amount from items where type exists in shipments for the same code. SQL:
SELECT amount FROM items AS ikob WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.code = ikob.code );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01051
train
v2
Schema: categories (alias: egiv)(name, id, type, status) employees(code, status, salary, value) Task: Retrieve amount from categories that have at least one corresponding entry in employees sharing the same type. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.type = egiv.type );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "egiv", "inner_alias": "bev", "proj_col": "amount", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01052
train
v1
Schema: schedules (alias: vmob)(id, name, status, salary) products(type, date, salary, code) Task: Select id from schedules where status exists in products for the same code. SQL:
SELECT id FROM schedules AS vmob WHERE status IN ( SELECT status FROM products AS nad WHERE nad.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01053
train
v2
Schema: regions (alias: okiv)(code, name, date, amount) products(date, amount, type, value) Task: Retrieve code from regions that have at least one corresponding entry in products sharing the same id. SQL:
SELECT code FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.id = okiv.id );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "code", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01054
train
v3
Schema: items (alias: ikob)(date, amount, type, salary) branches(code, date, status, amount) Task: Retrieve name from items with amount above the SUM(value) of branches rows sharing the same code. SQL:
SELECT name FROM items AS ikob WHERE amount > ( SELECT SUM(value) FROM branches AS agov WHERE agov.code = ikob.code );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01055
train
v3
Schema: managers (alias: hac)(salary, date, type, level) customers(code, type, name, level) Task: Find id from managers where amount exceeds the minimum salary from customers for the same type. SQL:
SELECT id FROM managers AS hac WHERE amount > ( SELECT MIN(salary) FROM customers AS lex WHERE lex.type = hac.type );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01056
train
v3
Schema: orders (alias: kab)(date, salary, code, name) requests(salary, value, status, type) Task: Find code from orders where salary exceeds the total salary from requests for the same status. SQL:
SELECT code FROM orders AS kab WHERE salary > ( SELECT SUM(salary) FROM requests AS ejof WHERE ejof.status = kab.status );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01057
train
v2
Schema: accounts (alias: jac)(date, type, salary, id) customers(date, level, status, name) Task: Find value from accounts where a matching record exists in customers with the same level. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = jac.level );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "value", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01058
train
v3
Schema: items (alias: ikob)(status, name, salary, value) projects(salary, status, value, code) Task: Find name from items where salary exceeds the total amount from projects for the same level. SQL:
SELECT name FROM items AS ikob WHERE salary > ( SELECT SUM(amount) FROM projects AS uliv WHERE uliv.level = ikob.level );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01059
train
v2
Schema: projects (alias: uliv)(date, status, value, type) branches(name, value, type, level) Task: Retrieve code from projects that have at least one corresponding entry in branches sharing the same level. SQL:
SELECT code FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.level = uliv.level );
{ "outer_table": "projects", "inner_table": "branches", "outer_alias": "uliv", "inner_alias": "agov", "proj_col": "code", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01060
train
v2
Schema: managers (alias: hac)(status, level, date, value) tasks(value, status, code, date) Task: Retrieve code from managers that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = hac.id );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "code", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01061
train
v2
Schema: categories (alias: egiv)(salary, date, code, amount) shipments(name, code, date, salary) Task: Find amount from categories where a matching record exists in shipments with the same type. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "amount", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01062
train
v1
Schema: shipments (alias: vnob)(type, date, amount, name) categories(type, level, name, code) Task: Select value from shipments where code exists in categories for the same level. SQL:
SELECT value FROM shipments AS vnob WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "categories", "outer_alias": "vnob", "inner_alias": "egiv", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01063
train
v2
Schema: regions (alias: okiv)(status, name, salary, date) orders(type, amount, level, code) Task: Retrieve value from regions that have at least one corresponding entry in orders sharing the same status. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = okiv.status );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "value", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01064
train
v1
Schema: schedules (alias: vmob)(id, amount, value, salary) departments(level, name, status, id) Task: Retrieve amount from schedules whose type is found in departments rows where id matches the outer record. SQL:
SELECT amount FROM schedules AS vmob WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "vmob", "inner_alias": "dov", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01065
train
v2
Schema: requests (alias: ejof)(id, type, date, code) invoices(status, type, salary, value) Task: Find id from requests where a matching record exists in invoices with the same type. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = ejof.type );
{ "outer_table": "requests", "inner_table": "invoices", "outer_alias": "ejof", "inner_alias": "fal", "proj_col": "id", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_01066
train
v2
Schema: departments (alias: dov)(date, name, id, amount) employees(id, code, name, type) Task: Retrieve value from departments that have at least one corresponding entry in employees sharing the same code. SQL:
SELECT value FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.code = dov.code );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "value", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01067
train
v3
Schema: accounts (alias: jac)(salary, amount, type, status) invoices(date, status, id, value) Task: Retrieve id from accounts with salary above the SUM(amount) of invoices rows sharing the same type. SQL:
SELECT id FROM accounts AS jac WHERE salary > ( SELECT SUM(amount) FROM invoices AS fal WHERE fal.type = jac.type );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01068
train
v1
Schema: orders (alias: kab)(salary, amount, level, value) employees(level, date, name, value) Task: Retrieve amount from orders whose code is found in employees rows where code matches the outer record. SQL:
SELECT amount FROM orders AS kab WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.code = kab.code );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01069
train
v2
Schema: products (alias: nad)(id, level, amount, salary) transactions(name, id, date, type) Task: Retrieve salary from products that have at least one corresponding entry in transactions sharing the same level. SQL:
SELECT salary FROM products AS nad WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = nad.level );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "salary", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01070
train
v2
Schema: accounts (alias: jac)(name, salary, level, code) products(date, salary, level, name) Task: Find value from accounts where a matching record exists in products with the same type. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = jac.type );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "jac", "inner_alias": "nad", "proj_col": "value", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01071
train
v2
Schema: items (alias: ikob)(code, status, date, id) products(date, level, name, code) Task: Find amount from items where a matching record exists in products with the same code. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = ikob.code );
{ "outer_table": "items", "inner_table": "products", "outer_alias": "ikob", "inner_alias": "nad", "proj_col": "amount", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_01072
train
v1
Schema: categories (alias: egiv)(code, value, id, amount) items(value, status, name, type) Task: Select code from categories where type exists in items for the same type. SQL:
SELECT code FROM categories AS egiv WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "items", "outer_alias": "egiv", "inner_alias": "ikob", "proj_col": "code", "filter_col": "type", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_01073
train
v1
Schema: staff (alias: xnob)(type, date, name, amount) schedules(id, status, code, value) Task: Retrieve id from staff whose level is found in schedules rows where id matches the outer record. SQL:
SELECT id FROM staff AS xnob WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.id = xnob.id );
{ "outer_table": "staff", "inner_table": "schedules", "outer_alias": "xnob", "inner_alias": "vmob", "proj_col": "id", "filter_col": "level", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_01074
train
v3
Schema: managers (alias: hac)(name, id, amount, value) items(code, amount, salary, status) Task: Find name from managers where amount exceeds the count of amount from items for the same id. SQL:
SELECT name FROM managers AS hac WHERE amount > ( SELECT COUNT(amount) FROM items AS ikob WHERE ikob.id = hac.id );
{ "outer_table": "managers", "inner_table": "items", "outer_alias": "hac", "inner_alias": "ikob", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01075
train
v3
Schema: tasks (alias: znob)(value, type, amount, level) accounts(id, date, amount, name) Task: Find id from tasks where value exceeds the minimum amount from accounts for the same id. SQL:
SELECT id FROM tasks AS znob WHERE value > ( SELECT MIN(amount) FROM accounts AS jac WHERE jac.id = znob.id );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01076
train
v1
Schema: accounts (alias: jac)(date, name, id, amount) sales(amount, level, status, name) Task: Select code from accounts where type exists in sales for the same status. SQL:
SELECT code FROM accounts AS jac WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.status = jac.status );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01077
train
v1
Schema: departments (alias: dov)(salary, level, date, amount) customers(date, salary, amount, type) Task: Select value from departments where id exists in customers for the same status. SQL:
SELECT value FROM departments AS dov WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.status = dov.status );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "value", "filter_col": "id", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01078
train
v3
Schema: orders (alias: kab)(value, date, id, amount) sales(status, date, type, salary) Task: Retrieve id from orders with amount above the COUNT(salary) of sales rows sharing the same level. SQL:
SELECT id FROM orders AS kab WHERE amount > ( SELECT COUNT(salary) FROM sales AS cif WHERE cif.level = kab.level );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01079
train
v3
Schema: schedules (alias: vmob)(status, value, date, level) categories(value, level, salary, code) Task: Find amount from schedules where amount exceeds the total salary from categories for the same type. SQL:
SELECT amount FROM schedules AS vmob WHERE amount > ( SELECT SUM(salary) FROM categories AS egiv WHERE egiv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01080
train
v1
Schema: orders (alias: kab)(id, type, code, salary) customers(code, id, date, salary) Task: Retrieve id from orders whose type is found in customers rows where status matches the outer record. SQL:
SELECT id FROM orders AS kab WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.status = kab.status );
{ "outer_table": "orders", "inner_table": "customers", "outer_alias": "kab", "inner_alias": "lex", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01081
train
v1
Schema: transactions (alias: gev)(value, status, amount, id) products(amount, level, code, type) Task: Select salary from transactions where id exists in products for the same code. SQL:
SELECT salary FROM transactions AS gev WHERE id IN ( SELECT id FROM products AS nad WHERE nad.code = gev.code );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "salary", "filter_col": "id", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01082
train
v3
Schema: schedules (alias: vmob)(date, code, status, value) departments(type, date, status, code) Task: Find value from schedules where value exceeds the maximum salary from departments for the same level. SQL:
SELECT value FROM schedules AS vmob WHERE value > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "vmob", "inner_alias": "dov", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_01083
train
v3
Schema: regions (alias: okiv)(name, value, type, id) managers(level, date, salary, type) Task: Retrieve salary from regions with amount above the MIN(value) of managers rows sharing the same id. SQL:
SELECT salary FROM regions AS okiv WHERE amount > ( SELECT MIN(value) FROM managers AS hac WHERE hac.id = okiv.id );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "okiv", "inner_alias": "hac", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01084
train
v3
Schema: projects (alias: uliv)(level, type, date, status) categories(type, value, amount, id) Task: Retrieve value from projects with value above the MIN(amount) of categories rows sharing the same code. SQL:
SELECT value FROM projects AS uliv WHERE value > ( SELECT MIN(amount) FROM categories AS egiv WHERE egiv.code = uliv.code );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01085
train
v2
Schema: departments (alias: dov)(value, salary, code, date) customers(amount, level, salary, value) Task: Retrieve id from departments that have at least one corresponding entry in customers sharing the same code. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = dov.code );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "id", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01086
train
v1
Schema: customers (alias: lex)(date, status, name, value) branches(date, type, code, amount) Task: Retrieve code from customers whose type is found in branches rows where type matches the outer record. SQL:
SELECT code FROM customers AS lex WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.type = lex.type );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "code", "filter_col": "type", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01087
train
v2
Schema: employees (alias: bev)(amount, name, value, level) customers(salary, id, amount, status) Task: Find value from employees where a matching record exists in customers with the same type. SQL:
SELECT value FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = bev.type );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "bev", "inner_alias": "lex", "proj_col": "value", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01088
train
v2
Schema: staff (alias: xnob)(level, salary, code, status) products(level, amount, id, code) Task: Find amount from staff where a matching record exists in products with the same status. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = xnob.status );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "amount", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_01089
train
v3
Schema: regions (alias: okiv)(type, salary, code, value) projects(type, date, value, name) Task: Retrieve salary from regions with value above the SUM(value) of projects rows sharing the same type. SQL:
SELECT salary FROM regions AS okiv WHERE value > ( SELECT SUM(value) FROM projects AS uliv WHERE uliv.type = okiv.type );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01090
train
v1
Schema: shipments (alias: vnob)(name, id, type, code) customers(level, type, id, salary) Task: Find id from shipments where id appears in customers entries with matching id. SQL:
SELECT id FROM shipments AS vnob WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "id", "filter_col": "id", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01091
train
v3
Schema: projects (alias: uliv)(id, date, value, code) sales(type, name, amount, date) Task: Find id from projects where value exceeds the total value from sales for the same type. SQL:
SELECT id FROM projects AS uliv WHERE value > ( SELECT SUM(value) FROM sales AS cif WHERE cif.type = uliv.type );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_01092
train
v2
Schema: shipments (alias: vnob)(name, code, type, status) orders(name, value, date, amount) Task: Find amount from shipments where a matching record exists in orders with the same id. SQL:
SELECT amount FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "amount", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_01093
train
v2
Schema: customers (alias: lex)(id, status, level, date) managers(level, code, status, salary) Task: Find amount from customers where a matching record exists in managers with the same type. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = lex.type );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "amount", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01094
train
v3
Schema: tasks (alias: znob)(code, type, salary, date) departments(code, salary, value, name) Task: Retrieve amount from tasks with salary above the MAX(salary) of departments rows sharing the same id. SQL:
SELECT amount FROM tasks AS znob WHERE salary > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.id = znob.id );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01095
train
v2
Schema: managers (alias: hac)(code, status, level, date) departments(salary, id, value, level) Task: Find id from managers where a matching record exists in departments with the same code. SQL:
SELECT id FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = hac.code );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "id", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01096
train
v3
Schema: employees (alias: bev)(salary, amount, status, type) managers(date, amount, level, code) Task: Retrieve code from employees with amount above the COUNT(salary) of managers rows sharing the same type. SQL:
SELECT code FROM employees AS bev WHERE amount > ( SELECT COUNT(salary) FROM managers AS hac WHERE hac.type = bev.type );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "bev", "inner_alias": "hac", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_01097
train
v2
Schema: regions (alias: okiv)(name, status, date, value) schedules(date, type, value, salary) Task: Retrieve code from regions that have at least one corresponding entry in schedules sharing the same level. SQL:
SELECT code FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "schedules", "outer_alias": "okiv", "inner_alias": "vmob", "proj_col": "code", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_01098
train
v2
Schema: tasks (alias: znob)(status, amount, id, value) products(amount, status, id, value) Task: Retrieve id from tasks that have at least one corresponding entry in products sharing the same level. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = znob.level );
{ "outer_table": "tasks", "inner_table": "products", "outer_alias": "znob", "inner_alias": "nad", "proj_col": "id", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_01099
train