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: employees (alias: bev)(id, name, amount, level) projects(type, status, date, level) Task: Find value from employees where a matching record exists in projects with the same code. SQL:
SELECT value FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = bev.code );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "value", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06800
train
v3
Schema: tasks (alias: znob)(name, value, id, amount) invoices(salary, code, amount, name) Task: Retrieve id from tasks with salary above the COUNT(salary) of invoices rows sharing the same code. SQL:
SELECT id FROM tasks AS znob WHERE salary > ( SELECT COUNT(salary) FROM invoices AS fal WHERE fal.code = znob.code );
{ "outer_table": "tasks", "inner_table": "invoices", "outer_alias": "znob", "inner_alias": "fal", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06801
train
v1
Schema: managers (alias: hac)(salary, level, status, amount) customers(code, salary, level, id) Task: Select amount from managers where status exists in customers for the same id. SQL:
SELECT amount FROM managers AS hac WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.id = hac.id );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06802
train
v1
Schema: invoices (alias: fal)(date, amount, salary, type) transactions(status, date, level, name) Task: Retrieve salary from invoices whose level is found in transactions rows where status matches the outer record. SQL:
SELECT salary FROM invoices AS fal WHERE level IN ( SELECT level FROM transactions AS gev WHERE gev.status = fal.status );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06803
train
v2
Schema: departments (alias: dov)(level, type, salary, id) accounts(value, id, level, status) Task: Find id from departments where a matching record exists in accounts with the same code. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = dov.code );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "id", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06804
train
v1
Schema: shipments (alias: vnob)(code, status, date, amount) items(salary, amount, name, type) Task: Find id from shipments where type appears in items entries with matching type. SQL:
SELECT id FROM shipments AS vnob WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "items", "outer_alias": "vnob", "inner_alias": "ikob", "proj_col": "id", "filter_col": "type", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06805
train
v1
Schema: sales (alias: cif)(status, value, type, code) regions(amount, value, id, salary) Task: Retrieve name from sales whose id is found in regions rows where level matches the outer record. SQL:
SELECT name FROM sales AS cif WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.level = cif.level );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "name", "filter_col": "id", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06806
train
v3
Schema: accounts (alias: jac)(code, level, id, salary) employees(id, status, level, date) Task: Retrieve amount from accounts with value above the COUNT(amount) of employees rows sharing the same status. SQL:
SELECT amount FROM accounts AS jac WHERE value > ( SELECT COUNT(amount) FROM employees AS bev WHERE bev.status = jac.status );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06807
train
v2
Schema: tasks (alias: znob)(type, name, id, value) schedules(code, name, amount, type) Task: Retrieve amount from tasks that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = znob.code );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "amount", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06808
train
v3
Schema: regions (alias: okiv)(name, salary, level, status) customers(amount, code, name, level) Task: Retrieve name from regions with salary above the SUM(amount) of customers rows sharing the same type. SQL:
SELECT name FROM regions AS okiv WHERE salary > ( SELECT SUM(amount) FROM customers AS lex WHERE lex.type = okiv.type );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06809
train
v1
Schema: regions (alias: okiv)(salary, code, status, type) projects(status, type, date, level) Task: Find id from regions where type appears in projects entries with matching id. SQL:
SELECT id FROM regions AS okiv WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.id = okiv.id );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "id", "filter_col": "type", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06810
train
v2
Schema: projects (alias: uliv)(id, salary, amount, name) accounts(type, salary, code, value) Task: Retrieve code from projects that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT code FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = uliv.code );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "code", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06811
train
v1
Schema: tasks (alias: znob)(date, name, status, amount) regions(amount, level, salary, code) Task: Find value from tasks where id appears in regions entries with matching code. SQL:
SELECT value FROM tasks AS znob WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.code = znob.code );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "value", "filter_col": "id", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06812
train
v3
Schema: regions (alias: okiv)(value, level, id, salary) employees(amount, level, id, date) Task: Retrieve name from regions with value above the AVG(amount) of employees rows sharing the same code. SQL:
SELECT name FROM regions AS okiv WHERE value > ( SELECT AVG(amount) FROM employees AS bev WHERE bev.code = okiv.code );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "okiv", "inner_alias": "bev", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06813
train
v1
Schema: accounts (alias: jac)(date, code, name, value) schedules(code, status, type, level) Task: Retrieve value from accounts whose id is found in schedules rows where level matches the outer record. SQL:
SELECT value FROM accounts AS jac WHERE id IN ( SELECT id 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": "id", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06814
train
v2
Schema: transactions (alias: gev)(salary, code, value, name) branches(id, status, value, salary) Task: Retrieve amount from transactions that have at least one corresponding entry in branches sharing the same level. SQL:
SELECT amount FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.level = gev.level );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "gev", "inner_alias": "agov", "proj_col": "amount", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06815
train
v1
Schema: transactions (alias: gev)(status, type, name, date) regions(type, value, level, id) Task: Select code from transactions where id exists in regions for the same status. SQL:
SELECT code FROM transactions AS gev WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.status = gev.status );
{ "outer_table": "transactions", "inner_table": "regions", "outer_alias": "gev", "inner_alias": "okiv", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06816
train
v1
Schema: staff (alias: xnob)(id, code, name, amount) transactions(status, salary, value, level) Task: Retrieve name from staff whose code is found in transactions rows where id matches the outer record. SQL:
SELECT name FROM staff AS xnob WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.id = xnob.id );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "xnob", "inner_alias": "gev", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06817
train
v2
Schema: items (alias: ikob)(type, salary, value, name) managers(code, name, amount, status) Task: Find code from items where a matching record exists in managers with the same code. SQL:
SELECT code FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = ikob.code );
{ "outer_table": "items", "inner_table": "managers", "outer_alias": "ikob", "inner_alias": "hac", "proj_col": "code", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06818
train
v3
Schema: tasks (alias: znob)(name, code, id, salary) requests(name, value, code, status) Task: Retrieve name from tasks with value above the SUM(salary) of requests rows sharing the same code. SQL:
SELECT name FROM tasks AS znob WHERE value > ( SELECT SUM(salary) FROM requests AS ejof WHERE ejof.code = znob.code );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06819
train
v3
Schema: categories (alias: egiv)(amount, salary, type, code) shipments(salary, type, id, date) Task: Retrieve salary from categories with salary above the MAX(value) of shipments rows sharing the same status. SQL:
SELECT salary FROM categories AS egiv WHERE salary > ( SELECT MAX(value) 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": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06820
train
v1
Schema: products (alias: nad)(id, code, level, salary) customers(salary, amount, level, value) Task: Select id from products where id exists in customers for the same level. SQL:
SELECT id FROM products AS nad WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.level = nad.level );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "id", "filter_col": "id", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06821
train
v1
Schema: branches (alias: agov)(date, amount, type, salary) departments(code, amount, salary, type) Task: Select id from branches where id exists in departments for the same type. SQL:
SELECT id FROM branches AS agov WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.type = agov.type );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06822
train
v2
Schema: categories (alias: egiv)(id, type, date, code) transactions(id, salary, date, amount) Task: Retrieve name from categories that have at least one corresponding entry in transactions sharing the same id. SQL:
SELECT name FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = egiv.id );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "egiv", "inner_alias": "gev", "proj_col": "name", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06823
train
v2
Schema: products (alias: nad)(status, date, value, level) sales(name, type, value, date) Task: Retrieve code from products that have at least one corresponding entry in sales sharing the same code. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = nad.code );
{ "outer_table": "products", "inner_table": "sales", "outer_alias": "nad", "inner_alias": "cif", "proj_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06824
train
v1
Schema: shipments (alias: vnob)(status, value, salary, code) staff(code, id, status, level) Task: Retrieve value from shipments whose type is found in staff rows where code matches the outer record. SQL:
SELECT value FROM shipments AS vnob WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "value", "filter_col": "type", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06825
train
v2
Schema: requests (alias: ejof)(id, status, amount, salary) customers(salary, id, amount, name) Task: Find id from requests where a matching record exists in customers with the same level. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = ejof.level );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "id", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06826
train
v2
Schema: branches (alias: agov)(level, name, id, status) transactions(name, value, id, status) Task: Find amount from branches where a matching record exists in transactions with the same type. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = agov.type );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "amount", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06827
train
v2
Schema: orders (alias: kab)(id, value, level, code) customers(code, level, name, id) Task: Retrieve salary from orders that have at least one corresponding entry in customers sharing the same code. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = kab.code );
{ "outer_table": "orders", "inner_table": "customers", "outer_alias": "kab", "inner_alias": "lex", "proj_col": "salary", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06828
train
v2
Schema: projects (alias: uliv)(amount, date, type, salary) accounts(name, level, value, code) Task: Find id from projects where a matching record exists in accounts with the same id. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = uliv.id );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "id", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06829
train
v3
Schema: products (alias: nad)(level, type, amount, status) managers(date, id, name, code) Task: Find code from products where amount exceeds the count of amount from managers for the same code. SQL:
SELECT code FROM products AS nad WHERE amount > ( SELECT COUNT(amount) FROM managers AS hac WHERE hac.code = nad.code );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "nad", "inner_alias": "hac", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06830
train
v3
Schema: managers (alias: hac)(date, salary, value, id) transactions(value, name, code, amount) Task: Find amount from managers where amount exceeds the total salary from transactions for the same id. SQL:
SELECT amount FROM managers AS hac WHERE amount > ( SELECT SUM(salary) FROM transactions AS gev WHERE gev.id = hac.id );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06831
train
v1
Schema: sales (alias: cif)(code, date, id, value) regions(value, name, status, type) Task: Select code from sales where id exists in regions for the same id. SQL:
SELECT code FROM sales AS cif WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.id = cif.id );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "code", "filter_col": "id", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06832
train
v2
Schema: regions (alias: okiv)(value, level, code, date) customers(amount, id, date, type) Task: Find name from regions where a matching record exists in customers with the same code. SQL:
SELECT name FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = okiv.code );
{ "outer_table": "regions", "inner_table": "customers", "outer_alias": "okiv", "inner_alias": "lex", "proj_col": "name", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06833
train
v2
Schema: requests (alias: ejof)(name, date, type, status) invoices(status, id, type, value) Task: Retrieve amount from requests that have at least one corresponding entry in invoices sharing the same level. SQL:
SELECT amount FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = ejof.level );
{ "outer_table": "requests", "inner_table": "invoices", "outer_alias": "ejof", "inner_alias": "fal", "proj_col": "amount", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06834
train
v2
Schema: requests (alias: ejof)(salary, amount, status, level) sales(date, value, salary, type) Task: Retrieve name from requests that have at least one corresponding entry in sales sharing the same level. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = ejof.level );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "name", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06835
train
v2
Schema: categories (alias: egiv)(amount, level, name, id) invoices(type, salary, date, amount) Task: Find id from categories where a matching record exists in invoices with the same code. SQL:
SELECT id FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = egiv.code );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "id", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06836
train
v3
Schema: branches (alias: agov)(status, id, salary, date) items(date, type, value, code) Task: Retrieve value from branches with salary above the MIN(salary) of items rows sharing the same id. SQL:
SELECT value FROM branches AS agov WHERE salary > ( SELECT MIN(salary) FROM items AS ikob WHERE ikob.id = agov.id );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06837
train
v1
Schema: invoices (alias: fal)(salary, level, code, amount) branches(type, status, date, amount) Task: Find amount from invoices where status appears in branches entries with matching level. SQL:
SELECT amount FROM invoices AS fal WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.level = fal.level );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06838
train
v2
Schema: schedules (alias: vmob)(date, level, value, status) projects(status, date, type, salary) Task: Find name from schedules where a matching record exists in projects with the same id. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "name", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06839
train
v1
Schema: managers (alias: hac)(type, date, level, name) sales(status, level, amount, value) Task: Find salary from managers where status appears in sales entries with matching type. SQL:
SELECT salary FROM managers AS hac WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.type = hac.type );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "salary", "filter_col": "status", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06840
train
v1
Schema: products (alias: nad)(salary, name, amount, id) projects(type, value, salary, date) Task: Find name from products where code appears in projects entries with matching code. SQL:
SELECT name FROM products AS nad WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.code = nad.code );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06841
train
v2
Schema: products (alias: nad)(status, date, level, type) accounts(value, code, status, id) Task: Retrieve id from products that have at least one corresponding entry in accounts sharing the same type. SQL:
SELECT id FROM products AS nad WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = nad.type );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "id", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06842
train
v1
Schema: projects (alias: uliv)(id, type, code, level) staff(value, type, name, id) Task: Find name from projects where status appears in staff entries with matching type. SQL:
SELECT name FROM projects AS uliv WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06843
train
v3
Schema: accounts (alias: jac)(code, name, value, type) branches(name, type, code, salary) Task: Find value from accounts where salary exceeds the minimum salary from branches for the same id. SQL:
SELECT value FROM accounts AS jac WHERE salary > ( SELECT MIN(salary) FROM branches AS agov WHERE agov.id = jac.id );
{ "outer_table": "accounts", "inner_table": "branches", "outer_alias": "jac", "inner_alias": "agov", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06844
train
v1
Schema: transactions (alias: gev)(date, level, value, status) employees(type, date, level, status) Task: Retrieve code from transactions whose id is found in employees rows where id matches the outer record. SQL:
SELECT code FROM transactions AS gev WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.id = gev.id );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "gev", "inner_alias": "bev", "proj_col": "code", "filter_col": "id", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06845
train
v1
Schema: shipments (alias: vnob)(date, status, id, name) requests(name, type, amount, date) Task: Find value from shipments where type appears in requests entries with matching status. SQL:
SELECT value FROM shipments AS vnob WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "requests", "outer_alias": "vnob", "inner_alias": "ejof", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06846
train
v1
Schema: categories (alias: egiv)(name, value, code, date) requests(type, id, status, date) Task: Find salary from categories where id appears in requests entries with matching id. SQL:
SELECT salary FROM categories AS egiv WHERE id IN ( SELECT id 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": "id", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06847
train
v1
Schema: accounts (alias: jac)(level, type, amount, salary) departments(status, name, code, type) Task: Select name from accounts where code exists in departments for the same type. SQL:
SELECT name FROM accounts AS jac WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.type = jac.type );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "name", "filter_col": "code", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06848
train
v3
Schema: orders (alias: kab)(value, status, name, amount) requests(code, name, id, salary) Task: Retrieve id from orders with salary above the MIN(amount) of requests rows sharing the same type. SQL:
SELECT id FROM orders AS kab WHERE salary > ( SELECT MIN(amount) FROM requests AS ejof WHERE ejof.type = kab.type );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06849
train
v3
Schema: departments (alias: dov)(level, name, type, status) projects(level, amount, value, name) Task: Find code from departments where value exceeds the total amount from projects for the same status. SQL:
SELECT code FROM departments AS dov WHERE value > ( SELECT SUM(amount) FROM projects AS uliv WHERE uliv.status = dov.status );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06850
train
v2
Schema: shipments (alias: vnob)(value, name, amount, date) regions(level, status, id, value) Task: Retrieve salary from shipments that have at least one corresponding entry in regions sharing the same level. SQL:
SELECT salary FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "salary", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06851
train
v3
Schema: shipments (alias: vnob)(id, name, type, date) employees(value, type, code, date) Task: Find name from shipments where amount exceeds the count of salary from employees for the same id. SQL:
SELECT name FROM shipments AS vnob WHERE amount > ( SELECT COUNT(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": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06852
train
v2
Schema: customers (alias: lex)(id, salary, level, status) invoices(code, date, name, amount) Task: Retrieve name from customers that have at least one corresponding entry in invoices sharing the same level. SQL:
SELECT name FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = lex.level );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "lex", "inner_alias": "fal", "proj_col": "name", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06853
train
v1
Schema: staff (alias: xnob)(value, type, level, id) customers(date, amount, status, salary) Task: Find code from staff where status appears in customers entries with matching id. SQL:
SELECT code FROM staff AS xnob WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.id = xnob.id );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "code", "filter_col": "status", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06854
train
v2
Schema: tasks (alias: znob)(status, salary, id, date) branches(value, amount, name, status) Task: Retrieve value from tasks that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = znob.code );
{ "outer_table": "tasks", "inner_table": "branches", "outer_alias": "znob", "inner_alias": "agov", "proj_col": "value", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06855
train
v1
Schema: projects (alias: uliv)(value, amount, level, name) staff(date, code, level, status) Task: Select value from projects where id exists in staff for the same type. SQL:
SELECT value FROM projects AS uliv WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06856
train
v2
Schema: staff (alias: xnob)(salary, date, name, level) transactions(code, id, value, date) Task: Retrieve value from staff that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT value FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = xnob.code );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "xnob", "inner_alias": "gev", "proj_col": "value", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06857
train
v3
Schema: regions (alias: okiv)(amount, name, level, value) shipments(salary, amount, status, value) Task: Retrieve name from regions with amount above the AVG(amount) of shipments rows sharing the same status. SQL:
SELECT name FROM regions AS okiv WHERE amount > ( SELECT AVG(amount) FROM shipments AS vnob WHERE vnob.status = okiv.status );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "okiv", "inner_alias": "vnob", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06858
train
v3
Schema: departments (alias: dov)(type, code, level, name) items(amount, level, date, status) Task: Find name from departments where amount exceeds the minimum salary from items for the same type. SQL:
SELECT name FROM departments AS dov WHERE amount > ( SELECT MIN(salary) FROM items AS ikob WHERE ikob.type = dov.type );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06859
train
v1
Schema: projects (alias: uliv)(amount, type, name, salary) requests(amount, status, name, value) Task: Select name from projects where id exists in requests for the same code. SQL:
SELECT name FROM projects AS uliv WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.code = uliv.code );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06860
train
v3
Schema: requests (alias: ejof)(type, id, value, code) shipments(value, status, amount, code) Task: Find id from requests where salary exceeds the total amount from shipments for the same type. SQL:
SELECT id FROM requests AS ejof WHERE salary > ( SELECT SUM(amount) FROM shipments AS vnob WHERE vnob.type = ejof.type );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ejof", "inner_alias": "vnob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06861
train
v2
Schema: requests (alias: ejof)(amount, id, type, name) invoices(value, code, name, status) Task: Retrieve id from requests that have at least one corresponding entry in invoices sharing the same level. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = ejof.level );
{ "outer_table": "requests", "inner_table": "invoices", "outer_alias": "ejof", "inner_alias": "fal", "proj_col": "id", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06862
train
v2
Schema: departments (alias: dov)(amount, id, value, salary) categories(name, value, date, salary) Task: Find code from departments where a matching record exists in categories with the same level. SQL:
SELECT code FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = dov.level );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dov", "inner_alias": "egiv", "proj_col": "code", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06863
train
v2
Schema: accounts (alias: jac)(salary, status, id, date) customers(date, code, salary, value) Task: Find amount from accounts where a matching record exists in customers with the same type. SQL:
SELECT amount FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = jac.type );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "amount", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06864
train
v1
Schema: invoices (alias: fal)(code, status, type, name) staff(id, code, name, level) Task: Find value from invoices where id appears in staff entries with matching status. SQL:
SELECT value FROM invoices AS fal WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.status = fal.status );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "value", "filter_col": "id", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06865
train
v1
Schema: employees (alias: bev)(status, salary, value, code) requests(level, name, amount, code) Task: Find value from employees where level appears in requests entries with matching type. SQL:
SELECT value FROM employees AS bev WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.type = bev.type );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "value", "filter_col": "level", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06866
train
v2
Schema: staff (alias: xnob)(type, level, code, date) customers(level, type, status, amount) Task: Find amount from staff where a matching record exists in customers with the same type. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = xnob.type );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "amount", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06867
train
v3
Schema: employees (alias: bev)(salary, level, date, id) branches(level, status, value, name) Task: Retrieve salary from employees with amount above the MAX(value) of branches rows sharing the same code. SQL:
SELECT salary FROM employees AS bev WHERE amount > ( SELECT MAX(value) FROM branches AS agov WHERE agov.code = bev.code );
{ "outer_table": "employees", "inner_table": "branches", "outer_alias": "bev", "inner_alias": "agov", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06868
train
v3
Schema: schedules (alias: vmob)(value, id, level, status) products(status, id, date, name) Task: Find amount from schedules where value exceeds the minimum salary from products for the same status. SQL:
SELECT amount FROM schedules AS vmob WHERE value > ( SELECT MIN(salary) FROM products AS nad WHERE nad.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06869
train
v3
Schema: products (alias: nad)(salary, amount, name, code) staff(type, date, name, id) Task: Retrieve id from products with value above the SUM(salary) of staff rows sharing the same status. SQL:
SELECT id FROM products AS nad WHERE value > ( SELECT SUM(salary) FROM staff AS xnob WHERE xnob.status = nad.status );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06870
train
v3
Schema: shipments (alias: vnob)(status, date, type, level) customers(level, amount, type, id) Task: Retrieve value from shipments with salary above the MIN(amount) of customers rows sharing the same id. SQL:
SELECT value FROM shipments AS vnob WHERE salary > ( SELECT MIN(amount) FROM customers AS lex WHERE lex.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06871
train
v3
Schema: projects (alias: uliv)(level, name, salary, amount) sales(name, value, level, type) Task: Find id from projects where value exceeds the maximum value from sales for the same level. SQL:
SELECT id FROM projects AS uliv WHERE value > ( SELECT MAX(value) FROM sales AS cif WHERE cif.level = uliv.level );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06872
train
v3
Schema: regions (alias: okiv)(code, value, type, name) orders(name, value, amount, level) Task: Find code from regions where salary exceeds the total amount from orders for the same status. SQL:
SELECT code FROM regions AS okiv WHERE salary > ( SELECT SUM(amount) FROM orders AS kab WHERE kab.status = okiv.status );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06873
train
v3
Schema: transactions (alias: gev)(salary, amount, status, type) products(date, level, value, salary) Task: Retrieve id from transactions with salary above the MAX(amount) of products rows sharing the same id. SQL:
SELECT id FROM transactions AS gev WHERE salary > ( SELECT MAX(amount) FROM products AS nad WHERE nad.id = gev.id );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06874
train
v2
Schema: regions (alias: okiv)(date, status, salary, code) staff(code, type, level, status) Task: Retrieve id from regions that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT id FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "okiv", "inner_alias": "xnob", "proj_col": "id", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06875
train
v2
Schema: categories (alias: egiv)(salary, type, status, date) branches(value, code, salary, amount) Task: Retrieve code from categories that have at least one corresponding entry in branches sharing the same level. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.level = egiv.level );
{ "outer_table": "categories", "inner_table": "branches", "outer_alias": "egiv", "inner_alias": "agov", "proj_col": "code", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06876
train
v3
Schema: categories (alias: egiv)(level, type, name, value) invoices(level, code, salary, status) Task: Retrieve value from categories with value above the AVG(salary) of invoices rows sharing the same type. SQL:
SELECT value FROM categories AS egiv WHERE value > ( SELECT AVG(salary) FROM invoices AS fal WHERE fal.type = egiv.type );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06877
train
v2
Schema: orders (alias: kab)(level, id, type, value) categories(type, date, level, value) Task: Retrieve value from orders that have at least one corresponding entry in categories sharing the same level. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = kab.level );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "value", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06878
train
v2
Schema: requests (alias: ejof)(salary, status, code, amount) customers(type, salary, amount, status) Task: Find salary from requests where a matching record exists in customers with the same id. SQL:
SELECT salary FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = ejof.id );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "salary", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06879
train
v1
Schema: departments (alias: dov)(name, type, amount, salary) managers(name, status, salary, date) Task: Retrieve amount from departments whose level is found in managers rows where code matches the outer record. SQL:
SELECT amount FROM departments AS dov WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.code = dov.code );
{ "outer_table": "departments", "inner_table": "managers", "outer_alias": "dov", "inner_alias": "hac", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06880
train
v3
Schema: staff (alias: xnob)(date, id, type, level) orders(level, amount, id, status) Task: Retrieve amount from staff with value above the MIN(amount) of orders rows sharing the same type. SQL:
SELECT amount FROM staff AS xnob WHERE value > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.type = xnob.type );
{ "outer_table": "staff", "inner_table": "orders", "outer_alias": "xnob", "inner_alias": "kab", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06881
train
v2
Schema: managers (alias: hac)(amount, level, salary, code) items(amount, code, type, status) Task: Retrieve value from managers that have at least one corresponding entry in items sharing the same status. SQL:
SELECT value FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = hac.status );
{ "outer_table": "managers", "inner_table": "items", "outer_alias": "hac", "inner_alias": "ikob", "proj_col": "value", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06882
train
v3
Schema: sales (alias: cif)(status, salary, name, type) shipments(id, amount, type, name) Task: Retrieve salary from sales with value above the AVG(amount) of shipments rows sharing the same status. SQL:
SELECT salary FROM sales AS cif WHERE value > ( SELECT AVG(amount) FROM shipments AS vnob WHERE vnob.status = cif.status );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06883
train
v1
Schema: categories (alias: egiv)(salary, id, level, code) customers(value, amount, name, date) Task: Find code from categories where id appears in customers entries with matching level. SQL:
SELECT code FROM categories AS egiv WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.level = egiv.level );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06884
train
v2
Schema: sales (alias: cif)(value, status, id, salary) categories(status, salary, level, amount) Task: Find id from sales where a matching record exists in categories with the same type. SQL:
SELECT id FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = cif.type );
{ "outer_table": "sales", "inner_table": "categories", "outer_alias": "cif", "inner_alias": "egiv", "proj_col": "id", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06885
train
v1
Schema: categories (alias: egiv)(value, code, amount, status) invoices(salary, code, type, value) Task: Retrieve value from categories whose code is found in invoices rows where id matches the outer record. SQL:
SELECT value FROM categories AS egiv WHERE code IN ( SELECT code FROM invoices AS fal WHERE fal.id = egiv.id );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "value", "filter_col": "code", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06886
train
v2
Schema: accounts (alias: jac)(date, value, type, amount) shipments(code, value, amount, salary) Task: Find value from accounts where a matching record exists in shipments with the same code. SQL:
SELECT value 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": "value", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06887
train
v1
Schema: categories (alias: egiv)(level, status, name, amount) items(id, status, salary, name) Task: Retrieve name from categories whose id is found in items rows where id matches the outer record. SQL:
SELECT name FROM categories AS egiv WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.id = egiv.id );
{ "outer_table": "categories", "inner_table": "items", "outer_alias": "egiv", "inner_alias": "ikob", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06888
train
v3
Schema: orders (alias: kab)(status, code, amount, value) categories(status, name, date, value) Task: Retrieve code from orders with amount above the COUNT(amount) of categories rows sharing the same type. SQL:
SELECT code FROM orders AS kab WHERE amount > ( SELECT COUNT(amount) FROM categories AS egiv WHERE egiv.type = kab.type );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06889
train
v3
Schema: categories (alias: egiv)(id, value, type, amount) shipments(type, code, name, date) Task: Retrieve value from categories with value above the MIN(salary) of shipments rows sharing the same status. SQL:
SELECT value FROM categories AS egiv WHERE value > ( SELECT MIN(salary) FROM shipments AS vnob WHERE vnob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06890
train
v2
Schema: categories (alias: egiv)(date, value, type, status) employees(code, amount, date, level) Task: Find value from categories where a matching record exists in employees with the same type. SQL:
SELECT value FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.type = egiv.type );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "egiv", "inner_alias": "bev", "proj_col": "value", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06891
train
v2
Schema: products (alias: nad)(salary, status, id, code) employees(value, amount, name, code) Task: Find value from products where a matching record exists in employees with the same code. SQL:
SELECT value FROM products AS nad WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.code = nad.code );
{ "outer_table": "products", "inner_table": "employees", "outer_alias": "nad", "inner_alias": "bev", "proj_col": "value", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06892
train
v2
Schema: transactions (alias: gev)(amount, name, salary, type) sales(level, salary, date, amount) Task: Find code from transactions where a matching record exists in sales with the same code. SQL:
SELECT code FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = gev.code );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "code", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06893
train
v1
Schema: branches (alias: agov)(name, code, amount, type) categories(type, level, name, amount) Task: Find code from branches where status appears in categories entries with matching id. SQL:
SELECT code FROM branches AS agov WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.id = agov.id );
{ "outer_table": "branches", "inner_table": "categories", "outer_alias": "agov", "inner_alias": "egiv", "proj_col": "code", "filter_col": "status", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06894
train
v2
Schema: categories (alias: egiv)(date, salary, value, level) customers(date, amount, status, code) Task: Find amount from categories where a matching record exists in customers with the same id. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = egiv.id );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "amount", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06895
train
v1
Schema: departments (alias: dov)(amount, date, status, type) tasks(code, date, status, level) Task: Retrieve amount from departments whose level is found in tasks rows where id matches the outer record. SQL:
SELECT amount FROM departments AS dov WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.id = dov.id );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dov", "inner_alias": "znob", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06896
train
v1
Schema: projects (alias: uliv)(id, name, value, type) accounts(type, level, value, id) Task: Select id from projects where type exists in accounts for the same code. SQL:
SELECT id FROM projects AS uliv WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.code = uliv.code );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06897
train
v3
Schema: customers (alias: lex)(type, code, level, date) products(date, value, status, code) Task: Find amount from customers where amount exceeds the total salary from products for the same status. SQL:
SELECT amount FROM customers AS lex WHERE amount > ( SELECT SUM(salary) FROM products AS nad WHERE nad.status = lex.status );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06898
train
v2
Schema: branches (alias: agov)(date, type, name, value) tasks(level, date, type, amount) Task: Find amount from branches where a matching record exists in tasks with the same status. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = agov.status );
{ "outer_table": "branches", "inner_table": "tasks", "outer_alias": "agov", "inner_alias": "znob", "proj_col": "amount", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06899
train