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: regions (alias: okiv)(value, date, status, salary) projects(level, code, amount, date) Task: Select name from regions where status exists in projects for the same code. SQL:
SELECT name FROM regions AS okiv WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.code = okiv.code );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07100
train
v2
Schema: departments (alias: dov)(name, amount, value, date) requests(salary, type, amount, value) Task: Retrieve salary from departments that have at least one corresponding entry in requests sharing the same code. SQL:
SELECT salary FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = dov.code );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "salary", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07101
train
v3
Schema: staff (alias: xnob)(type, amount, name, status) items(code, status, value, type) Task: Find id from staff where value exceeds the count of value from items for the same code. SQL:
SELECT id FROM staff AS xnob WHERE value > ( SELECT COUNT(value) FROM items AS ikob WHERE ikob.code = xnob.code );
{ "outer_table": "staff", "inner_table": "items", "outer_alias": "xnob", "inner_alias": "ikob", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07102
train
v1
Schema: branches (alias: agov)(amount, salary, name, level) schedules(type, amount, code, salary) Task: Select amount from branches where status exists in schedules for the same status. SQL:
SELECT amount FROM branches AS agov WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.status = agov.status );
{ "outer_table": "branches", "inner_table": "schedules", "outer_alias": "agov", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07103
train
v3
Schema: transactions (alias: gev)(code, type, id, name) employees(id, status, type, code) Task: Retrieve name from transactions with salary above the MAX(salary) of employees rows sharing the same id. SQL:
SELECT name FROM transactions AS gev WHERE salary > ( SELECT MAX(salary) FROM employees AS bev WHERE bev.id = gev.id );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "gev", "inner_alias": "bev", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07104
train
v1
Schema: customers (alias: lex)(id, value, salary, name) employees(amount, name, value, level) Task: Retrieve value from customers whose status is found in employees rows where code matches the outer record. SQL:
SELECT value FROM customers AS lex WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.code = lex.code );
{ "outer_table": "customers", "inner_table": "employees", "outer_alias": "lex", "inner_alias": "bev", "proj_col": "value", "filter_col": "status", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07105
train
v2
Schema: employees (alias: bev)(id, value, code, amount) branches(type, salary, status, level) Task: Find code from employees where a matching record exists in branches with the same type. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.type = bev.type );
{ "outer_table": "employees", "inner_table": "branches", "outer_alias": "bev", "inner_alias": "agov", "proj_col": "code", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07106
train
v3
Schema: accounts (alias: jac)(id, code, salary, name) staff(status, salary, code, amount) Task: Find salary from accounts where value exceeds the maximum amount from staff for the same level. SQL:
SELECT salary FROM accounts AS jac WHERE value > ( SELECT MAX(amount) FROM staff AS xnob WHERE xnob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "jac", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07107
train
v3
Schema: categories (alias: egiv)(name, type, code, value) schedules(code, amount, value, status) Task: Retrieve amount from categories with salary above the AVG(value) of schedules rows sharing the same id. SQL:
SELECT amount FROM categories AS egiv WHERE salary > ( SELECT AVG(value) FROM schedules AS vmob WHERE vmob.id = egiv.id );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "egiv", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07108
train
v1
Schema: shipments (alias: vnob)(date, value, status, level) departments(id, amount, value, code) Task: Retrieve name from shipments whose level is found in departments rows where level matches the outer record. SQL:
SELECT name FROM shipments AS vnob WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "name", "filter_col": "level", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07109
train
v3
Schema: items (alias: ikob)(id, name, status, type) tasks(code, value, date, amount) Task: Find name from items where value exceeds the average value from tasks for the same level. SQL:
SELECT name FROM items AS ikob WHERE value > ( SELECT AVG(value) FROM tasks AS znob WHERE znob.level = ikob.level );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07110
train
v1
Schema: accounts (alias: jac)(type, level, name, amount) departments(code, value, name, id) Task: Retrieve salary from accounts whose status is found in departments rows where code matches the outer record. SQL:
SELECT salary FROM accounts AS jac WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.code = jac.code );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "salary", "filter_col": "status", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07111
train
v3
Schema: projects (alias: uliv)(id, status, salary, value) accounts(status, level, amount, name) Task: Find value from projects where salary exceeds the count of salary from accounts for the same level. SQL:
SELECT value FROM projects AS uliv WHERE salary > ( SELECT COUNT(salary) FROM accounts AS jac WHERE jac.level = uliv.level );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07112
train
v1
Schema: invoices (alias: fal)(id, date, salary, type) projects(code, amount, status, value) Task: Retrieve code from invoices whose status is found in projects rows where status matches the outer record. SQL:
SELECT code FROM invoices AS fal WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.status = fal.status );
{ "outer_table": "invoices", "inner_table": "projects", "outer_alias": "fal", "inner_alias": "uliv", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07113
train
v1
Schema: sales (alias: cif)(type, salary, amount, value) accounts(name, id, amount, value) Task: Select id from sales where level exists in accounts for the same type. SQL:
SELECT id FROM sales AS cif WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.type = cif.type );
{ "outer_table": "sales", "inner_table": "accounts", "outer_alias": "cif", "inner_alias": "jac", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07114
train
v1
Schema: staff (alias: xnob)(level, name, status, amount) items(type, level, date, name) Task: Find value from staff where id appears in items entries with matching level. SQL:
SELECT value FROM staff AS xnob WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.level = xnob.level );
{ "outer_table": "staff", "inner_table": "items", "outer_alias": "xnob", "inner_alias": "ikob", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07115
train
v1
Schema: staff (alias: xnob)(level, id, salary, date) customers(date, amount, value, id) Task: Select name from staff where code exists in customers for the same type. SQL:
SELECT name FROM staff AS xnob WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.type = xnob.type );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "name", "filter_col": "code", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07116
train
v2
Schema: managers (alias: hac)(name, code, type, status) categories(salary, code, level, name) Task: Find code from managers where a matching record exists in categories with the same id. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.id = hac.id );
{ "outer_table": "managers", "inner_table": "categories", "outer_alias": "hac", "inner_alias": "egiv", "proj_col": "code", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07117
train
v1
Schema: projects (alias: uliv)(salary, type, value, id) accounts(salary, date, level, id) Task: Retrieve name from projects whose id is found in accounts rows where id matches the outer record. SQL:
SELECT name FROM projects AS uliv WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.id = uliv.id );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07118
train
v1
Schema: sales (alias: cif)(value, salary, level, date) categories(code, name, id, status) Task: Select name from sales where status exists in categories for the same status. SQL:
SELECT name FROM sales AS cif WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.status = cif.status );
{ "outer_table": "sales", "inner_table": "categories", "outer_alias": "cif", "inner_alias": "egiv", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07119
train
v2
Schema: orders (alias: kab)(value, code, name, level) regions(value, type, amount, id) Task: Find amount from orders where a matching record exists in regions with the same level. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = kab.level );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "kab", "inner_alias": "okiv", "proj_col": "amount", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07120
train
v1
Schema: employees (alias: bev)(status, date, id, type) customers(amount, name, code, value) Task: Select name from employees where status exists in customers for the same code. SQL:
SELECT name FROM employees AS bev WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.code = bev.code );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "bev", "inner_alias": "lex", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07121
train
v3
Schema: categories (alias: egiv)(type, amount, level, code) requests(value, level, salary, code) Task: Find amount from categories where value exceeds the minimum value from requests for the same code. SQL:
SELECT amount FROM categories AS egiv WHERE value > ( SELECT MIN(value) FROM requests AS ejof WHERE ejof.code = egiv.code );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "egiv", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07122
train
v2
Schema: employees (alias: bev)(code, type, level, value) invoices(name, type, id, status) Task: Find amount from employees where a matching record exists in invoices with the same type. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = bev.type );
{ "outer_table": "employees", "inner_table": "invoices", "outer_alias": "bev", "inner_alias": "fal", "proj_col": "amount", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07123
train
v1
Schema: products (alias: nad)(value, amount, date, code) accounts(amount, type, code, value) Task: Select salary from products where code exists in accounts for the same code. SQL:
SELECT salary FROM products AS nad WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.code = nad.code );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07124
train
v1
Schema: items (alias: ikob)(status, type, amount, value) products(amount, status, salary, type) Task: Find amount from items where id appears in products entries with matching code. SQL:
SELECT amount FROM items AS ikob WHERE id IN ( SELECT id FROM products AS nad WHERE nad.code = ikob.code );
{ "outer_table": "items", "inner_table": "products", "outer_alias": "ikob", "inner_alias": "nad", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07125
train
v2
Schema: categories (alias: egiv)(level, amount, id, value) orders(date, name, code, status) Task: Find value from categories where a matching record exists in orders with the same type. SQL:
SELECT value FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = egiv.type );
{ "outer_table": "categories", "inner_table": "orders", "outer_alias": "egiv", "inner_alias": "kab", "proj_col": "value", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07126
train
v2
Schema: categories (alias: egiv)(date, amount, level, id) departments(status, value, amount, salary) Task: Retrieve name from categories that have at least one corresponding entry in departments sharing the same type. SQL:
SELECT name FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = egiv.type );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "name", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07127
train
v2
Schema: orders (alias: kab)(code, id, value, level) branches(date, level, salary, code) Task: Retrieve code from orders that have at least one corresponding entry in branches sharing the same status. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = kab.status );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "code", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07128
train
v3
Schema: regions (alias: okiv)(amount, value, name, code) categories(name, id, value, level) Task: Find salary from regions where salary exceeds the minimum salary from categories for the same id. SQL:
SELECT salary FROM regions AS okiv WHERE salary > ( SELECT MIN(salary) FROM categories AS egiv WHERE egiv.id = okiv.id );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07129
train
v2
Schema: branches (alias: agov)(type, value, amount, salary) tasks(id, value, type, salary) Task: Retrieve amount from branches that have at least one corresponding entry in tasks sharing the same type. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = agov.type );
{ "outer_table": "branches", "inner_table": "tasks", "outer_alias": "agov", "inner_alias": "znob", "proj_col": "amount", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07130
train
v3
Schema: regions (alias: okiv)(id, status, level, amount) customers(salary, type, code, date) Task: Find salary from regions where salary exceeds the average value from customers for the same level. SQL:
SELECT salary FROM regions AS okiv WHERE salary > ( SELECT AVG(value) FROM customers AS lex WHERE lex.level = okiv.level );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07131
train
v3
Schema: employees (alias: bev)(code, level, type, status) invoices(status, id, name, amount) Task: Find amount from employees where salary exceeds the total amount from invoices for the same type. SQL:
SELECT amount FROM employees AS bev WHERE salary > ( SELECT SUM(amount) FROM invoices AS fal WHERE fal.type = bev.type );
{ "outer_table": "employees", "inner_table": "invoices", "outer_alias": "bev", "inner_alias": "fal", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07132
train
v2
Schema: products (alias: nad)(amount, code, salary, level) schedules(date, code, type, level) Task: Retrieve code from products that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = nad.code );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07133
train
v2
Schema: departments (alias: dov)(value, type, id, name) sales(salary, status, date, name) Task: Retrieve salary from departments that have at least one corresponding entry in sales sharing the same code. SQL:
SELECT salary FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = dov.code );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "salary", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07134
train
v2
Schema: shipments (alias: vnob)(name, level, date, type) departments(level, id, date, salary) Task: Retrieve code from shipments that have at least one corresponding entry in departments sharing the same status. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "code", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07135
train
v1
Schema: items (alias: ikob)(salary, status, type, amount) branches(value, code, name, level) Task: Retrieve name from items whose status is found in branches rows where status matches the outer record. SQL:
SELECT name FROM items AS ikob WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.status = ikob.status );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07136
train
v3
Schema: projects (alias: uliv)(status, amount, salary, code) staff(amount, name, status, id) Task: Retrieve name from projects with salary above the MAX(salary) of staff rows sharing the same id. SQL:
SELECT name FROM projects AS uliv WHERE salary > ( SELECT MAX(salary) FROM staff AS xnob WHERE xnob.id = uliv.id );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07137
train
v1
Schema: tasks (alias: znob)(level, code, name, date) shipments(code, level, name, type) Task: Find name from tasks where type appears in shipments entries with matching level. SQL:
SELECT name FROM tasks AS znob WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.level = znob.level );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "type", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07138
train
v3
Schema: managers (alias: hac)(id, level, value, status) transactions(status, id, code, amount) Task: Find id from managers where salary exceeds the count of value from transactions for the same id. SQL:
SELECT id FROM managers AS hac WHERE salary > ( SELECT COUNT(value) FROM transactions AS gev WHERE gev.id = hac.id );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07139
train
v1
Schema: sales (alias: cif)(name, salary, code, level) employees(id, type, salary, code) Task: Retrieve amount from sales whose id is found in employees rows where status matches the outer record. SQL:
SELECT amount FROM sales AS cif WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.status = cif.status );
{ "outer_table": "sales", "inner_table": "employees", "outer_alias": "cif", "inner_alias": "bev", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07140
train
v3
Schema: products (alias: nad)(value, salary, code, id) regions(code, salary, level, status) Task: Find salary from products where amount exceeds the total value from regions for the same code. SQL:
SELECT salary FROM products AS nad WHERE amount > ( SELECT SUM(value) FROM regions AS okiv WHERE okiv.code = nad.code );
{ "outer_table": "products", "inner_table": "regions", "outer_alias": "nad", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07141
train
v1
Schema: regions (alias: okiv)(level, salary, value, date) categories(salary, type, level, code) Task: Select name from regions where id exists in categories for the same code. SQL:
SELECT name FROM regions AS okiv WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.code = okiv.code );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07142
train
v3
Schema: categories (alias: egiv)(id, name, value, date) requests(amount, status, code, value) Task: Retrieve salary from categories with salary above the AVG(salary) of requests rows sharing the same status. SQL:
SELECT salary FROM categories AS egiv WHERE salary > ( SELECT AVG(salary) FROM requests AS ejof WHERE ejof.status = egiv.status );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "egiv", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07143
train
v3
Schema: requests (alias: ejof)(name, amount, id, salary) categories(type, name, id, amount) Task: Find amount from requests where salary exceeds the total value from categories for the same code. SQL:
SELECT amount FROM requests AS ejof WHERE salary > ( SELECT SUM(value) FROM categories AS egiv WHERE egiv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "categories", "outer_alias": "ejof", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07144
train
v2
Schema: products (alias: nad)(status, id, level, date) categories(status, level, date, code) Task: Retrieve code from products that have at least one corresponding entry in categories sharing the same status. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = nad.status );
{ "outer_table": "products", "inner_table": "categories", "outer_alias": "nad", "inner_alias": "egiv", "proj_col": "code", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07145
train
v1
Schema: schedules (alias: vmob)(date, status, code, value) categories(date, value, salary, level) Task: Select id from schedules where id exists in categories for the same status. SQL:
SELECT id FROM schedules AS vmob WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "id", "filter_col": "id", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07146
train
v3
Schema: projects (alias: uliv)(type, amount, code, status) schedules(id, level, amount, name) Task: Retrieve salary from projects with salary above the MAX(value) of schedules rows sharing the same level. SQL:
SELECT salary FROM projects AS uliv WHERE salary > ( SELECT MAX(value) FROM schedules AS vmob WHERE vmob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07147
train
v2
Schema: projects (alias: uliv)(level, name, status, code) orders(amount, date, name, type) Task: Find id from projects where a matching record exists in orders with the same type. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = uliv.type );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "id", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07148
train
v1
Schema: sales (alias: cif)(name, id, level, salary) branches(value, code, date, amount) Task: Retrieve id from sales whose status is found in branches rows where code matches the outer record. SQL:
SELECT id FROM sales AS cif WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.code = cif.code );
{ "outer_table": "sales", "inner_table": "branches", "outer_alias": "cif", "inner_alias": "agov", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07149
train
v1
Schema: managers (alias: hac)(amount, level, code, status) staff(id, amount, level, value) Task: Find name from managers where level appears in staff entries with matching id. SQL:
SELECT name FROM managers AS hac WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.id = hac.id );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "hac", "inner_alias": "xnob", "proj_col": "name", "filter_col": "level", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07150
train
v2
Schema: items (alias: ikob)(amount, code, name, status) products(status, type, amount, date) Task: Find amount from items where a matching record exists in products with the same type. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = ikob.type );
{ "outer_table": "items", "inner_table": "products", "outer_alias": "ikob", "inner_alias": "nad", "proj_col": "amount", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07151
train
v3
Schema: schedules (alias: vmob)(code, value, level, date) orders(salary, name, amount, date) Task: Find name from schedules where amount exceeds the count of value from orders for the same type. SQL:
SELECT name FROM schedules AS vmob WHERE amount > ( SELECT COUNT(value) FROM orders AS kab WHERE kab.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "orders", "outer_alias": "vmob", "inner_alias": "kab", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07152
train
v3
Schema: schedules (alias: vmob)(code, salary, status, date) shipments(value, level, salary, amount) Task: Retrieve salary from schedules with salary above the MIN(salary) of shipments rows sharing the same code. SQL:
SELECT salary FROM schedules AS vmob WHERE salary > ( SELECT MIN(salary) FROM shipments AS vnob WHERE vnob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "shipments", "outer_alias": "vmob", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07153
train
v1
Schema: sales (alias: cif)(code, id, level, date) invoices(name, date, code, id) Task: Select amount from sales where code exists in invoices for the same id. SQL:
SELECT amount FROM sales AS cif WHERE code IN ( SELECT code FROM invoices AS fal WHERE fal.id = cif.id );
{ "outer_table": "sales", "inner_table": "invoices", "outer_alias": "cif", "inner_alias": "fal", "proj_col": "amount", "filter_col": "code", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07154
train
v2
Schema: items (alias: ikob)(amount, id, name, level) shipments(name, value, salary, code) Task: Find id from items where a matching record exists in shipments with the same id. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = ikob.id );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "id", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07155
train
v2
Schema: products (alias: nad)(code, id, name, date) managers(amount, salary, value, type) Task: Find id from products where a matching record exists in managers with the same type. SQL:
SELECT id FROM products AS nad WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = nad.type );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "nad", "inner_alias": "hac", "proj_col": "id", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07156
train
v2
Schema: employees (alias: bev)(salary, code, value, date) orders(amount, type, date, id) Task: Find value from employees where a matching record exists in orders with the same code. SQL:
SELECT value FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.code = bev.code );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "value", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07157
train
v1
Schema: shipments (alias: vnob)(type, code, value, date) customers(amount, type, status, id) Task: Retrieve name from shipments whose status is found in customers rows where level matches the outer record. SQL:
SELECT name FROM shipments AS vnob WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07158
train
v2
Schema: departments (alias: dov)(amount, id, code, date) transactions(type, name, status, id) Task: Find salary from departments where a matching record exists in transactions with the same status. SQL:
SELECT salary FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = dov.status );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dov", "inner_alias": "gev", "proj_col": "salary", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07159
train
v3
Schema: regions (alias: okiv)(value, amount, status, date) items(status, amount, salary, value) Task: Find name from regions where amount exceeds the average salary from items for the same id. SQL:
SELECT name FROM regions AS okiv WHERE amount > ( SELECT AVG(salary) FROM items AS ikob WHERE ikob.id = okiv.id );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07160
train
v3
Schema: sales (alias: cif)(status, date, value, name) projects(level, salary, type, date) Task: Find id from sales where salary exceeds the minimum value from projects for the same status. SQL:
SELECT id FROM sales AS cif WHERE salary > ( SELECT MIN(value) FROM projects AS uliv WHERE uliv.status = cif.status );
{ "outer_table": "sales", "inner_table": "projects", "outer_alias": "cif", "inner_alias": "uliv", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07161
train
v1
Schema: regions (alias: okiv)(salary, id, value, level) transactions(name, id, type, value) Task: Find id from regions where id appears in transactions entries with matching level. SQL:
SELECT id FROM regions AS okiv WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.level = okiv.level );
{ "outer_table": "regions", "inner_table": "transactions", "outer_alias": "okiv", "inner_alias": "gev", "proj_col": "id", "filter_col": "id", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07162
train
v1
Schema: branches (alias: agov)(level, id, name, value) invoices(status, level, id, type) Task: Find value from branches where id appears in invoices entries with matching code. SQL:
SELECT value FROM branches AS agov WHERE id IN ( SELECT id FROM invoices AS fal WHERE fal.code = agov.code );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "value", "filter_col": "id", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07163
train
v1
Schema: transactions (alias: gev)(salary, code, amount, status) requests(salary, status, value, level) Task: Select value from transactions where code exists in requests for the same code. SQL:
SELECT value FROM transactions AS gev WHERE code IN ( SELECT code FROM requests AS ejof WHERE ejof.code = gev.code );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "value", "filter_col": "code", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07164
train
v3
Schema: projects (alias: uliv)(status, level, date, amount) transactions(status, id, date, value) Task: Retrieve amount from projects with value above the MAX(value) of transactions rows sharing the same id. SQL:
SELECT amount FROM projects AS uliv WHERE value > ( SELECT MAX(value) 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": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07165
train
v1
Schema: orders (alias: kab)(date, code, id, level) products(id, salary, value, date) Task: Retrieve id from orders whose type is found in products rows where level matches the outer record. SQL:
SELECT id FROM orders AS kab WHERE type IN ( SELECT type FROM products AS nad WHERE nad.level = kab.level );
{ "outer_table": "orders", "inner_table": "products", "outer_alias": "kab", "inner_alias": "nad", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07166
train
v2
Schema: schedules (alias: vmob)(name, salary, code, status) categories(type, name, id, status) Task: Find amount from schedules where a matching record exists in categories with the same level. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "amount", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07167
train
v3
Schema: requests (alias: ejof)(value, date, type, status) accounts(level, value, status, type) Task: Retrieve id from requests with amount above the MIN(amount) of accounts rows sharing the same level. SQL:
SELECT id FROM requests AS ejof WHERE amount > ( SELECT MIN(amount) FROM accounts AS jac WHERE jac.level = ejof.level );
{ "outer_table": "requests", "inner_table": "accounts", "outer_alias": "ejof", "inner_alias": "jac", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07168
train
v1
Schema: invoices (alias: fal)(salary, value, type, level) regions(value, name, date, id) Task: Select amount from invoices where status exists in regions for the same id. SQL:
SELECT amount FROM invoices AS fal WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.id = fal.id );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07169
train
v3
Schema: orders (alias: kab)(level, date, name, value) sales(value, name, date, salary) Task: Find value from orders where value exceeds the maximum amount from sales for the same level. SQL:
SELECT value FROM orders AS kab WHERE value > ( SELECT MAX(amount) FROM sales AS cif WHERE cif.level = kab.level );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07170
train
v3
Schema: requests (alias: ejof)(salary, type, amount, name) shipments(type, date, code, name) Task: Find id from requests where amount exceeds the average value from shipments for the same level. SQL:
SELECT id FROM requests AS ejof WHERE amount > ( SELECT AVG(value) FROM shipments AS vnob WHERE vnob.level = ejof.level );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ejof", "inner_alias": "vnob", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07171
train
v1
Schema: customers (alias: lex)(name, salary, status, code) transactions(status, code, salary, name) Task: Find name from customers where status appears in transactions entries with matching status. SQL:
SELECT name FROM customers AS lex WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.status = lex.status );
{ "outer_table": "customers", "inner_table": "transactions", "outer_alias": "lex", "inner_alias": "gev", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07172
train
v3
Schema: schedules (alias: vmob)(amount, status, id, code) staff(name, status, code, value) Task: Retrieve id from schedules with value above the AVG(salary) of staff rows sharing the same level. SQL:
SELECT id FROM schedules AS vmob WHERE value > ( SELECT AVG(salary) FROM staff AS xnob WHERE xnob.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07173
train
v2
Schema: categories (alias: egiv)(type, amount, date, id) sales(code, value, amount, date) Task: Retrieve code from categories that have at least one corresponding entry in sales sharing the same code. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = egiv.code );
{ "outer_table": "categories", "inner_table": "sales", "outer_alias": "egiv", "inner_alias": "cif", "proj_col": "code", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07174
train
v1
Schema: schedules (alias: vmob)(code, status, date, amount) managers(name, code, level, status) Task: Retrieve name from schedules whose type is found in managers rows where code matches the outer record. SQL:
SELECT name FROM schedules AS vmob WHERE type IN ( SELECT type FROM managers AS hac WHERE hac.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07175
train
v1
Schema: schedules (alias: vmob)(type, level, status, date) accounts(date, salary, value, level) Task: Retrieve salary from schedules whose type is found in accounts rows where level matches the outer record. SQL:
SELECT salary FROM schedules AS vmob WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "accounts", "outer_alias": "vmob", "inner_alias": "jac", "proj_col": "salary", "filter_col": "type", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07176
train
v2
Schema: invoices (alias: fal)(code, type, id, status) accounts(code, name, type, value) Task: Retrieve value from invoices that have at least one corresponding entry in accounts sharing the same status. SQL:
SELECT value FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = fal.status );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "value", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07177
train
v3
Schema: regions (alias: okiv)(code, amount, level, status) invoices(date, code, status, salary) Task: Find id from regions where amount exceeds the total value from invoices for the same status. SQL:
SELECT id FROM regions AS okiv WHERE amount > ( SELECT SUM(value) FROM invoices AS fal WHERE fal.status = okiv.status );
{ "outer_table": "regions", "inner_table": "invoices", "outer_alias": "okiv", "inner_alias": "fal", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07178
train
v3
Schema: staff (alias: xnob)(level, salary, type, status) sales(name, status, id, amount) Task: Find salary from staff where salary exceeds the minimum amount from sales for the same level. SQL:
SELECT salary FROM staff AS xnob WHERE salary > ( SELECT MIN(amount) FROM sales AS cif WHERE cif.level = xnob.level );
{ "outer_table": "staff", "inner_table": "sales", "outer_alias": "xnob", "inner_alias": "cif", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07179
train
v3
Schema: sales (alias: cif)(type, value, date, salary) transactions(salary, code, type, date) Task: Retrieve value from sales with value above the AVG(value) of transactions rows sharing the same status. SQL:
SELECT value FROM sales AS cif WHERE value > ( SELECT AVG(value) FROM transactions AS gev WHERE gev.status = cif.status );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07180
train
v1
Schema: employees (alias: bev)(date, value, amount, code) departments(date, status, amount, name) Task: Find code from employees where code appears in departments entries with matching level. SQL:
SELECT code FROM employees AS bev WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.level = bev.level );
{ "outer_table": "employees", "inner_table": "departments", "outer_alias": "bev", "inner_alias": "dov", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07181
train
v2
Schema: items (alias: ikob)(level, date, amount, salary) departments(value, salary, type, status) Task: Find name from items where a matching record exists in departments with the same level. SQL:
SELECT name FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = ikob.level );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "ikob", "inner_alias": "dov", "proj_col": "name", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07182
train
v2
Schema: projects (alias: uliv)(date, value, id, level) items(status, id, code, salary) Task: Retrieve amount from projects that have at least one corresponding entry in items sharing the same code. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "amount", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07183
train
v1
Schema: schedules (alias: vmob)(level, date, id, status) invoices(level, value, id, status) Task: Retrieve amount from schedules whose type is found in invoices rows where type matches the outer record. SQL:
SELECT amount FROM schedules AS vmob WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "vmob", "inner_alias": "fal", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07184
train
v2
Schema: projects (alias: uliv)(value, id, salary, name) categories(id, level, type, value) Task: Find name from projects where a matching record exists in categories with the same status. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = uliv.status );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "name", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07185
train
v3
Schema: requests (alias: ejof)(code, value, status, salary) invoices(id, code, amount, value) Task: Retrieve salary from requests with value above the SUM(amount) of invoices rows sharing the same status. SQL:
SELECT salary FROM requests AS ejof WHERE value > ( SELECT SUM(amount) FROM invoices AS fal WHERE fal.status = ejof.status );
{ "outer_table": "requests", "inner_table": "invoices", "outer_alias": "ejof", "inner_alias": "fal", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07186
train
v2
Schema: categories (alias: egiv)(id, salary, level, type) requests(name, level, status, id) Task: Find name from categories where a matching record exists in requests with the same status. SQL:
SELECT name FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = egiv.status );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "egiv", "inner_alias": "ejof", "proj_col": "name", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07187
train
v2
Schema: transactions (alias: gev)(level, amount, id, date) orders(id, code, salary, amount) Task: Retrieve code from transactions that have at least one corresponding entry in orders sharing the same id. SQL:
SELECT code FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = gev.id );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "gev", "inner_alias": "kab", "proj_col": "code", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07188
train
v3
Schema: employees (alias: bev)(name, code, id, date) projects(level, id, salary, type) Task: Retrieve id from employees with value above the SUM(amount) of projects rows sharing the same level. SQL:
SELECT id FROM employees AS bev WHERE value > ( SELECT SUM(amount) FROM projects AS uliv WHERE uliv.level = bev.level );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07189
train
v3
Schema: branches (alias: agov)(level, status, date, code) shipments(code, salary, date, status) Task: Find amount from branches where amount exceeds the maximum value from shipments for the same status. SQL:
SELECT amount FROM branches AS agov WHERE amount > ( SELECT MAX(value) FROM shipments AS vnob WHERE vnob.status = agov.status );
{ "outer_table": "branches", "inner_table": "shipments", "outer_alias": "agov", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07190
train
v1
Schema: staff (alias: xnob)(value, date, status, id) shipments(id, date, type, level) Task: Find id from staff where type appears in shipments entries with matching type. SQL:
SELECT id FROM staff AS xnob WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.type = xnob.type );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "id", "filter_col": "type", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07191
train
v3
Schema: items (alias: ikob)(value, level, status, id) shipments(status, amount, value, code) Task: Retrieve amount from items with amount above the COUNT(value) of shipments rows sharing the same code. SQL:
SELECT amount FROM items AS ikob WHERE amount > ( SELECT COUNT(value) 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": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07192
train
v1
Schema: sales (alias: cif)(amount, salary, code, status) staff(name, code, amount, date) Task: Find amount from sales where status appears in staff entries with matching level. SQL:
SELECT amount FROM sales AS cif WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.level = cif.level );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07193
train
v2
Schema: projects (alias: uliv)(amount, status, code, date) departments(id, amount, name, type) Task: Retrieve value from projects that have at least one corresponding entry in departments sharing the same id. SQL:
SELECT value FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = uliv.id );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "uliv", "inner_alias": "dov", "proj_col": "value", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07194
train
v2
Schema: branches (alias: agov)(code, level, value, type) sales(value, status, name, amount) Task: Find amount from branches where a matching record exists in sales with the same status. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = agov.status );
{ "outer_table": "branches", "inner_table": "sales", "outer_alias": "agov", "inner_alias": "cif", "proj_col": "amount", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07195
train
v1
Schema: departments (alias: dov)(salary, code, type, value) branches(date, salary, type, status) Task: Find code from departments where status appears in branches entries with matching type. SQL:
SELECT code FROM departments AS dov WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.type = dov.type );
{ "outer_table": "departments", "inner_table": "branches", "outer_alias": "dov", "inner_alias": "agov", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07196
train
v3
Schema: managers (alias: hac)(code, salary, id, amount) transactions(status, value, id, salary) Task: Retrieve amount from managers with amount above the MIN(value) of transactions rows sharing the same code. SQL:
SELECT amount FROM managers AS hac WHERE amount > ( SELECT MIN(value) FROM transactions AS gev WHERE gev.code = hac.code );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07197
train
v2
Schema: transactions (alias: gev)(level, salary, amount, name) requests(code, value, type, level) Task: Find salary from transactions where a matching record exists in requests with the same status. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = gev.status );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "salary", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07198
train
v1
Schema: products (alias: nad)(salary, level, name, amount) categories(amount, salary, date, status) Task: Select id from products where type exists in categories for the same type. SQL:
SELECT id FROM products AS nad WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.type = nad.type );
{ "outer_table": "products", "inner_table": "categories", "outer_alias": "nad", "inner_alias": "egiv", "proj_col": "id", "filter_col": "type", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07199
train