variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v2
Schema: sales (alias: cif)(type, date, value, name) orders(value, code, level, id) Task: Retrieve code from sales that have at least one corresponding entry in orders sharing the same status. SQL:
SELECT code FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = cif.status );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "code", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10000
train
v2
Schema: regions (alias: okiv)(name, status, id, type) schedules(id, level, salary, code) Task: Retrieve code from regions that have at least one corresponding entry in schedules sharing the same status. SQL:
SELECT code FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = okiv.status );
{ "outer_table": "regions", "inner_table": "schedules", "outer_alias": "okiv", "inner_alias": "vmob", "proj_col": "code", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10001
train
v3
Schema: regions (alias: okiv)(date, type, level, id) employees(type, value, code, level) Task: Find id from regions where amount exceeds the minimum salary from employees for the same id. SQL:
SELECT id FROM regions AS okiv WHERE amount > ( SELECT MIN(salary) FROM employees AS bev WHERE bev.id = okiv.id );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "okiv", "inner_alias": "bev", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10002
train
v1
Schema: items (alias: ikob)(level, salary, name, date) sales(salary, id, name, type) Task: Find id from items where status appears in sales entries with matching status. SQL:
SELECT id FROM items AS ikob WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.status = ikob.status );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10003
train
v1
Schema: orders (alias: kab)(code, value, amount, type) transactions(date, status, type, name) Task: Retrieve name from orders whose id is found in transactions rows where level matches the outer record. SQL:
SELECT name FROM orders AS kab WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.level = kab.level );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "name", "filter_col": "id", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10004
train
v3
Schema: branches (alias: agov)(level, type, salary, date) invoices(id, level, name, status) Task: Find amount from branches where value exceeds the average value from invoices for the same type. SQL:
SELECT amount FROM branches AS agov WHERE value > ( SELECT AVG(value) FROM invoices AS fal WHERE fal.type = agov.type );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10005
train
v3
Schema: products (alias: nad)(salary, code, amount, date) shipments(salary, status, code, name) Task: Find name from products where salary exceeds the maximum salary from shipments for the same type. SQL:
SELECT name FROM products AS nad WHERE salary > ( SELECT MAX(salary) FROM shipments AS vnob WHERE vnob.type = nad.type );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10006
train
v3
Schema: customers (alias: lex)(status, level, value, salary) products(date, type, amount, status) Task: Retrieve salary from customers with salary above the MAX(salary) of products rows sharing the same level. SQL:
SELECT salary FROM customers AS lex WHERE salary > ( SELECT MAX(salary) FROM products AS nad WHERE nad.level = lex.level );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10007
train
v3
Schema: regions (alias: okiv)(id, amount, name, status) employees(date, id, salary, value) Task: Find id from regions where amount exceeds the maximum amount from employees for the same level. SQL:
SELECT id FROM regions AS okiv WHERE amount > ( SELECT MAX(amount) FROM employees AS bev WHERE bev.level = okiv.level );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "okiv", "inner_alias": "bev", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10008
train
v3
Schema: products (alias: nad)(level, id, status, salary) tasks(id, value, salary, level) Task: Find value from products where value exceeds the maximum value from tasks for the same status. SQL:
SELECT value FROM products AS nad WHERE value > ( SELECT MAX(value) FROM tasks AS znob WHERE znob.status = nad.status );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10009
train
v1
Schema: staff (alias: xnob)(status, date, salary, id) categories(type, salary, amount, date) Task: Retrieve code from staff whose level is found in categories rows where status matches the outer record. SQL:
SELECT code FROM staff AS xnob WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.status = xnob.status );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10010
train
v3
Schema: products (alias: nad)(amount, status, code, value) projects(value, salary, level, amount) Task: Retrieve name from products with amount above the MIN(amount) of projects rows sharing the same status. SQL:
SELECT name FROM products AS nad WHERE amount > ( SELECT MIN(amount) FROM projects AS uliv WHERE uliv.status = nad.status );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10011
train
v2
Schema: products (alias: nad)(date, type, id, status) transactions(amount, status, date, id) Task: Find salary from products where a matching record exists in transactions with 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_10012
train
v2
Schema: transactions (alias: gev)(id, status, salary, level) projects(salary, amount, level, value) Task: Find amount from transactions where a matching record exists in projects with the same id. SQL:
SELECT amount FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.id = gev.id );
{ "outer_table": "transactions", "inner_table": "projects", "outer_alias": "gev", "inner_alias": "uliv", "proj_col": "amount", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10013
train
v2
Schema: tasks (alias: znob)(salary, amount, status, value) customers(id, type, value, amount) Task: Retrieve code from tasks that have at least one corresponding entry in customers sharing the same status. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = znob.status );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "znob", "inner_alias": "lex", "proj_col": "code", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10014
train
v3
Schema: departments (alias: dov)(type, level, status, date) shipments(id, status, value, level) Task: Retrieve salary from departments with value above the COUNT(salary) of shipments rows sharing the same status. SQL:
SELECT salary FROM departments AS dov WHERE value > ( SELECT COUNT(salary) FROM shipments AS vnob WHERE vnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10015
train
v2
Schema: tasks (alias: znob)(type, date, value, salary) categories(value, status, type, salary) Task: Retrieve id from tasks that have at least one corresponding entry in categories sharing the same level. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = znob.level );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "id", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10016
train
v3
Schema: transactions (alias: gev)(name, level, salary, amount) orders(status, salary, amount, code) Task: Find value from transactions where value exceeds the count of amount from orders for the same status. SQL:
SELECT value FROM transactions AS gev WHERE value > ( SELECT COUNT(amount) FROM orders AS kab WHERE kab.status = gev.status );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "gev", "inner_alias": "kab", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10017
train
v1
Schema: projects (alias: uliv)(type, salary, value, status) transactions(id, value, type, code) Task: Select value from projects where code exists in transactions for the same code. SQL:
SELECT value FROM projects AS uliv WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.code = uliv.code );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "value", "filter_col": "code", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10018
train
v2
Schema: sales (alias: cif)(status, type, amount, level) orders(id, salary, amount, status) Task: Find salary from sales where a matching record exists in orders with the same id. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = cif.id );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "salary", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10019
train
v3
Schema: managers (alias: hac)(id, level, status, name) orders(status, name, value, amount) Task: Find name from managers where salary exceeds the maximum salary from orders for the same id. SQL:
SELECT name FROM managers AS hac WHERE salary > ( SELECT MAX(salary) FROM orders AS kab WHERE kab.id = hac.id );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10020
train
v3
Schema: items (alias: ikob)(status, date, amount, name) transactions(name, level, value, type) Task: Retrieve salary from items with amount above the MIN(value) of transactions rows sharing the same code. SQL:
SELECT salary FROM items AS ikob WHERE amount > ( SELECT MIN(value) FROM transactions AS gev WHERE gev.code = ikob.code );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "ikob", "inner_alias": "gev", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10021
train
v1
Schema: items (alias: ikob)(code, name, salary, date) invoices(salary, amount, date, level) Task: Find name from items where level appears in invoices entries with matching type. SQL:
SELECT name FROM items AS ikob WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.type = ikob.type );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10022
train
v1
Schema: items (alias: ikob)(amount, name, date, status) customers(amount, type, value, level) Task: Find id from items where type appears in customers entries with matching type. SQL:
SELECT id FROM items AS ikob WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.type = ikob.type );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "id", "filter_col": "type", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10023
train
v3
Schema: shipments (alias: vnob)(value, level, status, code) schedules(amount, level, name, salary) Task: Find salary from shipments where amount exceeds the maximum amount from schedules for the same level. SQL:
SELECT salary FROM shipments AS vnob WHERE amount > ( SELECT MAX(amount) FROM schedules AS vmob WHERE vmob.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10024
train
v3
Schema: categories (alias: egiv)(date, type, id, salary) items(amount, type, date, status) Task: Retrieve code from categories with value above the MIN(salary) of items rows sharing the same id. SQL:
SELECT code FROM categories AS egiv WHERE value > ( SELECT MIN(salary) FROM items AS ikob WHERE ikob.id = egiv.id );
{ "outer_table": "categories", "inner_table": "items", "outer_alias": "egiv", "inner_alias": "ikob", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10025
train
v2
Schema: shipments (alias: vnob)(value, level, amount, id) invoices(status, level, date, code) Task: Retrieve code from shipments that have at least one corresponding entry in invoices sharing the same level. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "vnob", "inner_alias": "fal", "proj_col": "code", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10026
train
v2
Schema: products (alias: nad)(salary, amount, level, status) customers(type, date, level, status) Task: Retrieve salary from products that have at least one corresponding entry in customers sharing the same id. SQL:
SELECT salary FROM products AS nad WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = nad.id );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "salary", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10027
train
v1
Schema: accounts (alias: jac)(salary, value, date, level) orders(amount, value, name, date) Task: Find salary from accounts where code appears in orders entries with matching code. SQL:
SELECT salary FROM accounts AS jac WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.code = jac.code );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10028
train
v2
Schema: orders (alias: kab)(salary, value, id, name) invoices(level, salary, status, code) Task: Retrieve value from orders that have at least one corresponding entry in invoices sharing the same code. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = kab.code );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "kab", "inner_alias": "fal", "proj_col": "value", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10029
train
v3
Schema: employees (alias: bev)(date, salary, level, status) orders(id, date, type, status) Task: Retrieve value from employees with salary above the COUNT(salary) of orders rows sharing the same level. SQL:
SELECT value FROM employees AS bev WHERE salary > ( SELECT COUNT(salary) FROM orders AS kab WHERE kab.level = bev.level );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10030
train
v1
Schema: shipments (alias: vnob)(name, level, salary, date) staff(type, code, date, id) Task: Retrieve code from shipments whose id is found in staff rows where level matches the outer record. SQL:
SELECT code FROM shipments AS vnob WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_10031
train
v1
Schema: tasks (alias: znob)(code, level, salary, date) transactions(type, value, id, status) Task: Select id from tasks where status exists in transactions for the same type. SQL:
SELECT id FROM tasks AS znob WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.type = znob.type );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10032
train
v2
Schema: orders (alias: kab)(id, code, status, salary) sales(salary, id, level, code) Task: Find value from orders where a matching record exists in sales with the same code. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = kab.code );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "value", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10033
train
v2
Schema: tasks (alias: znob)(salary, code, status, amount) categories(amount, code, date, status) Task: Find salary from tasks where a matching record exists in categories with the same type. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = znob.type );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "salary", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10034
train
v1
Schema: staff (alias: xnob)(name, date, type, value) regions(date, salary, amount, id) Task: Select code from staff where id exists in regions for the same level. SQL:
SELECT code FROM staff AS xnob WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.level = xnob.level );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10035
train
v3
Schema: staff (alias: xnob)(code, type, date, level) regions(status, code, type, name) Task: Retrieve name from staff with salary above the AVG(salary) of regions rows sharing the same level. SQL:
SELECT name FROM staff AS xnob WHERE salary > ( SELECT AVG(salary) FROM regions AS okiv WHERE okiv.level = xnob.level );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10036
train
v1
Schema: customers (alias: lex)(id, amount, name, date) branches(date, id, code, status) Task: Select amount from customers where level exists in branches for the same type. SQL:
SELECT amount FROM customers AS lex WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.type = lex.type );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "amount", "filter_col": "level", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10037
train
v3
Schema: requests (alias: ejof)(date, salary, value, id) categories(status, amount, value, code) Task: Retrieve value from requests with value above the AVG(salary) of categories rows sharing the same level. SQL:
SELECT value FROM requests AS ejof WHERE value > ( SELECT AVG(salary) FROM categories AS egiv WHERE egiv.level = ejof.level );
{ "outer_table": "requests", "inner_table": "categories", "outer_alias": "ejof", "inner_alias": "egiv", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10038
train
v1
Schema: invoices (alias: fal)(date, value, name, code) projects(amount, salary, date, value) Task: Select amount from invoices where level exists in projects for the same status. SQL:
SELECT amount FROM invoices AS fal WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.status = fal.status );
{ "outer_table": "invoices", "inner_table": "projects", "outer_alias": "fal", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10039
train
v3
Schema: invoices (alias: fal)(level, amount, id, date) schedules(code, level, date, name) Task: Retrieve amount from invoices with salary above the AVG(amount) of schedules rows sharing the same type. SQL:
SELECT amount FROM invoices AS fal WHERE salary > ( SELECT AVG(amount) FROM schedules AS vmob WHERE vmob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "schedules", "outer_alias": "fal", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10040
train
v2
Schema: projects (alias: uliv)(status, name, salary, type) invoices(value, date, code, level) Task: Find name from projects where a matching record exists in invoices with the same status. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.status = uliv.status );
{ "outer_table": "projects", "inner_table": "invoices", "outer_alias": "uliv", "inner_alias": "fal", "proj_col": "name", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10041
train
v2
Schema: regions (alias: okiv)(code, salary, amount, value) managers(date, salary, code, amount) Task: Retrieve value from regions that have at least one corresponding entry in managers sharing the same level. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = okiv.level );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "okiv", "inner_alias": "hac", "proj_col": "value", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10042
train
v1
Schema: invoices (alias: fal)(id, type, amount, code) transactions(code, id, name, amount) Task: Select id from invoices where code exists in transactions for the same status. SQL:
SELECT id FROM invoices AS fal WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.status = fal.status );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "id", "filter_col": "code", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10043
train
v3
Schema: employees (alias: bev)(level, type, amount, date) departments(status, name, amount, salary) Task: Retrieve value from employees with amount above the SUM(value) of departments rows sharing the same status. SQL:
SELECT value FROM employees AS bev WHERE amount > ( SELECT SUM(value) FROM departments AS dov WHERE dov.status = bev.status );
{ "outer_table": "employees", "inner_table": "departments", "outer_alias": "bev", "inner_alias": "dov", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10044
train
v2
Schema: orders (alias: kab)(date, name, level, id) employees(amount, value, id, type) Task: Retrieve value from orders that have at least one corresponding entry in employees sharing the same status. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = kab.status );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "value", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10045
train
v2
Schema: products (alias: nad)(amount, level, date, value) items(level, value, date, amount) Task: Find value from products where a matching record exists in items with the same id. SQL:
SELECT value FROM products AS nad WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.id = nad.id );
{ "outer_table": "products", "inner_table": "items", "outer_alias": "nad", "inner_alias": "ikob", "proj_col": "value", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10046
train
v2
Schema: departments (alias: dov)(date, code, salary, id) products(type, date, level, amount) Task: Retrieve id from departments that have at least one corresponding entry in products sharing the same type. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = dov.type );
{ "outer_table": "departments", "inner_table": "products", "outer_alias": "dov", "inner_alias": "nad", "proj_col": "id", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10047
train
v2
Schema: customers (alias: lex)(date, type, id, level) products(status, code, id, date) Task: Retrieve salary from customers that have at least one corresponding entry in products sharing the same status. SQL:
SELECT salary FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = lex.status );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "salary", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10048
train
v1
Schema: projects (alias: uliv)(level, code, date, status) employees(status, name, date, amount) Task: Select salary from projects where status exists in employees for the same code. SQL:
SELECT salary FROM projects AS uliv WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.code = uliv.code );
{ "outer_table": "projects", "inner_table": "employees", "outer_alias": "uliv", "inner_alias": "bev", "proj_col": "salary", "filter_col": "status", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10049
train
v3
Schema: categories (alias: egiv)(status, salary, code, date) customers(value, type, id, level) Task: Retrieve salary from categories with value above the MAX(value) of customers rows sharing the same status. SQL:
SELECT salary FROM categories AS egiv WHERE value > ( SELECT MAX(value) FROM customers AS lex WHERE lex.status = egiv.status );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10050
train
v2
Schema: orders (alias: kab)(value, level, salary, date) branches(name, value, salary, type) Task: Retrieve value from orders that have at least one corresponding entry in branches sharing the same status. SQL:
SELECT value 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": "value", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10051
train
v2
Schema: managers (alias: hac)(salary, type, name, amount) projects(type, value, level, name) Task: Find name from managers where a matching record exists in projects with the same type. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = hac.type );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "hac", "inner_alias": "uliv", "proj_col": "name", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10052
train
v3
Schema: requests (alias: ejof)(salary, type, date, id) managers(type, name, salary, amount) Task: Retrieve amount from requests with value above the AVG(amount) of managers rows sharing the same id. SQL:
SELECT amount FROM requests AS ejof WHERE value > ( SELECT AVG(amount) FROM managers AS hac WHERE hac.id = ejof.id );
{ "outer_table": "requests", "inner_table": "managers", "outer_alias": "ejof", "inner_alias": "hac", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10053
train
v2
Schema: transactions (alias: gev)(status, name, id, salary) categories(value, amount, date, salary) Task: Find name from transactions where a matching record exists in categories with the same code. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = gev.code );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "name", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10054
train
v2
Schema: projects (alias: uliv)(type, level, salary, date) accounts(level, status, code, value) Task: Find salary from projects where a matching record exists in accounts with the same level. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = uliv.level );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "salary", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_10055
train
v2
Schema: regions (alias: okiv)(code, amount, id, date) requests(salary, amount, status, id) Task: Find code from regions where a matching record exists in requests with the same level. SQL:
SELECT code FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.level = okiv.level );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "code", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10056
train
v3
Schema: transactions (alias: gev)(name, date, salary, level) sales(date, salary, id, code) Task: Retrieve amount from transactions with salary above the COUNT(value) of sales rows sharing the same level. SQL:
SELECT amount FROM transactions AS gev WHERE salary > ( SELECT COUNT(value) FROM sales AS cif WHERE cif.level = gev.level );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10057
train
v3
Schema: staff (alias: xnob)(salary, name, amount, value) regions(date, type, salary, level) Task: Retrieve amount from staff with value above the MIN(salary) of regions rows sharing the same id. SQL:
SELECT amount FROM staff AS xnob WHERE value > ( SELECT MIN(salary) FROM regions AS okiv WHERE okiv.id = xnob.id );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10058
train
v1
Schema: accounts (alias: jac)(status, code, type, amount) managers(level, code, value, name) Task: Retrieve salary from accounts whose code is found in managers rows where type matches the outer record. SQL:
SELECT salary FROM accounts AS jac WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.type = jac.type );
{ "outer_table": "accounts", "inner_table": "managers", "outer_alias": "jac", "inner_alias": "hac", "proj_col": "salary", "filter_col": "code", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10059
train
v3
Schema: requests (alias: ejof)(name, id, salary, type) categories(name, code, date, level) Task: Find amount from requests where salary exceeds the maximum salary from categories for the same level. SQL:
SELECT amount FROM requests AS ejof WHERE salary > ( SELECT MAX(salary) FROM categories AS egiv WHERE egiv.level = ejof.level );
{ "outer_table": "requests", "inner_table": "categories", "outer_alias": "ejof", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10060
train
v1
Schema: staff (alias: xnob)(id, type, amount, status) shipments(status, value, code, level) Task: Retrieve amount from staff whose type is found in shipments rows where status matches the outer record. SQL:
SELECT amount FROM staff AS xnob WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "type", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10061
train
v3
Schema: staff (alias: xnob)(salary, code, name, date) regions(code, level, amount, value) Task: Find value from staff where amount exceeds the average value from regions for the same type. SQL:
SELECT value FROM staff AS xnob WHERE amount > ( SELECT AVG(value) FROM regions AS okiv WHERE okiv.type = xnob.type );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10062
train
v3
Schema: employees (alias: bev)(type, amount, date, status) sales(date, amount, level, status) Task: Retrieve name from employees with value above the SUM(value) of sales rows sharing the same status. SQL:
SELECT name FROM employees AS bev WHERE value > ( SELECT SUM(value) FROM sales AS cif WHERE cif.status = bev.status );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10063
train
v1
Schema: requests (alias: ejof)(date, code, status, id) orders(level, code, salary, amount) Task: Find value from requests where id appears in orders entries with matching level. SQL:
SELECT value FROM requests AS ejof WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.level = ejof.level );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10064
train
v3
Schema: schedules (alias: vmob)(code, date, amount, value) sales(value, status, type, id) Task: Retrieve salary from schedules with salary above the AVG(value) of sales rows sharing the same level. SQL:
SELECT salary FROM schedules AS vmob WHERE salary > ( SELECT AVG(value) FROM sales AS cif WHERE cif.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "vmob", "inner_alias": "cif", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10065
train
v2
Schema: categories (alias: egiv)(salary, code, value, status) transactions(status, salary, amount, id) Task: Find name from categories where a matching record exists in transactions with the same status. SQL:
SELECT name FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = egiv.status );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "egiv", "inner_alias": "gev", "proj_col": "name", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10066
train
v2
Schema: departments (alias: dov)(date, level, id, salary) branches(status, amount, value, name) Task: Find code from departments where a matching record exists in branches with the same level. SQL:
SELECT code FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.level = dov.level );
{ "outer_table": "departments", "inner_table": "branches", "outer_alias": "dov", "inner_alias": "agov", "proj_col": "code", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10067
train
v2
Schema: orders (alias: kab)(name, level, value, salary) shipments(name, id, date, value) Task: Retrieve salary from orders that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = kab.code );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "salary", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10068
train
v2
Schema: items (alias: ikob)(name, id, code, value) staff(date, salary, type, id) Task: Retrieve amount from items that have at least one corresponding entry in staff sharing the same id. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = ikob.id );
{ "outer_table": "items", "inner_table": "staff", "outer_alias": "ikob", "inner_alias": "xnob", "proj_col": "amount", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_10069
train
v2
Schema: schedules (alias: vmob)(status, type, salary, level) branches(name, code, date, level) Task: Find salary from schedules where a matching record exists in branches with the same type. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "branches", "outer_alias": "vmob", "inner_alias": "agov", "proj_col": "salary", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10070
train
v2
Schema: sales (alias: cif)(salary, type, status, value) requests(salary, code, id, type) Task: Retrieve name from sales that have at least one corresponding entry in requests sharing the same level. SQL:
SELECT name FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.level = cif.level );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "name", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10071
train
v2
Schema: categories (alias: egiv)(name, code, salary, status) items(date, amount, value, id) Task: Find amount from categories where a matching record exists in items with the same type. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "items", "outer_alias": "egiv", "inner_alias": "ikob", "proj_col": "amount", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_10072
train
v3
Schema: orders (alias: kab)(code, type, name, salary) managers(salary, date, type, status) Task: Retrieve value from orders with amount above the MIN(salary) of managers rows sharing the same code. SQL:
SELECT value FROM orders AS kab WHERE amount > ( SELECT MIN(salary) FROM managers AS hac WHERE hac.code = kab.code );
{ "outer_table": "orders", "inner_table": "managers", "outer_alias": "kab", "inner_alias": "hac", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10073
train
v3
Schema: managers (alias: hac)(id, code, type, level) accounts(id, value, type, code) Task: Retrieve id from managers with amount above the SUM(amount) of accounts rows sharing the same id. SQL:
SELECT id FROM managers AS hac WHERE amount > ( SELECT SUM(amount) FROM accounts AS jac WHERE jac.id = hac.id );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10074
train
v2
Schema: customers (alias: lex)(amount, level, salary, value) shipments(date, code, name, status) Task: Find id from customers where a matching record exists in shipments with the same status. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.status = lex.status );
{ "outer_table": "customers", "inner_table": "shipments", "outer_alias": "lex", "inner_alias": "vnob", "proj_col": "id", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10075
train
v2
Schema: customers (alias: lex)(date, value, amount, status) accounts(date, code, salary, type) Task: Retrieve salary from customers that have at least one corresponding entry in accounts sharing the same level. SQL:
SELECT salary FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = lex.level );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "lex", "inner_alias": "jac", "proj_col": "salary", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10076
train
v3
Schema: staff (alias: xnob)(value, type, code, id) departments(amount, status, level, type) Task: Retrieve code from staff with salary above the MIN(amount) of departments rows sharing the same code. SQL:
SELECT code FROM staff AS xnob WHERE salary > ( SELECT MIN(amount) FROM departments AS dov WHERE dov.code = xnob.code );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10077
train
v2
Schema: transactions (alias: gev)(level, id, status, type) branches(type, code, level, salary) Task: Retrieve code from transactions that have at least one corresponding entry in branches sharing the same status. SQL:
SELECT code FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = gev.status );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "gev", "inner_alias": "agov", "proj_col": "code", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10078
train
v2
Schema: regions (alias: okiv)(status, date, type, id) customers(date, level, type, id) Task: Find name from regions where a matching record exists in customers with the same id. SQL:
SELECT name FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = okiv.id );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "name", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10079
train
v3
Schema: products (alias: nad)(value, status, name, amount) employees(status, salary, value, amount) Task: Retrieve value from products with salary above the AVG(salary) of employees rows sharing the same status. SQL:
SELECT value FROM products AS nad WHERE salary > ( SELECT AVG(salary) FROM employees AS bev WHERE bev.status = nad.status );
{ "outer_table": "products", "inner_table": "employees", "outer_alias": "nad", "inner_alias": "bev", "proj_col": "value", "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_10080
train
v3
Schema: employees (alias: bev)(amount, code, salary, value) accounts(code, type, status, salary) Task: Find amount from employees where salary exceeds the minimum salary from accounts for the same status. SQL:
SELECT amount FROM employees AS bev WHERE salary > ( SELECT MIN(salary) FROM accounts AS jac WHERE jac.status = bev.status );
{ "outer_table": "employees", "inner_table": "accounts", "outer_alias": "bev", "inner_alias": "jac", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10081
train
v2
Schema: products (alias: nad)(type, level, id, name) invoices(status, id, level, amount) Task: Retrieve code from products that have at least one corresponding entry in invoices sharing the same type. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = nad.type );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "code", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10082
train
v2
Schema: regions (alias: okiv)(name, amount, level, id) items(name, salary, type, id) Task: Retrieve value from regions that have at least one corresponding entry in items sharing the same code. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = okiv.code );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "value", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10083
train
v1
Schema: accounts (alias: jac)(status, code, level, amount) sales(level, type, code, date) Task: Retrieve code from accounts whose code is found in sales rows where level matches the outer record. SQL:
SELECT code FROM accounts AS jac WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.level = jac.level );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10084
train
v3
Schema: accounts (alias: jac)(type, date, code, salary) customers(type, value, name, level) Task: Find name from accounts where salary exceeds the minimum amount from customers for the same status. SQL:
SELECT name FROM accounts AS jac WHERE salary > ( SELECT MIN(amount) FROM customers AS lex WHERE lex.status = jac.status );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10085
train
v1
Schema: managers (alias: hac)(name, amount, code, level) orders(code, name, amount, id) Task: Find value from managers where id appears in orders entries with matching code. SQL:
SELECT value FROM managers AS hac WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.code = hac.code );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "value", "filter_col": "id", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10086
train
v2
Schema: tasks (alias: znob)(value, level, date, status) projects(status, salary, id, level) Task: Retrieve id from tasks that have at least one corresponding entry in projects sharing the same id. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.id = znob.id );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "id", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10087
train
v2
Schema: tasks (alias: znob)(status, type, code, date) managers(value, id, salary, type) Task: Find amount from tasks where a matching record exists in managers with the same id. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = znob.id );
{ "outer_table": "tasks", "inner_table": "managers", "outer_alias": "znob", "inner_alias": "hac", "proj_col": "amount", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10088
train
v1
Schema: regions (alias: okiv)(id, status, salary, type) shipments(name, salary, amount, date) Task: Find name from regions where type appears in shipments entries with matching type. SQL:
SELECT name FROM regions AS okiv WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.type = okiv.type );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "okiv", "inner_alias": "vnob", "proj_col": "name", "filter_col": "type", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10089
train
v1
Schema: tasks (alias: znob)(salary, name, date, value) schedules(id, status, date, code) Task: Find amount from tasks where type appears in schedules entries with matching status. SQL:
SELECT amount FROM tasks AS znob WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "type", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_10090
train
v3
Schema: requests (alias: ejof)(name, status, value, id) departments(date, level, code, type) Task: Retrieve salary from requests with amount above the COUNT(amount) of departments rows sharing the same code. SQL:
SELECT salary FROM requests AS ejof WHERE amount > ( SELECT COUNT(amount) FROM departments AS dov WHERE dov.code = ejof.code );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10091
train
v2
Schema: requests (alias: ejof)(code, type, name, salary) regions(name, status, level, amount) Task: Find name from requests where a matching record exists in regions with the same code. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "regions", "outer_alias": "ejof", "inner_alias": "okiv", "proj_col": "name", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_10092
train
v1
Schema: regions (alias: okiv)(value, id, salary, name) departments(amount, level, id, value) Task: Find salary from regions where code appears in departments entries with matching status. SQL:
SELECT salary FROM regions AS okiv WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.status = okiv.status );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "okiv", "inner_alias": "dov", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_10093
train
v2
Schema: staff (alias: xnob)(code, id, name, value) accounts(salary, amount, status, name) Task: Find value from staff where a matching record exists in accounts with the same level. SQL:
SELECT value FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = xnob.level );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "value", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_10094
train
v1
Schema: schedules (alias: vmob)(name, status, id, code) categories(code, type, date, level) Task: Find code from schedules where level appears in categories entries with matching id. SQL:
SELECT code FROM schedules AS vmob WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "code", "filter_col": "level", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10095
train
v3
Schema: schedules (alias: vmob)(salary, value, status, code) departments(level, code, id, name) Task: Find value from schedules where salary exceeds the average salary from departments for the same id. SQL:
SELECT value FROM schedules AS vmob WHERE salary > ( SELECT AVG(salary) FROM departments AS dov WHERE dov.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "vmob", "inner_alias": "dov", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_10096
train
v3
Schema: managers (alias: hac)(name, amount, date, salary) regions(level, id, status, name) Task: Find name from managers where salary exceeds the minimum salary from regions for the same code. SQL:
SELECT name FROM managers AS hac WHERE salary > ( SELECT MIN(salary) FROM regions AS okiv WHERE okiv.code = hac.code );
{ "outer_table": "managers", "inner_table": "regions", "outer_alias": "hac", "inner_alias": "okiv", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10097
train
v2
Schema: branches (alias: agov)(status, level, salary, name) staff(status, date, salary, name) Task: Find id from branches where a matching record exists in staff with the same code. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = agov.code );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "id", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_10098
train
v1
Schema: sales (alias: cif)(level, code, status, date) requests(id, name, code, date) Task: Retrieve amount from sales whose status is found in requests rows where id matches the outer record. SQL:
SELECT amount FROM sales AS cif WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.id = cif.id );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_10099
train