variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v1
Schema: schedules (alias: vmob)(type, status, date, value) branches(status, level, code, date) Task: Select name from schedules where level exists in branches for the same code. SQL:
SELECT name FROM schedules AS vmob WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "branches", "outer_alias": "vmob", "inner_alias": "agov", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02800
train
v2
Schema: products (alias: nad)(code, level, id, name) staff(name, code, type, value) Task: Find salary from products where a matching record exists in staff with the same id. SQL:
SELECT salary FROM products AS nad WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = nad.id );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "salary", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02801
train
v3
Schema: managers (alias: hac)(name, salary, code, level) schedules(date, name, type, code) Task: Find salary from managers where value exceeds the total amount from schedules for the same status. SQL:
SELECT salary FROM managers AS hac WHERE value > ( SELECT SUM(amount) FROM schedules AS vmob WHERE vmob.status = hac.status );
{ "outer_table": "managers", "inner_table": "schedules", "outer_alias": "hac", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02802
train
v2
Schema: branches (alias: agov)(name, amount, code, level) categories(id, salary, level, status) Task: Retrieve name from branches that have at least one corresponding entry in categories sharing the same level. SQL:
SELECT name FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = agov.level );
{ "outer_table": "branches", "inner_table": "categories", "outer_alias": "agov", "inner_alias": "egiv", "proj_col": "name", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02803
train
v1
Schema: projects (alias: uliv)(salary, level, value, status) transactions(type, date, amount, code) Task: Select name from projects where status exists in transactions for the same level. SQL:
SELECT name FROM projects AS uliv WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.level = uliv.level );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02804
train
v2
Schema: sales (alias: cif)(type, amount, code, salary) products(code, level, date, status) Task: Retrieve amount from sales that have at least one corresponding entry in products sharing the same level. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = cif.level );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "amount", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02805
train
v3
Schema: orders (alias: kab)(level, salary, id, date) transactions(level, name, type, status) Task: Find id from orders where amount exceeds the total amount from transactions for the same level. SQL:
SELECT id FROM orders AS kab WHERE amount > ( SELECT SUM(amount) FROM transactions AS gev WHERE gev.level = kab.level );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02806
train
v1
Schema: customers (alias: lex)(amount, salary, id, level) products(amount, value, salary, status) Task: Find value from customers where code appears in products entries with matching id. SQL:
SELECT value FROM customers AS lex WHERE code IN ( SELECT code FROM products AS nad WHERE nad.id = lex.id );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "value", "filter_col": "code", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02807
train
v3
Schema: tasks (alias: znob)(salary, date, status, code) categories(name, level, value, type) Task: Find name from tasks where salary exceeds the maximum value from categories for the same code. SQL:
SELECT name FROM tasks AS znob WHERE salary > ( SELECT MAX(value) FROM categories AS egiv WHERE egiv.code = znob.code );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02808
train
v2
Schema: invoices (alias: fal)(salary, type, id, amount) transactions(salary, status, level, type) Task: Find code from invoices where a matching record exists in transactions with the same status. SQL:
SELECT code FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = fal.status );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "code", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02809
train
v1
Schema: accounts (alias: jac)(level, id, name, type) invoices(amount, status, type, date) Task: Retrieve id from accounts whose status is found in invoices rows where id matches the outer record. SQL:
SELECT id FROM accounts AS jac WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.id = jac.id );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02810
train
v1
Schema: staff (alias: xnob)(code, value, status, id) schedules(salary, amount, status, name) Task: Find value from staff where type appears in schedules entries with matching id. SQL:
SELECT value FROM staff AS xnob WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.id = xnob.id );
{ "outer_table": "staff", "inner_table": "schedules", "outer_alias": "xnob", "inner_alias": "vmob", "proj_col": "value", "filter_col": "type", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02811
train
v1
Schema: branches (alias: agov)(name, code, amount, level) regions(id, salary, status, code) Task: Select value from branches where type exists in regions for the same id. SQL:
SELECT value FROM branches AS agov WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.id = agov.id );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "value", "filter_col": "type", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02812
train
v3
Schema: sales (alias: cif)(value, type, salary, date) managers(value, name, status, code) Task: Find code from sales where amount exceeds the total value from managers for the same code. SQL:
SELECT code FROM sales AS cif WHERE amount > ( SELECT SUM(value) 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": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02813
train
v1
Schema: schedules (alias: vmob)(name, id, date, amount) tasks(amount, code, value, level) Task: Retrieve value from schedules whose type is found in tasks rows where type matches the outer record. SQL:
SELECT value FROM schedules AS vmob WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "value", "filter_col": "type", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02814
train
v1
Schema: departments (alias: dov)(level, id, code, amount) sales(status, amount, level, date) Task: Select salary from departments where status exists in sales for the same id. SQL:
SELECT salary FROM departments AS dov WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.id = dov.id );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02815
train
v1
Schema: requests (alias: ejof)(date, name, status, code) customers(code, name, date, type) Task: Find amount from requests where type appears in customers entries with matching type. SQL:
SELECT amount FROM requests AS ejof WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.type = ejof.type );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02816
train
v1
Schema: categories (alias: egiv)(code, salary, amount, date) requests(salary, status, date, code) Task: Retrieve salary from categories whose status is found in requests rows where id matches the outer record. SQL:
SELECT salary FROM categories AS egiv WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.id = egiv.id );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "egiv", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02817
train
v3
Schema: accounts (alias: jac)(type, name, salary, amount) schedules(status, amount, salary, code) Task: Retrieve value from accounts with salary above the COUNT(salary) of schedules rows sharing the same level. SQL:
SELECT value FROM accounts AS jac WHERE salary > ( SELECT COUNT(salary) FROM schedules AS vmob WHERE vmob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02818
train
v3
Schema: departments (alias: dov)(salary, level, value, code) shipments(value, amount, code, name) Task: Find amount from departments where value exceeds the maximum amount from shipments for the same type. SQL:
SELECT amount FROM departments AS dov WHERE value > ( SELECT MAX(amount) FROM shipments AS vnob WHERE vnob.type = dov.type );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02819
train
v3
Schema: shipments (alias: vnob)(code, status, value, id) transactions(amount, type, name, level) Task: Find amount from shipments where value exceeds the count of amount from transactions for the same status. SQL:
SELECT amount FROM shipments AS vnob WHERE value > ( SELECT COUNT(amount) FROM transactions AS gev WHERE gev.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "transactions", "outer_alias": "vnob", "inner_alias": "gev", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02820
train
v1
Schema: departments (alias: dov)(id, value, level, date) requests(type, date, status, id) Task: Retrieve amount from departments whose id is found in requests rows where status matches the outer record. SQL:
SELECT amount FROM departments AS dov WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.status = dov.status );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02821
train
v3
Schema: schedules (alias: vmob)(value, salary, name, code) products(id, name, status, amount) Task: Retrieve name from schedules with amount above the MIN(amount) of products rows sharing the same code. SQL:
SELECT name FROM schedules AS vmob WHERE amount > ( SELECT MIN(amount) FROM products AS nad WHERE nad.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02822
train
v3
Schema: customers (alias: lex)(salary, date, status, level) projects(code, amount, id, level) Task: Retrieve code from customers with value above the COUNT(value) of projects rows sharing the same status. SQL:
SELECT code FROM customers AS lex WHERE value > ( SELECT COUNT(value) FROM projects AS uliv WHERE uliv.status = lex.status );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02823
train
v3
Schema: transactions (alias: gev)(type, name, level, id) managers(name, id, salary, level) Task: Find name from transactions where value exceeds the count of amount from managers for the same type. SQL:
SELECT name FROM transactions AS gev WHERE value > ( SELECT COUNT(amount) FROM managers AS hac WHERE hac.type = gev.type );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "gev", "inner_alias": "hac", "proj_col": "name", "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_02824
train
v3
Schema: branches (alias: agov)(status, value, id, salary) shipments(value, amount, id, type) Task: Find salary from branches where salary exceeds the count of value from shipments for the same type. SQL:
SELECT salary FROM branches AS agov WHERE salary > ( SELECT COUNT(value) FROM shipments AS vnob WHERE vnob.type = agov.type );
{ "outer_table": "branches", "inner_table": "shipments", "outer_alias": "agov", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02825
train
v3
Schema: branches (alias: agov)(code, value, level, salary) customers(name, code, type, status) Task: Retrieve value from branches with amount above the SUM(amount) of customers rows sharing the same level. SQL:
SELECT value FROM branches AS agov WHERE amount > ( SELECT SUM(amount) FROM customers AS lex WHERE lex.level = agov.level );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02826
train
v1
Schema: shipments (alias: vnob)(id, salary, type, name) invoices(date, name, amount, value) Task: Retrieve salary from shipments whose id is found in invoices rows where type matches the outer record. SQL:
SELECT salary FROM shipments AS vnob WHERE id IN ( SELECT id FROM invoices AS fal WHERE fal.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "vnob", "inner_alias": "fal", "proj_col": "salary", "filter_col": "id", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02827
train
v3
Schema: projects (alias: uliv)(value, salary, status, level) staff(level, id, salary, amount) Task: Retrieve salary from projects with amount above the AVG(salary) of staff rows sharing the same type. SQL:
SELECT salary FROM projects AS uliv WHERE amount > ( SELECT AVG(salary) FROM staff AS xnob WHERE xnob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02828
train
v1
Schema: branches (alias: agov)(date, value, type, salary) tasks(name, code, status, id) Task: Retrieve amount from branches whose type is found in tasks rows where code matches the outer record. SQL:
SELECT amount FROM branches AS agov WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.code = agov.code );
{ "outer_table": "branches", "inner_table": "tasks", "outer_alias": "agov", "inner_alias": "znob", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02829
train
v2
Schema: requests (alias: ejof)(code, id, salary, level) projects(type, salary, name, level) Task: Find name from requests where a matching record exists in projects with the same type. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = ejof.type );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "name", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02830
train
v2
Schema: items (alias: ikob)(status, value, amount, type) sales(name, level, id, amount) Task: Retrieve salary from items that have at least one corresponding entry in sales sharing the same level. SQL:
SELECT salary 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": "salary", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02831
train
v1
Schema: schedules (alias: vmob)(value, name, salary, id) customers(value, id, name, status) Task: Retrieve id from schedules whose status is found in customers rows where type matches the outer record. SQL:
SELECT id FROM schedules AS vmob WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "vmob", "inner_alias": "lex", "proj_col": "id", "filter_col": "status", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02832
train
v1
Schema: regions (alias: okiv)(status, name, level, date) requests(salary, amount, type, value) Task: Retrieve id from regions whose id is found in requests rows where level matches the outer record. SQL:
SELECT id FROM regions AS okiv WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.level = okiv.level );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "id", "filter_col": "id", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02833
train
v3
Schema: projects (alias: uliv)(salary, amount, code, date) orders(level, name, date, amount) Task: Retrieve id from projects with value above the MAX(salary) of orders rows sharing the same code. SQL:
SELECT id FROM projects AS uliv WHERE value > ( SELECT MAX(salary) FROM orders AS kab WHERE kab.code = uliv.code );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02834
train
v2
Schema: projects (alias: uliv)(amount, value, id, name) regions(level, code, salary, name) Task: Find id from projects where a matching record exists in regions with the same level. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = uliv.level );
{ "outer_table": "projects", "inner_table": "regions", "outer_alias": "uliv", "inner_alias": "okiv", "proj_col": "id", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02835
train
v2
Schema: sales (alias: cif)(date, level, value, id) staff(code, name, value, amount) Task: Find value from sales where a matching record exists in staff with the same type. SQL:
SELECT value FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.type = cif.type );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "value", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02836
train
v3
Schema: accounts (alias: jac)(type, amount, code, status) employees(amount, date, value, level) Task: Find id from accounts where salary exceeds the minimum value from employees for the same id. SQL:
SELECT id FROM accounts AS jac WHERE salary > ( SELECT MIN(value) FROM employees AS bev WHERE bev.id = jac.id );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02837
train
v3
Schema: invoices (alias: fal)(status, level, amount, id) customers(code, type, status, name) Task: Find name from invoices where value exceeds the maximum value from customers for the same code. SQL:
SELECT name FROM invoices AS fal WHERE value > ( SELECT MAX(value) FROM customers AS lex WHERE lex.code = fal.code );
{ "outer_table": "invoices", "inner_table": "customers", "outer_alias": "fal", "inner_alias": "lex", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02838
train
v1
Schema: accounts (alias: jac)(status, name, id, date) departments(type, level, salary, status) Task: Select code from accounts where type exists in departments for the same id. SQL:
SELECT code FROM accounts AS jac WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.id = jac.id );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "code", "filter_col": "type", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02839
train
v3
Schema: staff (alias: xnob)(id, code, name, status) projects(salary, amount, status, level) Task: Find salary from staff where salary exceeds the total salary from projects for the same code. SQL:
SELECT salary FROM staff AS xnob WHERE salary > ( SELECT SUM(salary) FROM projects AS uliv WHERE uliv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "xnob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02840
train
v1
Schema: requests (alias: ejof)(name, salary, value, status) employees(value, status, name, level) Task: Select id from requests where id exists in employees for the same status. SQL:
SELECT id FROM requests AS ejof WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.status = ejof.status );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ejof", "inner_alias": "bev", "proj_col": "id", "filter_col": "id", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02841
train
v2
Schema: transactions (alias: gev)(salary, date, level, code) sales(id, value, code, level) Task: Retrieve id from transactions that have at least one corresponding entry in sales sharing the same status. SQL:
SELECT id FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = gev.status );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "id", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02842
train
v3
Schema: employees (alias: bev)(code, salary, name, status) staff(name, level, type, id) Task: Find salary from employees where salary exceeds the minimum value from staff for the same level. SQL:
SELECT salary FROM employees AS bev WHERE salary > ( SELECT MIN(value) FROM staff AS xnob WHERE xnob.level = bev.level );
{ "outer_table": "employees", "inner_table": "staff", "outer_alias": "bev", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02843
train
v1
Schema: sales (alias: cif)(salary, level, value, id) customers(date, status, value, id) Task: Find name from sales where code appears in customers entries with matching code. SQL:
SELECT name FROM sales AS cif WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.code = cif.code );
{ "outer_table": "sales", "inner_table": "customers", "outer_alias": "cif", "inner_alias": "lex", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02844
train
v2
Schema: staff (alias: xnob)(value, type, name, level) transactions(salary, id, name, value) Task: Retrieve id from staff that have at least one corresponding entry in transactions sharing the same id. SQL:
SELECT id FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = xnob.id );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "xnob", "inner_alias": "gev", "proj_col": "id", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02845
train
v1
Schema: managers (alias: hac)(name, id, status, code) categories(type, salary, level, date) Task: Find code from managers where level appears in categories entries with matching id. SQL:
SELECT code FROM managers AS hac WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.id = hac.id );
{ "outer_table": "managers", "inner_table": "categories", "outer_alias": "hac", "inner_alias": "egiv", "proj_col": "code", "filter_col": "level", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02846
train
v2
Schema: employees (alias: bev)(id, status, salary, type) projects(type, name, date, salary) Task: Find amount from employees where a matching record exists in projects with the same status. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = bev.status );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "amount", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02847
train
v3
Schema: invoices (alias: fal)(amount, name, id, value) categories(status, value, date, code) Task: Retrieve name from invoices with amount above the MAX(amount) of categories rows sharing the same type. SQL:
SELECT name FROM invoices AS fal WHERE amount > ( SELECT MAX(amount) FROM categories AS egiv WHERE egiv.type = fal.type );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02848
train
v1
Schema: categories (alias: egiv)(salary, type, status, value) sales(code, id, name, amount) Task: Select amount from categories where status exists in sales for the same status. SQL:
SELECT amount FROM categories AS egiv WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.status = egiv.status );
{ "outer_table": "categories", "inner_table": "sales", "outer_alias": "egiv", "inner_alias": "cif", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02849
train
v3
Schema: employees (alias: bev)(status, code, level, id) accounts(code, salary, date, status) Task: Find code from employees where salary exceeds the average salary from accounts for the same type. SQL:
SELECT code FROM employees AS bev WHERE salary > ( SELECT AVG(salary) FROM accounts AS jac WHERE jac.type = bev.type );
{ "outer_table": "employees", "inner_table": "accounts", "outer_alias": "bev", "inner_alias": "jac", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02850
train
v2
Schema: customers (alias: lex)(id, value, type, amount) regions(value, amount, date, salary) Task: Retrieve value from customers that have at least one corresponding entry in regions sharing the same status. SQL:
SELECT value FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = lex.status );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "value", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02851
train
v3
Schema: departments (alias: dov)(status, date, salary, level) categories(type, id, value, status) Task: Find value from departments where value exceeds the total amount from categories for the same id. SQL:
SELECT value FROM departments AS dov WHERE value > ( SELECT SUM(amount) FROM categories AS egiv WHERE egiv.id = dov.id );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dov", "inner_alias": "egiv", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02852
train
v2
Schema: items (alias: ikob)(value, id, status, name) managers(status, level, salary, type) Task: Retrieve name from items that have at least one corresponding entry in managers sharing the same level. SQL:
SELECT name FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = ikob.level );
{ "outer_table": "items", "inner_table": "managers", "outer_alias": "ikob", "inner_alias": "hac", "proj_col": "name", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02853
train
v3
Schema: shipments (alias: vnob)(id, type, code, status) tasks(status, type, name, value) Task: Find value from shipments where salary exceeds the maximum value from tasks for the same id. SQL:
SELECT value FROM shipments AS vnob WHERE salary > ( SELECT MAX(value) FROM tasks AS znob WHERE znob.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "tasks", "outer_alias": "vnob", "inner_alias": "znob", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02854
train
v1
Schema: projects (alias: uliv)(type, date, status, value) tasks(id, type, value, level) Task: Find salary from projects where code appears in tasks entries with matching id. SQL:
SELECT salary FROM projects AS uliv WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.id = uliv.id );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "uliv", "inner_alias": "znob", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02855
train
v2
Schema: employees (alias: bev)(date, value, amount, salary) managers(name, id, amount, level) Task: Find name from employees where a matching record exists in managers with the same type. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = bev.type );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "bev", "inner_alias": "hac", "proj_col": "name", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02856
train
v1
Schema: shipments (alias: vnob)(name, salary, amount, level) customers(level, value, date, type) Task: Find amount from shipments where id appears in customers entries with matching id. SQL:
SELECT amount FROM shipments AS vnob WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "amount", "filter_col": "id", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02857
train
v2
Schema: sales (alias: cif)(name, date, status, salary) customers(date, name, id, type) Task: Retrieve name from sales that have at least one corresponding entry in customers sharing the same id. SQL:
SELECT name FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = cif.id );
{ "outer_table": "sales", "inner_table": "customers", "outer_alias": "cif", "inner_alias": "lex", "proj_col": "name", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02858
train
v3
Schema: customers (alias: lex)(name, amount, code, value) products(id, date, code, type) Task: Find salary from customers where value exceeds the average value from products for the same type. SQL:
SELECT salary FROM customers AS lex WHERE value > ( SELECT AVG(value) FROM products AS nad WHERE nad.type = lex.type );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02859
train
v3
Schema: categories (alias: egiv)(amount, id, status, level) items(type, value, salary, level) Task: Retrieve id from categories with salary above the SUM(value) of items rows sharing the same level. SQL:
SELECT id FROM categories AS egiv WHERE salary > ( SELECT SUM(value) FROM items AS ikob WHERE ikob.level = egiv.level );
{ "outer_table": "categories", "inner_table": "items", "outer_alias": "egiv", "inner_alias": "ikob", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02860
train
v2
Schema: staff (alias: xnob)(level, salary, type, date) products(id, value, type, level) Task: Retrieve salary from staff that have at least one corresponding entry in products sharing the same status. SQL:
SELECT salary FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = xnob.status );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "salary", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02861
train
v3
Schema: tasks (alias: znob)(name, date, level, status) shipments(type, code, status, salary) Task: Find name from tasks where amount exceeds the count of salary from shipments for the same level. SQL:
SELECT name FROM tasks AS znob WHERE amount > ( SELECT COUNT(salary) FROM shipments AS vnob WHERE vnob.level = znob.level );
{ "outer_table": "tasks", "inner_table": "shipments", "outer_alias": "znob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02862
train
v2
Schema: transactions (alias: gev)(code, type, id, level) categories(type, value, code, name) Task: Retrieve salary from transactions that have at least one corresponding entry in categories sharing the same level. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = gev.level );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "salary", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02863
train
v1
Schema: departments (alias: dov)(status, code, salary, type) managers(amount, name, salary, id) Task: Find amount from departments where level appears in managers entries with matching level. SQL:
SELECT amount FROM departments AS dov WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.level = dov.level );
{ "outer_table": "departments", "inner_table": "managers", "outer_alias": "dov", "inner_alias": "hac", "proj_col": "amount", "filter_col": "level", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02864
train
v1
Schema: departments (alias: dov)(amount, status, level, salary) projects(value, name, date, salary) Task: Select code from departments where type exists in projects for the same code. SQL:
SELECT code FROM departments AS dov WHERE type IN ( SELECT type 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": "type", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02865
train
v1
Schema: items (alias: ikob)(amount, value, level, type) schedules(id, code, salary, status) Task: Find value from items where id appears in schedules entries with matching level. SQL:
SELECT value FROM items AS ikob WHERE id IN ( SELECT id FROM schedules AS vmob WHERE vmob.level = ikob.level );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "ikob", "inner_alias": "vmob", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02866
train
v2
Schema: customers (alias: lex)(level, date, salary, code) regions(id, amount, name, status) Task: Find amount from customers where a matching record exists in regions with the same type. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = lex.type );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "amount", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02867
train
v1
Schema: transactions (alias: gev)(value, id, level, amount) tasks(amount, level, id, status) Task: Select salary from transactions where code exists in tasks for the same id. SQL:
SELECT salary FROM transactions AS gev WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "tasks", "outer_alias": "gev", "inner_alias": "znob", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02868
train
v2
Schema: accounts (alias: jac)(id, level, date, salary) regions(salary, date, type, code) Task: Find salary from accounts where a matching record exists in regions with the same type. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = jac.type );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "salary", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02869
train
v3
Schema: orders (alias: kab)(name, value, code, id) categories(amount, type, value, id) Task: Retrieve name from orders with salary above the COUNT(amount) of categories rows sharing the same id. SQL:
SELECT name FROM orders AS kab WHERE salary > ( SELECT COUNT(amount) FROM categories AS egiv WHERE egiv.id = kab.id );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02870
train
v3
Schema: managers (alias: hac)(date, status, level, id) shipments(type, value, salary, amount) Task: Retrieve id from managers with amount above the MAX(value) of shipments rows sharing the same level. SQL:
SELECT id FROM managers AS hac WHERE amount > ( SELECT MAX(value) FROM shipments AS vnob WHERE vnob.level = hac.level );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "hac", "inner_alias": "vnob", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02871
train
v2
Schema: items (alias: ikob)(type, status, code, id) products(date, name, status, salary) Task: Retrieve code from items that have at least one corresponding entry in products sharing the same level. SQL:
SELECT code FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = ikob.level );
{ "outer_table": "items", "inner_table": "products", "outer_alias": "ikob", "inner_alias": "nad", "proj_col": "code", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02872
train
v1
Schema: products (alias: nad)(level, value, date, amount) requests(id, type, salary, name) Task: Select amount from products where status exists in requests for the same level. SQL:
SELECT amount FROM products AS nad WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.level = nad.level );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02873
train
v3
Schema: employees (alias: bev)(code, salary, name, amount) categories(level, id, salary, name) Task: Retrieve value from employees with salary above the SUM(amount) of categories rows sharing the same code. SQL:
SELECT value FROM employees AS bev WHERE salary > ( SELECT SUM(amount) FROM categories AS egiv WHERE egiv.code = bev.code );
{ "outer_table": "employees", "inner_table": "categories", "outer_alias": "bev", "inner_alias": "egiv", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02874
train
v3
Schema: invoices (alias: fal)(status, date, name, amount) products(name, amount, level, id) Task: Retrieve value from invoices with value above the MIN(value) of products rows sharing the same type. SQL:
SELECT value FROM invoices AS fal WHERE value > ( SELECT MIN(value) FROM products AS nad WHERE nad.type = fal.type );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02875
train
v3
Schema: items (alias: ikob)(salary, name, status, code) shipments(salary, name, date, type) Task: Retrieve amount from items with amount above the COUNT(value) of shipments rows sharing the same id. SQL:
SELECT amount FROM items AS ikob WHERE amount > ( SELECT COUNT(value) 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": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02876
train
v1
Schema: projects (alias: uliv)(status, level, name, code) requests(code, id, value, name) Task: Select salary from projects where level exists in requests for the same id. SQL:
SELECT salary FROM projects AS uliv WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.id = uliv.id );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02877
train
v1
Schema: sales (alias: cif)(name, code, salary, amount) branches(salary, amount, name, level) Task: Select code from sales where id exists in branches for the same type. SQL:
SELECT code FROM sales AS cif WHERE id IN ( SELECT id FROM branches AS agov WHERE agov.type = cif.type );
{ "outer_table": "sales", "inner_table": "branches", "outer_alias": "cif", "inner_alias": "agov", "proj_col": "code", "filter_col": "id", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02878
train
v3
Schema: requests (alias: ejof)(status, date, value, name) departments(type, salary, name, code) Task: Retrieve value from requests with value above the MIN(salary) of departments rows sharing the same level. SQL:
SELECT value FROM requests AS ejof WHERE value > ( SELECT MIN(salary) FROM departments AS dov WHERE dov.level = ejof.level );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02879
train
v3
Schema: staff (alias: xnob)(level, salary, status, value) tasks(level, type, code, amount) Task: Find value from staff where value exceeds the average value from tasks for the same level. SQL:
SELECT value FROM staff AS xnob WHERE value > ( SELECT AVG(value) FROM tasks AS znob WHERE znob.level = xnob.level );
{ "outer_table": "staff", "inner_table": "tasks", "outer_alias": "xnob", "inner_alias": "znob", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02880
train
v1
Schema: regions (alias: okiv)(salary, date, amount, code) requests(value, code, status, name) Task: Retrieve value from regions whose status is found in requests rows where code matches the outer record. SQL:
SELECT value FROM regions AS okiv WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.code = okiv.code );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "value", "filter_col": "status", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02881
train
v2
Schema: projects (alias: uliv)(value, status, date, salary) departments(id, level, amount, salary) Task: Find amount from projects where a matching record exists in departments with the same type. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = uliv.type );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "uliv", "inner_alias": "dov", "proj_col": "amount", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02882
train
v3
Schema: accounts (alias: jac)(code, level, salary, status) products(status, name, level, amount) Task: Retrieve id from accounts with amount above the COUNT(salary) of products rows sharing the same type. SQL:
SELECT id FROM accounts AS jac WHERE amount > ( SELECT COUNT(salary) FROM products AS nad WHERE nad.type = jac.type );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "jac", "inner_alias": "nad", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02883
train
v3
Schema: items (alias: ikob)(level, value, id, name) projects(status, level, type, salary) Task: Retrieve value from items with amount above the MAX(value) of projects rows sharing the same status. SQL:
SELECT value FROM items AS ikob WHERE amount > ( SELECT MAX(value) FROM projects AS uliv WHERE uliv.status = ikob.status );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02884
train
v2
Schema: accounts (alias: jac)(level, salary, amount, code) staff(status, value, amount, level) Task: Retrieve salary from accounts that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "jac", "inner_alias": "xnob", "proj_col": "salary", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02885
train
v1
Schema: accounts (alias: jac)(type, name, status, value) shipments(value, level, id, code) Task: Select code from accounts where id exists in shipments for the same status. SQL:
SELECT code FROM accounts AS jac WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02886
train
v3
Schema: orders (alias: kab)(salary, code, level, date) transactions(code, amount, level, id) Task: Find value from orders where value exceeds the count of value from transactions for the same id. SQL:
SELECT value FROM orders AS kab WHERE value > ( SELECT COUNT(value) FROM transactions AS gev WHERE gev.id = kab.id );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02887
train
v2
Schema: tasks (alias: znob)(status, amount, name, type) schedules(date, status, name, code) Task: Retrieve amount from tasks that have at least one corresponding entry in schedules sharing the same id. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "amount", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02888
train
v3
Schema: managers (alias: hac)(id, level, date, name) schedules(code, salary, type, id) Task: Find amount from managers where salary exceeds the total amount from schedules for the same type. SQL:
SELECT amount FROM managers AS hac WHERE salary > ( SELECT SUM(amount) FROM schedules AS vmob WHERE vmob.type = hac.type );
{ "outer_table": "managers", "inner_table": "schedules", "outer_alias": "hac", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02889
train
v3
Schema: tasks (alias: znob)(salary, name, value, type) staff(code, date, amount, id) Task: Find value from tasks where amount exceeds the average amount from staff for the same id. SQL:
SELECT value FROM tasks AS znob WHERE amount > ( SELECT AVG(amount) FROM staff AS xnob WHERE xnob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02890
train
v1
Schema: projects (alias: uliv)(value, amount, salary, id) accounts(type, value, id, amount) Task: Retrieve code from projects whose level is found in accounts rows where status matches the outer record. SQL:
SELECT code FROM projects AS uliv WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.status = uliv.status );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02891
train
v2
Schema: shipments (alias: vnob)(value, level, id, code) staff(date, level, type, salary) Task: Find name from shipments where a matching record exists in staff with the same level. SQL:
SELECT name FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "name", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02892
train
v3
Schema: regions (alias: okiv)(type, salary, date, name) managers(salary, date, amount, type) Task: Find name from regions where salary exceeds the total salary from managers for the same status. SQL:
SELECT name FROM regions AS okiv WHERE salary > ( SELECT SUM(salary) FROM managers AS hac WHERE hac.status = okiv.status );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "okiv", "inner_alias": "hac", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02893
train
v3
Schema: departments (alias: dov)(name, type, id, salary) managers(code, status, amount, id) Task: Retrieve amount from departments with value above the MIN(value) of managers rows sharing the same level. SQL:
SELECT amount FROM departments AS dov WHERE value > ( SELECT MIN(value) FROM managers AS hac WHERE hac.level = dov.level );
{ "outer_table": "departments", "inner_table": "managers", "outer_alias": "dov", "inner_alias": "hac", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02894
train
v2
Schema: departments (alias: dov)(salary, type, status, amount) items(status, type, date, code) Task: Find value from departments where a matching record exists in items with the same level. SQL:
SELECT value FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = dov.level );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "value", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02895
train
v1
Schema: products (alias: nad)(status, salary, amount, date) transactions(status, date, salary, amount) Task: Find id from products where level appears in transactions entries with matching id. SQL:
SELECT id FROM products AS nad WHERE level IN ( SELECT level FROM transactions AS gev WHERE gev.id = nad.id );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "id", "filter_col": "level", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02896
train
v3
Schema: transactions (alias: gev)(date, amount, level, value) orders(amount, type, date, level) Task: Retrieve id from transactions with salary above the MIN(amount) of orders rows sharing the same status. SQL:
SELECT id FROM transactions AS gev WHERE salary > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.status = gev.status );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "gev", "inner_alias": "kab", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02897
train
v2
Schema: shipments (alias: vnob)(status, name, date, amount) requests(name, date, id, salary) Task: Retrieve salary from shipments that have at least one corresponding entry in requests sharing the same type. SQL:
SELECT salary FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "requests", "outer_alias": "vnob", "inner_alias": "ejof", "proj_col": "salary", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02898
train
v2
Schema: requests (alias: ejof)(code, name, status, level) managers(code, amount, value, status) Task: Retrieve id from requests that have at least one corresponding entry in managers sharing the same code. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = ejof.code );
{ "outer_table": "requests", "inner_table": "managers", "outer_alias": "ejof", "inner_alias": "hac", "proj_col": "id", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02899
train