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: transactions (alias: gev)(type, salary, level, value) managers(id, level, amount, name) Task: Find value from transactions where a matching record exists in managers with the same level. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = gev.level );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "gev", "inner_alias": "hac", "proj_col": "value", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03500
train
v1
Schema: regions (alias: okiv)(code, level, status, name) products(status, date, value, type) Task: Retrieve id from regions whose status is found in products rows where id matches the outer record. SQL:
SELECT id FROM regions AS okiv WHERE status IN ( SELECT status FROM products AS nad WHERE nad.id = okiv.id );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_03501
train
v3
Schema: accounts (alias: jac)(salary, code, type, name) employees(status, name, date, id) Task: Retrieve id from accounts with amount above the MIN(amount) of employees rows sharing the same code. SQL:
SELECT id FROM accounts AS jac WHERE amount > ( SELECT MIN(amount) FROM employees AS bev WHERE bev.code = jac.code );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03502
train
v3
Schema: managers (alias: hac)(level, type, name, status) products(value, id, date, amount) Task: Retrieve salary from managers with amount above the MAX(amount) of products rows sharing the same type. SQL:
SELECT salary FROM managers AS hac WHERE amount > ( SELECT MAX(amount) FROM products AS nad WHERE nad.type = hac.type );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "hac", "inner_alias": "nad", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03503
train
v2
Schema: invoices (alias: fal)(level, code, date, amount) branches(amount, level, id, status) Task: Retrieve salary from invoices that have at least one corresponding entry in branches sharing the same level. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.level = fal.level );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "salary", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03504
train
v3
Schema: invoices (alias: fal)(salary, code, level, id) tasks(id, code, salary, type) Task: Find name from invoices where amount exceeds the total amount from tasks for the same type. SQL:
SELECT name FROM invoices AS fal WHERE amount > ( SELECT SUM(amount) FROM tasks AS znob WHERE znob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "tasks", "outer_alias": "fal", "inner_alias": "znob", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03505
train
v3
Schema: accounts (alias: jac)(amount, date, status, level) customers(date, amount, salary, value) Task: Find id from accounts where value exceeds the maximum salary from customers for the same type. SQL:
SELECT id FROM accounts AS jac WHERE value > ( SELECT MAX(salary) FROM customers AS lex WHERE lex.type = jac.type );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03506
train
v3
Schema: shipments (alias: vnob)(id, date, value, salary) staff(code, value, id, salary) Task: Find value from shipments where salary exceeds the count of amount from staff for the same level. SQL:
SELECT value FROM shipments AS vnob WHERE salary > ( SELECT COUNT(amount) FROM staff AS xnob WHERE xnob.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03507
train
v3
Schema: sales (alias: cif)(value, name, type, amount) regions(level, name, value, amount) Task: Find code from sales where amount exceeds the minimum value from regions for the same type. SQL:
SELECT code FROM sales AS cif WHERE amount > ( SELECT MIN(value) FROM regions AS okiv WHERE okiv.type = cif.type );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03508
train
v2
Schema: orders (alias: kab)(status, id, name, value) accounts(name, value, date, level) Task: Find amount from orders where a matching record exists in accounts with the same level. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = kab.level );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "kab", "inner_alias": "jac", "proj_col": "amount", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03509
train
v1
Schema: regions (alias: okiv)(level, amount, code, id) tasks(value, level, status, salary) Task: Find id from regions where id appears in tasks entries with matching level. SQL:
SELECT id FROM regions AS okiv WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "tasks", "outer_alias": "okiv", "inner_alias": "znob", "proj_col": "id", "filter_col": "id", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_03510
train
v3
Schema: employees (alias: bev)(code, salary, level, value) sales(salary, status, name, code) Task: Find id from employees where salary exceeds the minimum amount from sales for the same status. SQL:
SELECT id FROM employees AS bev WHERE salary > ( SELECT MIN(amount) FROM sales AS cif WHERE cif.status = bev.status );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03511
train
v3
Schema: departments (alias: dov)(type, code, level, id) sales(level, id, status, date) Task: Retrieve value from departments with value above the COUNT(amount) of sales rows sharing the same status. SQL:
SELECT value FROM departments AS dov WHERE value > ( SELECT COUNT(amount) FROM sales AS cif WHERE cif.status = dov.status );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03512
train
v1
Schema: projects (alias: uliv)(salary, name, type, id) employees(name, amount, type, value) Task: Find id from projects where level appears in employees entries with matching level. SQL:
SELECT id FROM projects AS uliv WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.level = uliv.level );
{ "outer_table": "projects", "inner_table": "employees", "outer_alias": "uliv", "inner_alias": "bev", "proj_col": "id", "filter_col": "level", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_03513
train
v2
Schema: managers (alias: hac)(level, value, status, date) items(amount, type, date, value) Task: Retrieve amount from managers that have at least one corresponding entry in items sharing the same id. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.id = hac.id );
{ "outer_table": "managers", "inner_table": "items", "outer_alias": "hac", "inner_alias": "ikob", "proj_col": "amount", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03514
train
v1
Schema: customers (alias: lex)(salary, id, name, code) sales(level, salary, value, status) Task: Select salary from customers where id exists in sales for the same type. SQL:
SELECT salary FROM customers AS lex WHERE id IN ( SELECT id FROM sales AS cif WHERE cif.type = lex.type );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "salary", "filter_col": "id", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03515
train
v1
Schema: invoices (alias: fal)(id, value, level, amount) categories(id, status, type, name) Task: Select code from invoices where type exists in categories for the same code. SQL:
SELECT code FROM invoices AS fal WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.code = fal.code );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03516
train
v1
Schema: schedules (alias: vmob)(status, code, level, amount) shipments(id, code, value, date) Task: Select name from schedules where status exists in shipments for the same level. SQL:
SELECT name FROM schedules AS vmob WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "shipments", "outer_alias": "vmob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03517
train
v1
Schema: sales (alias: cif)(date, level, salary, code) orders(id, status, value, name) Task: Find id from sales where level appears in orders entries with matching code. SQL:
SELECT id FROM sales AS cif WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.code = cif.code );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03518
train
v3
Schema: orders (alias: kab)(level, type, date, name) staff(status, id, salary, type) Task: Retrieve name from orders with value above the MAX(value) of staff rows sharing the same id. SQL:
SELECT name FROM orders AS kab WHERE value > ( SELECT MAX(value) FROM staff AS xnob WHERE xnob.id = kab.id );
{ "outer_table": "orders", "inner_table": "staff", "outer_alias": "kab", "inner_alias": "xnob", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03519
train
v3
Schema: categories (alias: egiv)(amount, salary, type, id) branches(value, id, code, type) Task: Retrieve code from categories with salary above the SUM(value) of branches rows sharing the same code. SQL:
SELECT code FROM categories AS egiv WHERE salary > ( SELECT SUM(value) FROM branches AS agov WHERE agov.code = egiv.code );
{ "outer_table": "categories", "inner_table": "branches", "outer_alias": "egiv", "inner_alias": "agov", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03520
train
v3
Schema: shipments (alias: vnob)(value, amount, level, status) employees(level, status, id, code) Task: Retrieve name from shipments with value above the MAX(salary) of employees rows sharing the same id. SQL:
SELECT name FROM shipments AS vnob WHERE value > ( SELECT MAX(salary) FROM employees AS bev WHERE bev.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03521
train
v3
Schema: accounts (alias: jac)(name, status, salary, date) projects(amount, id, salary, name) Task: Retrieve id from accounts with amount above the COUNT(amount) of projects rows sharing the same level. SQL:
SELECT id FROM accounts AS jac WHERE amount > ( SELECT COUNT(amount) FROM projects AS uliv WHERE uliv.level = jac.level );
{ "outer_table": "accounts", "inner_table": "projects", "outer_alias": "jac", "inner_alias": "uliv", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03522
train
v3
Schema: managers (alias: hac)(type, amount, name, value) sales(name, code, amount, date) Task: Retrieve salary from managers with amount above the COUNT(salary) of sales rows sharing the same status. SQL:
SELECT salary FROM managers AS hac WHERE amount > ( SELECT COUNT(salary) FROM sales AS cif WHERE cif.status = hac.status );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03523
train
v3
Schema: tasks (alias: znob)(name, value, id, status) schedules(id, status, amount, name) Task: Find value from tasks where value exceeds the maximum salary from schedules for the same status. SQL:
SELECT value FROM tasks AS znob WHERE value > ( SELECT MAX(salary) FROM schedules AS vmob WHERE vmob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03524
train
v2
Schema: shipments (alias: vnob)(code, amount, date, name) items(id, status, code, date) Task: Find value from shipments where a matching record exists in items with the same code. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "items", "outer_alias": "vnob", "inner_alias": "ikob", "proj_col": "value", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03525
train
v3
Schema: departments (alias: dov)(salary, type, amount, code) invoices(value, name, type, level) Task: Retrieve value from departments with amount above the COUNT(salary) of invoices rows sharing the same code. SQL:
SELECT value FROM departments AS dov WHERE amount > ( SELECT COUNT(salary) FROM invoices AS fal WHERE fal.code = dov.code );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03526
train
v1
Schema: employees (alias: bev)(salary, level, date, name) products(id, amount, type, level) Task: Select salary from employees where id exists in products for the same level. SQL:
SELECT salary FROM employees AS bev WHERE id IN ( SELECT id FROM products AS nad WHERE nad.level = bev.level );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "salary", "filter_col": "id", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03527
train
v2
Schema: sales (alias: cif)(level, id, date, value) departments(value, id, type, date) Task: Retrieve id from sales that have at least one corresponding entry in departments sharing the same level. SQL:
SELECT id FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = cif.level );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "id", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03528
train
v1
Schema: departments (alias: dov)(status, id, value, amount) categories(salary, id, level, amount) Task: Retrieve id from departments whose code is found in categories rows where status matches the outer record. SQL:
SELECT id FROM departments AS dov WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.status = dov.status );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dov", "inner_alias": "egiv", "proj_col": "id", "filter_col": "code", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03529
train
v2
Schema: branches (alias: agov)(salary, type, name, date) orders(code, id, amount, name) Task: Retrieve code from branches that have at least one corresponding entry in orders sharing the same level. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = agov.level );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "code", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03530
train
v3
Schema: regions (alias: okiv)(id, date, value, code) categories(name, level, date, code) Task: Find salary from regions where amount exceeds the minimum value from categories for the same id. SQL:
SELECT salary FROM regions AS okiv WHERE amount > ( SELECT MIN(value) FROM categories AS egiv WHERE egiv.id = okiv.id );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_03531
train
v2
Schema: branches (alias: agov)(status, salary, date, id) regions(code, level, name, amount) Task: Find value from branches where a matching record exists in regions with the same id. SQL:
SELECT value FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = agov.id );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "value", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03532
train
v3
Schema: shipments (alias: vnob)(id, status, level, code) staff(salary, amount, type, level) Task: Find name from shipments where salary exceeds the minimum salary from staff for the same type. SQL:
SELECT name FROM shipments AS vnob WHERE salary > ( SELECT MIN(salary) FROM staff AS xnob WHERE xnob.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03533
train
v3
Schema: departments (alias: dov)(date, level, code, id) products(status, salary, value, level) Task: Find id from departments where amount exceeds the minimum amount from products for the same id. SQL:
SELECT id FROM departments AS dov WHERE amount > ( SELECT MIN(amount) FROM products AS nad WHERE nad.id = dov.id );
{ "outer_table": "departments", "inner_table": "products", "outer_alias": "dov", "inner_alias": "nad", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03534
train
v1
Schema: orders (alias: kab)(salary, id, level, status) requests(type, date, code, status) Task: Find value from orders where type appears in requests entries with matching type. SQL:
SELECT value FROM orders AS kab WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.type = kab.type );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "value", "filter_col": "type", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03535
train
v1
Schema: branches (alias: agov)(status, date, amount, name) requests(date, level, value, amount) Task: Retrieve id from branches whose type is found in requests rows where code matches the outer record. SQL:
SELECT id FROM branches AS agov WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.code = agov.code );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03536
train
v2
Schema: categories (alias: egiv)(date, amount, salary, code) staff(name, type, value, amount) Task: Find id from categories where a matching record exists in staff with the same level. SQL:
SELECT id 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": "id", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03537
train
v3
Schema: transactions (alias: gev)(id, date, type, name) shipments(date, id, level, salary) Task: Retrieve value from transactions with salary above the MIN(amount) of shipments rows sharing the same level. SQL:
SELECT value FROM transactions AS gev WHERE salary > ( SELECT MIN(amount) FROM shipments AS vnob WHERE vnob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "shipments", "outer_alias": "gev", "inner_alias": "vnob", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03538
train
v2
Schema: schedules (alias: vmob)(name, level, date, amount) categories(date, salary, amount, value) Task: Retrieve name from schedules that have at least one corresponding entry in categories sharing the same level. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "name", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03539
train
v3
Schema: categories (alias: egiv)(amount, value, type, date) managers(type, date, value, status) Task: Retrieve salary from categories with value above the MAX(value) of managers rows sharing the same type. SQL:
SELECT salary FROM categories AS egiv WHERE value > ( SELECT MAX(value) FROM managers AS hac WHERE hac.type = egiv.type );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03540
train
v3
Schema: branches (alias: agov)(type, date, amount, name) tasks(amount, code, date, value) Task: Find code from branches where amount exceeds the maximum amount from tasks for the same code. SQL:
SELECT code FROM branches AS agov WHERE amount > ( SELECT MAX(amount) FROM tasks AS znob WHERE znob.code = agov.code );
{ "outer_table": "branches", "inner_table": "tasks", "outer_alias": "agov", "inner_alias": "znob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03541
train
v2
Schema: accounts (alias: jac)(level, value, date, status) shipments(amount, id, type, value) Task: Retrieve id from accounts that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT id FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = jac.code );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "id", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03542
train
v1
Schema: transactions (alias: gev)(amount, value, code, type) products(amount, date, salary, id) Task: Retrieve value from transactions whose status is found in products rows where level matches the outer record. SQL:
SELECT value FROM transactions AS gev WHERE status IN ( SELECT status FROM products AS nad WHERE nad.level = gev.level );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03543
train
v3
Schema: shipments (alias: vnob)(name, level, salary, type) orders(name, level, date, id) Task: Retrieve name from shipments with amount above the MAX(amount) of orders rows sharing the same level. SQL:
SELECT name FROM shipments AS vnob WHERE amount > ( SELECT MAX(amount) FROM orders AS kab WHERE kab.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "name", "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_03544
train
v1
Schema: items (alias: ikob)(amount, name, code, salary) projects(amount, status, type, name) Task: Find code from items where level appears in projects entries with matching code. SQL:
SELECT code FROM items AS ikob WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.code = ikob.code );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03545
train
v3
Schema: employees (alias: bev)(amount, level, id, type) managers(code, salary, value, status) Task: Retrieve salary from employees with value above the MAX(value) of managers rows sharing the same code. SQL:
SELECT salary FROM employees AS bev WHERE value > ( SELECT MAX(value) FROM managers AS hac WHERE hac.code = bev.code );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "bev", "inner_alias": "hac", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03546
train
v2
Schema: tasks (alias: znob)(status, name, id, type) orders(status, salary, id, type) Task: Retrieve value from tasks that have at least one corresponding entry in orders sharing the same level. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = znob.level );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "value", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03547
train
v1
Schema: categories (alias: egiv)(type, code, id, name) departments(amount, name, id, level) Task: Retrieve code from categories whose id is found in departments rows where level matches the outer record. SQL:
SELECT code FROM categories AS egiv WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.level = egiv.level );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03548
train
v3
Schema: sales (alias: cif)(amount, code, value, type) departments(name, date, salary, amount) Task: Find id from sales where salary exceeds the average value from departments for the same level. SQL:
SELECT id FROM sales AS cif WHERE salary > ( SELECT AVG(value) FROM departments AS dov WHERE dov.level = cif.level );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03549
train
v1
Schema: departments (alias: dov)(id, value, amount, type) shipments(id, salary, type, level) Task: Retrieve salary from departments whose level is found in shipments rows where status matches the outer record. SQL:
SELECT salary FROM departments AS dov WHERE level IN ( SELECT level 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": "level", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03550
train
v3
Schema: schedules (alias: vmob)(date, status, value, level) staff(date, level, id, salary) Task: Retrieve code from schedules with amount above the AVG(amount) of staff rows sharing the same id. SQL:
SELECT code FROM schedules AS vmob WHERE amount > ( SELECT AVG(amount) FROM staff AS xnob WHERE xnob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03551
train
v1
Schema: departments (alias: dov)(type, level, id, amount) requests(amount, salary, code, value) Task: Retrieve salary from departments whose status is found in requests rows where status matches the outer record. SQL:
SELECT salary FROM departments AS dov WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.status = dov.status );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "status", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03552
train
v2
Schema: orders (alias: kab)(id, name, date, status) branches(amount, code, salary, level) Task: Find value from orders where a matching record exists in branches with the same id. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = kab.id );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "value", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03553
train
v2
Schema: requests (alias: ejof)(value, level, status, date) customers(level, salary, id, amount) Task: Retrieve salary from requests that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT salary FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = ejof.type );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "salary", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_03554
train
v3
Schema: categories (alias: egiv)(code, type, date, id) staff(code, level, type, status) Task: Find amount from categories where amount exceeds the count of salary from staff for the same id. SQL:
SELECT amount FROM categories AS egiv WHERE amount > ( SELECT COUNT(salary) FROM staff AS xnob WHERE xnob.id = egiv.id );
{ "outer_table": "categories", "inner_table": "staff", "outer_alias": "egiv", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03555
train
v1
Schema: employees (alias: bev)(status, salary, value, type) products(id, type, value, code) Task: Select id from employees where status exists in products for the same code. SQL:
SELECT id FROM employees AS bev WHERE status IN ( SELECT status FROM products AS nad WHERE nad.code = bev.code );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03556
train
v2
Schema: orders (alias: kab)(id, name, salary, date) regions(name, code, id, date) Task: Find amount from orders where a matching record exists in regions with the same type. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = kab.type );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "kab", "inner_alias": "okiv", "proj_col": "amount", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03557
train
v2
Schema: projects (alias: uliv)(name, salary, level, id) categories(value, type, code, level) Task: Retrieve name from projects that have at least one corresponding entry in categories sharing the same status. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = uliv.status );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "name", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_03558
train
v2
Schema: customers (alias: lex)(name, salary, level, value) managers(salary, name, type, id) Task: Retrieve code from customers that have at least one corresponding entry in managers sharing the same level. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = lex.level );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "code", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03559
train
v2
Schema: departments (alias: dov)(type, name, value, id) managers(amount, level, type, salary) Task: Find code from departments where a matching record exists in managers with the same level. SQL:
SELECT code FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = dov.level );
{ "outer_table": "departments", "inner_table": "managers", "outer_alias": "dov", "inner_alias": "hac", "proj_col": "code", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03560
train
v2
Schema: items (alias: ikob)(status, level, value, type) orders(status, code, level, id) Task: Find id from items where a matching record exists in orders with the same status. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = ikob.status );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "id", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03561
train
v1
Schema: products (alias: nad)(type, status, code, id) categories(amount, type, code, level) Task: Retrieve amount from products whose code is found in categories rows where code matches the outer record. SQL:
SELECT amount FROM products AS nad WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.code = nad.code );
{ "outer_table": "products", "inner_table": "categories", "outer_alias": "nad", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03562
train
v1
Schema: employees (alias: bev)(level, code, salary, status) shipments(date, id, code, value) Task: Retrieve id from employees whose type is found in shipments rows where status matches the outer record. SQL:
SELECT id FROM employees AS bev WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.status = bev.status );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03563
train
v3
Schema: employees (alias: bev)(level, code, date, salary) departments(name, status, date, type) Task: Retrieve amount from employees with salary above the COUNT(salary) of departments rows sharing the same id. SQL:
SELECT amount FROM employees AS bev WHERE salary > ( SELECT COUNT(salary) FROM departments AS dov WHERE dov.id = bev.id );
{ "outer_table": "employees", "inner_table": "departments", "outer_alias": "bev", "inner_alias": "dov", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03564
train
v3
Schema: requests (alias: ejof)(level, salary, status, amount) customers(salary, level, amount, value) Task: Find amount from requests where value exceeds the average value from customers for the same id. SQL:
SELECT amount FROM requests AS ejof WHERE value > ( SELECT AVG(value) FROM customers AS lex WHERE lex.id = ejof.id );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_03565
train
v1
Schema: sales (alias: cif)(date, value, status, id) categories(value, amount, name, date) Task: Find value from sales where level appears in categories entries with matching status. SQL:
SELECT value FROM sales AS cif WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.status = cif.status );
{ "outer_table": "sales", "inner_table": "categories", "outer_alias": "cif", "inner_alias": "egiv", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03566
train
v2
Schema: customers (alias: lex)(name, salary, status, level) regions(date, id, level, value) Task: Retrieve code from customers that have at least one corresponding entry in regions sharing the same level. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = lex.level );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "code", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03567
train
v3
Schema: orders (alias: kab)(name, amount, level, code) invoices(name, level, salary, code) Task: Retrieve value from orders with value above the MIN(amount) of invoices rows sharing the same status. SQL:
SELECT value FROM orders AS kab WHERE value > ( SELECT MIN(amount) FROM invoices AS fal WHERE fal.status = kab.status );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "kab", "inner_alias": "fal", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03568
train
v3
Schema: orders (alias: kab)(code, level, status, type) categories(code, id, salary, amount) Task: Find name from orders where amount exceeds the count of salary from categories for the same type. SQL:
SELECT name FROM orders AS kab WHERE amount > ( SELECT COUNT(salary) FROM categories AS egiv WHERE egiv.type = kab.type );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03569
train
v2
Schema: departments (alias: dov)(date, type, amount, id) products(date, salary, amount, status) Task: Retrieve code from departments that have at least one corresponding entry in products sharing the same code. SQL:
SELECT code FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = dov.code );
{ "outer_table": "departments", "inner_table": "products", "outer_alias": "dov", "inner_alias": "nad", "proj_col": "code", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03570
train
v2
Schema: tasks (alias: znob)(status, level, salary, name) accounts(type, level, value, status) Task: Find name from tasks where a matching record exists in accounts with the same level. SQL:
SELECT name FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = znob.level );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "name", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03571
train
v1
Schema: projects (alias: uliv)(type, salary, date, name) staff(status, level, amount, code) Task: Select code from projects where code exists in staff for the same code. SQL:
SELECT code FROM projects AS uliv WHERE code IN ( SELECT code FROM staff AS xnob WHERE xnob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_03572
train
v3
Schema: transactions (alias: gev)(amount, id, level, status) items(status, value, amount, level) Task: Find code from transactions where amount exceeds the minimum value from items for the same level. SQL:
SELECT code FROM transactions AS gev WHERE amount > ( SELECT MIN(value) FROM items AS ikob WHERE ikob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "gev", "inner_alias": "ikob", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03573
train
v1
Schema: staff (alias: xnob)(salary, value, name, code) shipments(salary, date, amount, status) Task: Find name from staff where status appears in shipments entries with matching type. SQL:
SELECT name FROM staff AS xnob WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.type = xnob.type );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03574
train
v2
Schema: tasks (alias: znob)(status, salary, name, type) customers(status, salary, code, value) Task: Retrieve amount from tasks that have at least one corresponding entry in customers sharing the same level. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = znob.level );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "znob", "inner_alias": "lex", "proj_col": "amount", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03575
train
v3
Schema: schedules (alias: vmob)(salary, status, date, code) regions(type, status, date, code) Task: Find code from schedules where salary exceeds the average amount from regions for the same level. SQL:
SELECT code FROM schedules AS vmob WHERE salary > ( SELECT AVG(amount) FROM regions AS okiv WHERE okiv.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03576
train
v3
Schema: categories (alias: egiv)(name, level, amount, id) employees(value, level, id, status) Task: Retrieve code from categories with value above the COUNT(amount) of employees rows sharing the same type. SQL:
SELECT code FROM categories AS egiv WHERE value > ( SELECT COUNT(amount) FROM employees AS bev WHERE bev.type = egiv.type );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "egiv", "inner_alias": "bev", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03577
train
v1
Schema: branches (alias: agov)(name, amount, date, level) items(level, type, amount, date) Task: Retrieve name from branches whose level is found in items rows where status matches the outer record. SQL:
SELECT name FROM branches AS agov WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.status = agov.status );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03578
train
v1
Schema: tasks (alias: znob)(salary, type, name, date) products(salary, level, value, amount) Task: Select amount from tasks where code exists in products for the same code. SQL:
SELECT amount FROM tasks AS znob WHERE code IN ( SELECT code FROM products AS nad WHERE nad.code = znob.code );
{ "outer_table": "tasks", "inner_table": "products", "outer_alias": "znob", "inner_alias": "nad", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03579
train
v3
Schema: orders (alias: kab)(salary, level, value, status) customers(status, salary, type, code) Task: Retrieve salary from orders with amount above the SUM(salary) of customers rows sharing the same status. SQL:
SELECT salary FROM orders AS kab WHERE amount > ( SELECT SUM(salary) FROM customers AS lex WHERE lex.status = kab.status );
{ "outer_table": "orders", "inner_table": "customers", "outer_alias": "kab", "inner_alias": "lex", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03580
train
v1
Schema: shipments (alias: vnob)(amount, name, salary, status) orders(id, salary, amount, status) Task: Find value from shipments where code appears in orders entries with matching level. SQL:
SELECT value FROM shipments AS vnob WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03581
train
v2
Schema: items (alias: ikob)(name, status, value, salary) sales(type, date, amount, name) Task: Retrieve amount from items that have at least one corresponding entry in sales sharing the same level. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = ikob.level );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "amount", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03582
train
v1
Schema: items (alias: ikob)(value, level, name, id) regions(type, value, amount, level) Task: Select id from items where code exists in regions for the same status. SQL:
SELECT id FROM items AS ikob WHERE code IN ( SELECT code FROM regions AS okiv WHERE okiv.status = ikob.status );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "id", "filter_col": "code", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03583
train
v2
Schema: departments (alias: dov)(id, level, name, status) schedules(amount, id, salary, status) Task: Retrieve id from departments that have at least one corresponding entry in schedules sharing the same id. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.id = dov.id );
{ "outer_table": "departments", "inner_table": "schedules", "outer_alias": "dov", "inner_alias": "vmob", "proj_col": "id", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03584
train
v3
Schema: customers (alias: lex)(status, code, salary, id) accounts(id, salary, date, amount) Task: Retrieve value from customers with value above the MIN(value) of accounts rows sharing the same level. SQL:
SELECT value FROM customers AS lex WHERE value > ( SELECT MIN(value) FROM accounts AS jac WHERE jac.level = lex.level );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "lex", "inner_alias": "jac", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03585
train
v3
Schema: invoices (alias: fal)(type, value, id, name) transactions(id, value, code, date) Task: Find amount from invoices where value exceeds the maximum amount from transactions for the same id. SQL:
SELECT amount FROM invoices AS fal WHERE value > ( SELECT MAX(amount) FROM transactions AS gev WHERE gev.id = fal.id );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03586
train
v1
Schema: categories (alias: egiv)(id, amount, value, code) shipments(type, id, level, amount) Task: Retrieve salary from categories whose id is found in shipments rows where status matches the outer record. SQL:
SELECT salary FROM categories AS egiv WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03587
train
v3
Schema: projects (alias: uliv)(date, status, level, value) regions(name, value, amount, date) Task: Find salary from projects where value exceeds the average salary from regions for the same level. SQL:
SELECT salary FROM projects AS uliv WHERE value > ( SELECT AVG(salary) FROM regions AS okiv WHERE okiv.level = uliv.level );
{ "outer_table": "projects", "inner_table": "regions", "outer_alias": "uliv", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_03588
train
v3
Schema: categories (alias: egiv)(id, type, status, value) managers(date, amount, value, id) Task: Find value from categories where value exceeds the total value from managers for the same status. SQL:
SELECT value FROM categories AS egiv WHERE value > ( SELECT SUM(value) FROM managers AS hac WHERE hac.status = egiv.status );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03589
train
v3
Schema: branches (alias: agov)(status, date, amount, type) customers(id, value, date, status) Task: Retrieve amount from branches with amount above the COUNT(value) of customers rows sharing the same code. SQL:
SELECT amount FROM branches AS agov WHERE amount > ( SELECT COUNT(value) FROM customers AS lex WHERE lex.code = agov.code );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03590
train
v1
Schema: managers (alias: hac)(code, name, value, type) products(value, amount, salary, level) Task: Find name from managers where code appears in products entries with matching status. SQL:
SELECT name FROM managers AS hac WHERE code IN ( SELECT code FROM products AS nad WHERE nad.status = hac.status );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "hac", "inner_alias": "nad", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03591
train
v2
Schema: sales (alias: cif)(date, level, amount, status) products(id, amount, code, type) Task: Retrieve salary from sales that have at least one corresponding entry in products sharing the same code. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = cif.code );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "salary", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03592
train
v2
Schema: staff (alias: xnob)(level, code, value, date) managers(level, id, name, code) Task: Find amount from staff where a matching record exists in managers with the same code. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = xnob.code );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "xnob", "inner_alias": "hac", "proj_col": "amount", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03593
train
v3
Schema: items (alias: ikob)(amount, code, level, id) managers(id, date, type, level) Task: Find name from items where value exceeds the minimum salary from managers for the same id. SQL:
SELECT name FROM items AS ikob WHERE value > ( SELECT MIN(salary) FROM managers AS hac WHERE hac.id = ikob.id );
{ "outer_table": "items", "inner_table": "managers", "outer_alias": "ikob", "inner_alias": "hac", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03594
train
v3
Schema: transactions (alias: gev)(date, value, id, salary) staff(date, name, status, value) Task: Retrieve value from transactions with value above the COUNT(amount) of staff rows sharing the same type. SQL:
SELECT value FROM transactions AS gev WHERE value > ( SELECT COUNT(amount) FROM staff AS xnob WHERE xnob.type = gev.type );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03595
train
v1
Schema: products (alias: nad)(salary, type, name, date) staff(name, value, amount, salary) Task: Retrieve salary from products whose level is found in staff rows where type matches the outer record. SQL:
SELECT salary FROM products AS nad WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.type = nad.type );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "level", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03596
train
v3
Schema: orders (alias: kab)(date, amount, name, code) departments(date, amount, type, code) Task: Find amount from orders where salary exceeds the maximum salary from departments for the same level. SQL:
SELECT amount FROM orders AS kab WHERE salary > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.level = kab.level );
{ "outer_table": "orders", "inner_table": "departments", "outer_alias": "kab", "inner_alias": "dov", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03597
train
v2
Schema: employees (alias: bev)(date, id, code, name) departments(type, salary, code, name) Task: Find amount from employees where a matching record exists in departments with the same id. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = bev.id );
{ "outer_table": "employees", "inner_table": "departments", "outer_alias": "bev", "inner_alias": "dov", "proj_col": "amount", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03598
train
v3
Schema: staff (alias: xnob)(salary, status, id, name) departments(value, code, amount, name) Task: Find code from staff where amount exceeds the count of salary from departments for the same id. SQL:
SELECT code FROM staff AS xnob WHERE amount > ( SELECT COUNT(salary) FROM departments AS dov WHERE dov.id = xnob.id );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03599
train