variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v3
Schema: accounts (alias: jac)(id, amount, name, level) sales(type, level, salary, name) Task: Retrieve code from accounts with salary above the SUM(amount) of sales rows sharing the same level. SQL:
SELECT code FROM accounts AS jac WHERE salary > ( SELECT SUM(amount) 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": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04600
train
v2
Schema: regions (alias: okiv)(date, type, amount, name) categories(code, status, level, name) Task: Find amount from regions where a matching record exists in categories with the same id. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.id = okiv.id );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "amount", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04601
train
v1
Schema: branches (alias: agov)(amount, name, status, salary) projects(type, id, status, date) Task: Select code from branches where code exists in projects for the same id. SQL:
SELECT code FROM branches AS agov WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.id = agov.id );
{ "outer_table": "branches", "inner_table": "projects", "outer_alias": "agov", "inner_alias": "uliv", "proj_col": "code", "filter_col": "code", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04602
train
v2
Schema: orders (alias: kab)(status, amount, type, date) departments(id, value, date, salary) Task: Find id from orders where a matching record exists in departments with the same level. SQL:
SELECT id FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = kab.level );
{ "outer_table": "orders", "inner_table": "departments", "outer_alias": "kab", "inner_alias": "dov", "proj_col": "id", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04603
train
v3
Schema: customers (alias: lex)(level, date, code, value) regions(type, id, salary, level) Task: Find amount from customers where value exceeds the average salary from regions for the same level. SQL:
SELECT amount FROM customers AS lex WHERE value > ( SELECT AVG(salary) FROM regions AS okiv WHERE okiv.level = lex.level );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04604
train
v3
Schema: sales (alias: cif)(level, code, name, salary) departments(name, type, level, status) Task: Retrieve name from sales with value above the AVG(amount) of departments rows sharing the same type. SQL:
SELECT name FROM sales AS cif WHERE value > ( SELECT AVG(amount) FROM departments AS dov WHERE dov.type = cif.type );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04605
train
v3
Schema: products (alias: nad)(status, code, type, name) transactions(amount, name, date, code) Task: Retrieve name from products with salary above the MIN(value) of transactions rows sharing the same type. SQL:
SELECT name FROM products AS nad WHERE salary > ( SELECT MIN(value) FROM transactions AS gev WHERE gev.type = nad.type );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04606
train
v3
Schema: schedules (alias: vmob)(name, amount, status, level) invoices(status, id, code, date) Task: Find value from schedules where salary exceeds the total value from invoices for the same status. SQL:
SELECT value FROM schedules AS vmob WHERE salary > ( SELECT SUM(value) FROM invoices AS fal WHERE fal.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "invoices", "outer_alias": "vmob", "inner_alias": "fal", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04607
train
v1
Schema: branches (alias: agov)(code, salary, status, level) products(level, name, type, status) Task: Find value from branches where status appears in products entries with matching id. SQL:
SELECT value FROM branches AS agov WHERE status IN ( SELECT status FROM products AS nad WHERE nad.id = agov.id );
{ "outer_table": "branches", "inner_table": "products", "outer_alias": "agov", "inner_alias": "nad", "proj_col": "value", "filter_col": "status", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04608
train
v1
Schema: branches (alias: agov)(name, level, salary, date) items(status, id, salary, value) Task: Retrieve id from branches whose id is found in items rows where level matches the outer record. SQL:
SELECT id FROM branches AS agov WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.level = agov.level );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "id", "filter_col": "id", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04609
train
v2
Schema: orders (alias: kab)(type, code, status, date) invoices(id, value, salary, level) Task: Find amount from orders where a matching record exists in invoices with the same level. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = kab.level );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "kab", "inner_alias": "fal", "proj_col": "amount", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04610
train
v3
Schema: departments (alias: dov)(status, code, type, amount) requests(type, code, salary, level) Task: Retrieve amount from departments with amount above the MIN(amount) of requests rows sharing the same code. SQL:
SELECT amount FROM departments AS dov WHERE amount > ( SELECT MIN(amount) FROM requests AS ejof WHERE ejof.code = dov.code );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04611
train
v3
Schema: items (alias: ikob)(salary, date, amount, status) products(status, type, id, code) Task: Retrieve name from items with salary above the COUNT(salary) of products rows sharing the same level. SQL:
SELECT name FROM items AS ikob WHERE salary > ( SELECT COUNT(salary) FROM products AS nad WHERE nad.level = ikob.level );
{ "outer_table": "items", "inner_table": "products", "outer_alias": "ikob", "inner_alias": "nad", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04612
train
v2
Schema: categories (alias: egiv)(value, code, date, id) staff(name, salary, status, amount) Task: Retrieve code from categories that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = egiv.level );
{ "outer_table": "categories", "inner_table": "staff", "outer_alias": "egiv", "inner_alias": "xnob", "proj_col": "code", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_04613
train
v1
Schema: products (alias: nad)(status, id, value, salary) regions(code, type, status, salary) Task: Find name from products where status appears in regions entries with matching status. SQL:
SELECT name FROM products AS nad WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.status = nad.status );
{ "outer_table": "products", "inner_table": "regions", "outer_alias": "nad", "inner_alias": "okiv", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04614
train
v3
Schema: customers (alias: lex)(id, type, value, level) invoices(amount, date, code, type) Task: Retrieve id from customers with amount above the MIN(value) of invoices rows sharing the same type. SQL:
SELECT id FROM customers AS lex WHERE amount > ( SELECT MIN(value) FROM invoices AS fal WHERE fal.type = lex.type );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "lex", "inner_alias": "fal", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04615
train
v1
Schema: items (alias: ikob)(id, code, name, value) orders(amount, level, name, id) Task: Select id from items where id exists in orders for the same type. SQL:
SELECT id FROM items AS ikob WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.type = ikob.type );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04616
train
v2
Schema: customers (alias: lex)(value, name, amount, status) sales(type, salary, level, date) Task: Retrieve amount from customers that have at least one corresponding entry in sales sharing the same type. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = lex.type );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "amount", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04617
train
v2
Schema: projects (alias: uliv)(name, type, level, status) tasks(amount, level, value, status) Task: Retrieve name from projects that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = uliv.status );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "uliv", "inner_alias": "znob", "proj_col": "name", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04618
train
v2
Schema: items (alias: ikob)(level, name, value, code) tasks(amount, level, type, status) Task: Find code from items where a matching record exists in tasks with the same status. SQL:
SELECT code FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = ikob.status );
{ "outer_table": "items", "inner_table": "tasks", "outer_alias": "ikob", "inner_alias": "znob", "proj_col": "code", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04619
train
v3
Schema: items (alias: ikob)(id, amount, level, value) employees(level, type, name, salary) Task: Find name from items where value exceeds the total amount from employees for the same type. SQL:
SELECT name FROM items AS ikob WHERE value > ( SELECT SUM(amount) FROM employees AS bev WHERE bev.type = ikob.type );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04620
train
v1
Schema: customers (alias: lex)(status, date, code, amount) categories(code, status, id, type) Task: Find value from customers where code appears in categories entries with matching type. SQL:
SELECT value FROM customers AS lex WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.type = lex.type );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04621
train
v3
Schema: invoices (alias: fal)(name, amount, id, status) branches(status, date, name, amount) Task: Find code from invoices where amount exceeds the count of salary from branches for the same status. SQL:
SELECT code FROM invoices AS fal WHERE amount > ( SELECT COUNT(salary) FROM branches AS agov WHERE agov.status = fal.status );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04622
train
v3
Schema: products (alias: nad)(amount, salary, code, id) invoices(name, salary, date, code) Task: Find value from products where amount exceeds the total value from invoices for the same id. SQL:
SELECT value FROM products AS nad WHERE amount > ( SELECT SUM(value) FROM invoices AS fal WHERE fal.id = nad.id );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04623
train
v3
Schema: tasks (alias: znob)(level, name, status, date) shipments(salary, name, type, status) Task: Find name from tasks where salary exceeds the maximum value from shipments for the same type. SQL:
SELECT name FROM tasks AS znob WHERE salary > ( SELECT MAX(value) FROM shipments AS vnob WHERE vnob.type = znob.type );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04624
train
v3
Schema: customers (alias: lex)(id, level, name, code) transactions(id, name, type, code) Task: Find salary from customers where value exceeds the maximum amount from transactions for the same code. SQL:
SELECT salary FROM customers AS lex WHERE value > ( SELECT MAX(amount) FROM transactions AS gev WHERE gev.code = lex.code );
{ "outer_table": "customers", "inner_table": "transactions", "outer_alias": "lex", "inner_alias": "gev", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04625
train
v3
Schema: projects (alias: uliv)(value, date, code, type) regions(name, id, code, salary) Task: Retrieve code from projects with amount above the SUM(value) of regions rows sharing the same id. SQL:
SELECT code FROM projects AS uliv WHERE amount > ( SELECT SUM(value) FROM regions AS okiv WHERE okiv.id = uliv.id );
{ "outer_table": "projects", "inner_table": "regions", "outer_alias": "uliv", "inner_alias": "okiv", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04626
train
v1
Schema: shipments (alias: vnob)(salary, status, amount, name) orders(code, type, status, salary) Task: Retrieve code from shipments whose level is found in orders rows where code matches the outer record. SQL:
SELECT code FROM shipments AS vnob WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_04627
train
v2
Schema: managers (alias: hac)(status, amount, name, id) customers(type, id, level, code) Task: Find name from managers where a matching record exists in customers with the same level. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = hac.level );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "name", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04628
train
v1
Schema: requests (alias: ejof)(level, type, salary, value) transactions(status, name, amount, type) Task: Retrieve amount from requests whose level is found in transactions rows where level matches the outer record. SQL:
SELECT amount FROM requests AS ejof WHERE level IN ( SELECT level FROM transactions AS gev WHERE gev.level = ejof.level );
{ "outer_table": "requests", "inner_table": "transactions", "outer_alias": "ejof", "inner_alias": "gev", "proj_col": "amount", "filter_col": "level", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_04629
train
v3
Schema: branches (alias: agov)(amount, code, name, level) accounts(name, date, code, value) Task: Retrieve amount from branches with amount above the MAX(amount) of accounts rows sharing the same level. SQL:
SELECT amount FROM branches AS agov WHERE amount > ( SELECT MAX(amount) FROM accounts AS jac WHERE jac.level = agov.level );
{ "outer_table": "branches", "inner_table": "accounts", "outer_alias": "agov", "inner_alias": "jac", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04630
train
v2
Schema: regions (alias: okiv)(date, type, name, salary) requests(id, code, level, value) Task: Find name from regions where a matching record exists in requests with the same id. SQL:
SELECT name FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = okiv.id );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "name", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04631
train
v3
Schema: branches (alias: agov)(salary, type, level, status) orders(status, type, id, name) Task: Retrieve code from branches with salary above the MIN(amount) of orders rows sharing the same type. SQL:
SELECT code FROM branches AS agov WHERE salary > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.type = agov.type );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04632
train
v3
Schema: staff (alias: xnob)(name, code, value, date) transactions(code, amount, type, level) Task: Retrieve value from staff with amount above the SUM(value) of transactions rows sharing the same type. SQL:
SELECT value FROM staff AS xnob WHERE amount > ( SELECT SUM(value) FROM transactions AS gev WHERE gev.type = xnob.type );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "xnob", "inner_alias": "gev", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_04633
train
v1
Schema: transactions (alias: gev)(date, status, level, code) orders(type, salary, status, id) Task: Retrieve name from transactions whose level is found in orders rows where type matches the outer record. SQL:
SELECT name FROM transactions AS gev WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.type = gev.type );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "gev", "inner_alias": "kab", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04634
train
v2
Schema: projects (alias: uliv)(date, amount, code, value) regions(id, salary, amount, type) Task: Find name from projects where a matching record exists in regions with the same type. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = uliv.type );
{ "outer_table": "projects", "inner_table": "regions", "outer_alias": "uliv", "inner_alias": "okiv", "proj_col": "name", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04635
train
v2
Schema: accounts (alias: jac)(code, amount, name, date) employees(value, id, level, status) Task: Find salary from accounts where a matching record exists in employees with the same type. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.type = jac.type );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "salary", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04636
train
v2
Schema: branches (alias: agov)(salary, type, date, id) regions(amount, id, name, code) Task: Find salary from branches where a matching record exists in regions with the same level. SQL:
SELECT salary FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = agov.level );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "salary", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04637
train
v2
Schema: projects (alias: uliv)(code, name, type, id) accounts(level, value, name, id) Task: Retrieve salary from projects that have at least one corresponding entry in accounts sharing the same type. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = uliv.type );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "salary", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04638
train
v3
Schema: employees (alias: bev)(type, salary, code, id) categories(salary, code, name, status) Task: Retrieve salary from employees with amount above the MAX(amount) of categories rows sharing the same level. SQL:
SELECT salary FROM employees AS bev WHERE amount > ( SELECT MAX(amount) FROM categories AS egiv WHERE egiv.level = bev.level );
{ "outer_table": "employees", "inner_table": "categories", "outer_alias": "bev", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04639
train
v2
Schema: invoices (alias: fal)(code, salary, value, level) departments(salary, date, name, level) Task: Find code from invoices where a matching record exists in departments with the same id. SQL:
SELECT code FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = fal.id );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "code", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04640
train
v3
Schema: products (alias: nad)(status, value, amount, date) shipments(value, salary, date, level) Task: Retrieve name from products with value above the AVG(value) of shipments rows sharing the same level. SQL:
SELECT name FROM products AS nad WHERE value > ( SELECT AVG(value) FROM shipments AS vnob WHERE vnob.level = nad.level );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04641
train
v1
Schema: projects (alias: uliv)(name, salary, type, status) transactions(code, date, value, level) Task: Select amount from projects where id exists in transactions for the same code. SQL:
SELECT amount FROM projects AS uliv WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.code = uliv.code );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04642
train
v1
Schema: transactions (alias: gev)(salary, status, type, amount) employees(name, salary, value, type) Task: Retrieve code from transactions whose status is found in employees rows where id matches the outer record. SQL:
SELECT code FROM transactions AS gev WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.id = gev.id );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "gev", "inner_alias": "bev", "proj_col": "code", "filter_col": "status", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04643
train
v1
Schema: departments (alias: dov)(salary, value, name, amount) projects(id, code, status, level) Task: Select code from departments where code exists in projects for the same code. SQL:
SELECT code FROM departments AS dov WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.code = dov.code );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04644
train
v3
Schema: accounts (alias: jac)(id, amount, code, status) shipments(amount, id, value, level) Task: Retrieve value from accounts with salary above the MAX(salary) of shipments rows sharing the same level. SQL:
SELECT value FROM accounts AS jac WHERE salary > ( SELECT MAX(salary) FROM shipments AS vnob WHERE vnob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04645
train
v3
Schema: sales (alias: cif)(status, id, level, amount) projects(id, value, status, type) Task: Retrieve id from sales with amount above the COUNT(amount) of projects rows sharing the same code. SQL:
SELECT id FROM sales AS cif WHERE amount > ( SELECT COUNT(amount) FROM projects AS uliv WHERE uliv.code = cif.code );
{ "outer_table": "sales", "inner_table": "projects", "outer_alias": "cif", "inner_alias": "uliv", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04646
train
v2
Schema: regions (alias: okiv)(amount, code, salary, level) schedules(name, id, salary, date) Task: Find salary from regions where a matching record exists in schedules with the same status. SQL:
SELECT salary 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": "salary", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04647
train
v2
Schema: categories (alias: egiv)(level, type, salary, value) products(code, id, status, type) Task: Find code from categories where a matching record exists in products with the same code. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = egiv.code );
{ "outer_table": "categories", "inner_table": "products", "outer_alias": "egiv", "inner_alias": "nad", "proj_col": "code", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_04648
train
v2
Schema: departments (alias: dov)(level, name, value, salary) projects(date, type, value, salary) Task: Find code from departments where a matching record exists in projects with the same code. SQL:
SELECT code FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = dov.code );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "code", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04649
train
v1
Schema: employees (alias: bev)(code, id, name, status) shipments(status, code, date, id) Task: Find code from employees where id appears in shipments entries with matching status. SQL:
SELECT code FROM employees AS bev WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.status = bev.status );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04650
train
v2
Schema: transactions (alias: gev)(salary, id, name, value) departments(level, amount, value, id) Task: Find value from transactions where a matching record exists in departments with the same type. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = gev.type );
{ "outer_table": "transactions", "inner_table": "departments", "outer_alias": "gev", "inner_alias": "dov", "proj_col": "value", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04651
train
v3
Schema: customers (alias: lex)(salary, level, date, status) orders(date, level, code, salary) Task: Find code from customers where value exceeds the minimum amount from orders for the same level. SQL:
SELECT code FROM customers AS lex WHERE value > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.level = lex.level );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "lex", "inner_alias": "kab", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04652
train
v3
Schema: managers (alias: hac)(amount, code, level, type) accounts(code, amount, salary, value) Task: Retrieve code from managers with value above the AVG(value) of accounts rows sharing the same status. SQL:
SELECT code FROM managers AS hac WHERE value > ( SELECT AVG(value) FROM accounts AS jac WHERE jac.status = hac.status );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04653
train
v3
Schema: products (alias: nad)(date, code, salary, level) accounts(level, salary, type, code) Task: Find id from products where salary exceeds the total salary from accounts for the same level. SQL:
SELECT id FROM products AS nad WHERE salary > ( SELECT SUM(salary) FROM accounts AS jac WHERE jac.level = nad.level );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04654
train
v2
Schema: items (alias: ikob)(status, id, value, date) staff(id, type, date, name) Task: Find name from items where a matching record exists in staff with the same type. SQL:
SELECT name FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.type = ikob.type );
{ "outer_table": "items", "inner_table": "staff", "outer_alias": "ikob", "inner_alias": "xnob", "proj_col": "name", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04655
train
v1
Schema: tasks (alias: znob)(date, value, salary, code) projects(id, salary, status, value) Task: Find amount from tasks where level appears in projects entries with matching code. SQL:
SELECT amount FROM tasks AS znob WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.code = znob.code );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04656
train
v1
Schema: requests (alias: ejof)(level, name, salary, value) tasks(code, value, date, salary) Task: Select amount from requests where type exists in tasks for the same code. SQL:
SELECT amount FROM requests AS ejof WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_04657
train
v3
Schema: branches (alias: agov)(date, level, code, amount) orders(type, status, level, value) Task: Find amount from branches where salary exceeds the average value from orders for the same level. SQL:
SELECT amount FROM branches AS agov WHERE salary > ( SELECT AVG(value) FROM orders AS kab WHERE kab.level = agov.level );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04658
train
v3
Schema: shipments (alias: vnob)(date, type, code, level) sales(name, value, type, level) Task: Find name from shipments where salary exceeds the count of value from sales for the same code. SQL:
SELECT name FROM shipments AS vnob WHERE salary > ( SELECT COUNT(value) FROM sales AS cif WHERE cif.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_04659
train
v3
Schema: regions (alias: okiv)(value, type, level, code) staff(amount, code, value, status) Task: Find name from regions where salary exceeds the minimum amount from staff for the same level. SQL:
SELECT name FROM regions AS okiv WHERE salary > ( SELECT MIN(amount) FROM staff AS xnob WHERE xnob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "okiv", "inner_alias": "xnob", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04660
train
v1
Schema: employees (alias: bev)(value, code, name, level) items(name, code, value, amount) Task: Retrieve code from employees whose status is found in items rows where code matches the outer record. SQL:
SELECT code FROM employees AS bev WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.code = bev.code );
{ "outer_table": "employees", "inner_table": "items", "outer_alias": "bev", "inner_alias": "ikob", "proj_col": "code", "filter_col": "status", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04661
train
v3
Schema: items (alias: ikob)(id, code, name, status) shipments(value, amount, date, status) Task: Retrieve amount from items with salary above the MAX(amount) of shipments rows sharing the same id. SQL:
SELECT amount FROM items AS ikob WHERE salary > ( SELECT MAX(amount) FROM shipments AS vnob WHERE vnob.id = ikob.id );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04662
train
v3
Schema: accounts (alias: jac)(type, status, salary, date) items(status, name, date, level) Task: Find name from accounts where salary exceeds the count of salary from items for the same type. SQL:
SELECT name FROM accounts AS jac WHERE salary > ( SELECT COUNT(salary) FROM items AS ikob WHERE ikob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04663
train
v1
Schema: branches (alias: agov)(salary, amount, status, code) invoices(name, salary, type, date) Task: Find amount from branches where level appears in invoices entries with matching status. SQL:
SELECT amount FROM branches AS agov WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.status = agov.status );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04664
train
v3
Schema: requests (alias: ejof)(name, code, salary, value) items(code, level, type, name) Task: Find name from requests where salary exceeds the maximum value from items for the same code. SQL:
SELECT name FROM requests AS ejof WHERE salary > ( SELECT MAX(value) FROM items AS ikob WHERE ikob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "items", "outer_alias": "ejof", "inner_alias": "ikob", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_04665
train
v3
Schema: employees (alias: bev)(amount, date, id, salary) orders(code, value, status, date) Task: Find name from employees where value exceeds the count of salary from orders for the same id. SQL:
SELECT name FROM employees AS bev WHERE value > ( SELECT COUNT(salary) FROM orders AS kab WHERE kab.id = bev.id );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04666
train
v1
Schema: products (alias: nad)(status, amount, date, value) departments(amount, code, status, level) Task: Select id from products where type exists in departments for the same status. SQL:
SELECT id FROM products AS nad WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.status = nad.status );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04667
train
v1
Schema: shipments (alias: vnob)(amount, code, name, type) transactions(amount, code, value, name) Task: Select value from shipments where type exists in transactions for the same type. SQL:
SELECT value FROM shipments AS vnob WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "transactions", "outer_alias": "vnob", "inner_alias": "gev", "proj_col": "value", "filter_col": "type", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_04668
train
v3
Schema: shipments (alias: vnob)(type, level, amount, salary) departments(name, level, amount, date) Task: Find value from shipments where salary exceeds the average salary from departments for the same status. SQL:
SELECT value FROM shipments AS vnob WHERE salary > ( SELECT AVG(salary) FROM departments AS dov WHERE dov.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_04669
train
v3
Schema: orders (alias: kab)(value, date, level, type) accounts(type, status, amount, value) Task: Find name from orders where amount exceeds the average salary from accounts for the same id. SQL:
SELECT name FROM orders AS kab WHERE amount > ( SELECT AVG(salary) FROM accounts AS jac WHERE jac.id = kab.id );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "kab", "inner_alias": "jac", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04670
train
v1
Schema: sales (alias: cif)(value, status, salary, code) managers(value, name, type, salary) Task: Select code from sales where id exists in managers for the same code. SQL:
SELECT code FROM sales AS cif WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.code = cif.code );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "cif", "inner_alias": "hac", "proj_col": "code", "filter_col": "id", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04671
train
v1
Schema: departments (alias: dov)(name, salary, id, value) accounts(type, salary, level, name) Task: Find amount from departments where type appears in accounts entries with matching status. SQL:
SELECT amount FROM departments AS dov WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.status = dov.status );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "amount", "filter_col": "type", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04672
train
v2
Schema: managers (alias: hac)(value, id, name, level) accounts(amount, code, id, status) Task: Find code from managers where a matching record exists in accounts with the same status. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = hac.status );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "code", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04673
train
v2
Schema: projects (alias: uliv)(level, value, date, name) orders(status, type, code, salary) Task: Find value from projects where a matching record exists in orders with the same id. SQL:
SELECT value FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = uliv.id );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "value", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04674
train
v3
Schema: sales (alias: cif)(salary, value, code, type) products(amount, value, code, salary) Task: Find value from sales where value exceeds the maximum amount from products for the same type. SQL:
SELECT value FROM sales AS cif WHERE value > ( SELECT MAX(amount) FROM products AS nad WHERE nad.type = cif.type );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04675
train
v2
Schema: managers (alias: hac)(name, type, status, level) employees(type, date, level, salary) Task: Retrieve code from managers that have at least one corresponding entry in employees sharing the same status. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = hac.status );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "code", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04676
train
v3
Schema: requests (alias: ejof)(name, status, id, type) orders(status, code, value, id) Task: Retrieve name from requests with value above the MAX(amount) of orders rows sharing the same status. SQL:
SELECT name FROM requests AS ejof WHERE value > ( SELECT MAX(amount) FROM orders AS kab WHERE kab.status = ejof.status );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_04677
train
v1
Schema: shipments (alias: vnob)(amount, id, name, level) products(value, status, id, salary) Task: Select name from shipments where level exists in products for the same level. SQL:
SELECT name FROM shipments AS vnob WHERE level IN ( SELECT level FROM products AS nad WHERE nad.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "name", "filter_col": "level", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_04678
train
v2
Schema: projects (alias: uliv)(value, amount, level, status) schedules(code, salary, id, type) Task: Find amount from projects where a matching record exists in schedules with the same code. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "amount", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04679
train
v1
Schema: customers (alias: lex)(level, id, status, date) accounts(type, status, id, level) Task: Retrieve amount from customers whose id is found in accounts rows where type matches the outer record. SQL:
SELECT amount FROM customers AS lex WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.type = lex.type );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "lex", "inner_alias": "jac", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04680
train
v1
Schema: accounts (alias: jac)(name, type, id, date) departments(amount, name, code, id) Task: Select name from accounts where level exists in departments for the same code. SQL:
SELECT name FROM accounts AS jac WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.code = jac.code );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04681
train
v2
Schema: schedules (alias: vmob)(name, type, level, id) tasks(amount, salary, name, value) Task: Find code from schedules where a matching record exists in tasks with the same id. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "code", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04682
train
v1
Schema: transactions (alias: gev)(type, value, date, salary) requests(date, code, status, id) Task: Select salary from transactions where code exists in requests for the same type. SQL:
SELECT salary FROM transactions AS gev WHERE code IN ( SELECT code FROM requests AS ejof WHERE ejof.type = gev.type );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "code", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04683
train
v3
Schema: employees (alias: bev)(value, salary, code, date) requests(code, id, type, salary) Task: Retrieve id from employees with amount above the MAX(amount) of requests rows sharing the same status. SQL:
SELECT id FROM employees AS bev WHERE amount > ( SELECT MAX(amount) FROM requests AS ejof WHERE ejof.status = bev.status );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04684
train
v3
Schema: managers (alias: hac)(salary, type, status, date) accounts(id, level, code, status) Task: Find salary from managers where amount exceeds the average value from accounts for the same code. SQL:
SELECT salary FROM managers AS hac WHERE amount > ( SELECT AVG(value) FROM accounts AS jac WHERE jac.code = hac.code );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04685
train
v1
Schema: employees (alias: bev)(level, code, date, salary) orders(code, value, name, id) Task: Find code from employees where code appears in orders entries with matching type. SQL:
SELECT code FROM employees AS bev WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.type = bev.type );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "code", "filter_col": "code", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04686
train
v1
Schema: regions (alias: okiv)(value, level, id, date) transactions(id, date, status, name) Task: Select code from regions where code exists in transactions for the same level. SQL:
SELECT code FROM regions AS okiv WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.level = okiv.level );
{ "outer_table": "regions", "inner_table": "transactions", "outer_alias": "okiv", "inner_alias": "gev", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04687
train
v1
Schema: accounts (alias: jac)(type, name, status, level) customers(salary, code, date, amount) Task: Retrieve name from accounts whose type is found in customers rows where id matches the outer record. SQL:
SELECT name FROM accounts AS jac WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.id = jac.id );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "name", "filter_col": "type", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04688
train
v3
Schema: managers (alias: hac)(name, type, id, value) tasks(level, code, type, value) Task: Retrieve name from managers with value above the MIN(value) of tasks rows sharing the same level. SQL:
SELECT name FROM managers AS hac WHERE value > ( SELECT MIN(value) FROM tasks AS znob WHERE znob.level = hac.level );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04689
train
v3
Schema: branches (alias: agov)(amount, type, id, level) orders(value, status, date, type) Task: Find code from branches where amount exceeds the total value from orders for the same status. SQL:
SELECT code FROM branches AS agov WHERE amount > ( SELECT SUM(value) FROM orders AS kab WHERE kab.status = agov.status );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04690
train
v3
Schema: schedules (alias: vmob)(date, value, name, code) products(level, code, type, value) Task: Find code from schedules where salary exceeds the total salary from products for the same level. SQL:
SELECT code FROM schedules AS vmob WHERE salary > ( SELECT SUM(salary) FROM products AS nad WHERE nad.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04691
train
v2
Schema: invoices (alias: fal)(date, name, level, amount) customers(status, name, type, salary) Task: Find name from invoices where a matching record exists in customers with the same code. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = fal.code );
{ "outer_table": "invoices", "inner_table": "customers", "outer_alias": "fal", "inner_alias": "lex", "proj_col": "name", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04692
train
v3
Schema: departments (alias: dov)(id, amount, value, salary) managers(status, amount, name, date) Task: Find salary from departments where value exceeds the maximum salary from managers for the same level. SQL:
SELECT salary FROM departments AS dov WHERE value > ( SELECT MAX(salary) FROM managers AS hac WHERE hac.level = dov.level );
{ "outer_table": "departments", "inner_table": "managers", "outer_alias": "dov", "inner_alias": "hac", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04693
train
v1
Schema: tasks (alias: znob)(status, code, name, type) shipments(salary, type, amount, status) Task: Retrieve name from tasks whose level is found in shipments rows where type matches the outer record. SQL:
SELECT name FROM tasks AS znob WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.type = znob.type );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04694
train
v1
Schema: regions (alias: okiv)(date, level, amount, status) branches(status, level, date, id) Task: Select id from regions where type exists in branches for the same id. SQL:
SELECT id FROM regions AS okiv WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.id = okiv.id );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "okiv", "inner_alias": "agov", "proj_col": "id", "filter_col": "type", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04695
train
v3
Schema: tasks (alias: znob)(date, level, value, id) invoices(salary, amount, code, level) Task: Find value from tasks where salary exceeds the minimum salary from invoices for the same id. SQL:
SELECT value FROM tasks AS znob WHERE salary > ( SELECT MIN(salary) FROM invoices AS fal WHERE fal.id = znob.id );
{ "outer_table": "tasks", "inner_table": "invoices", "outer_alias": "znob", "inner_alias": "fal", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04696
train
v3
Schema: items (alias: ikob)(value, code, level, name) requests(level, value, code, salary) Task: Find amount from items where amount exceeds the maximum value from requests for the same level. SQL:
SELECT amount FROM items AS ikob WHERE amount > ( SELECT MAX(value) FROM requests AS ejof WHERE ejof.level = ikob.level );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "ikob", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04697
train
v2
Schema: invoices (alias: fal)(id, type, status, value) products(date, name, amount, value) Task: Find name from invoices where a matching record exists in products with the same type. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = fal.type );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "name", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04698
train
v2
Schema: schedules (alias: vmob)(level, id, status, code) tasks(date, status, code, name) Task: Find id from schedules where a matching record exists in tasks with the same status. SQL:
SELECT id FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "id", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04699
train