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: shipments (alias: vnob)(date, amount, id, value) invoices(value, id, type, status) Task: Retrieve salary from shipments whose status is found in invoices rows where level matches the outer record. SQL:
SELECT salary FROM shipments AS vnob WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "vnob", "inner_alias": "fal", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02000
train
v1
Schema: orders (alias: kab)(salary, status, code, amount) projects(status, salary, name, amount) Task: Select id from orders where level exists in projects for the same type. SQL:
SELECT id FROM orders AS kab WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.type = kab.type );
{ "outer_table": "orders", "inner_table": "projects", "outer_alias": "kab", "inner_alias": "uliv", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02001
train
v1
Schema: requests (alias: ejof)(id, status, code, type) managers(type, code, level, amount) Task: Retrieve amount from requests whose type is found in managers rows where code matches the outer record. SQL:
SELECT amount FROM requests AS ejof WHERE type IN ( SELECT type FROM managers AS hac WHERE hac.code = ejof.code );
{ "outer_table": "requests", "inner_table": "managers", "outer_alias": "ejof", "inner_alias": "hac", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02002
train
v3
Schema: shipments (alias: vnob)(code, amount, level, status) employees(status, code, salary, type) Task: Find name from shipments where amount exceeds the maximum salary from employees for the same status. SQL:
SELECT name FROM shipments AS vnob WHERE amount > ( SELECT MAX(salary) FROM employees AS bev WHERE bev.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02003
train
v2
Schema: sales (alias: cif)(code, amount, date, type) staff(id, type, date, value) Task: Retrieve salary from sales that have at least one corresponding entry in staff sharing the same status. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = cif.status );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "salary", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02004
train
v1
Schema: transactions (alias: gev)(type, level, date, status) products(code, level, id, type) Task: Find salary from transactions where code appears in products entries with matching status. SQL:
SELECT salary FROM transactions AS gev WHERE code IN ( SELECT code FROM products AS nad WHERE nad.status = gev.status );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02005
train
v1
Schema: employees (alias: bev)(salary, amount, date, id) items(status, salary, amount, date) Task: Find salary from employees where level appears in items entries with matching status. SQL:
SELECT salary FROM employees AS bev WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.status = bev.status );
{ "outer_table": "employees", "inner_table": "items", "outer_alias": "bev", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02006
train
v2
Schema: staff (alias: xnob)(id, salary, status, amount) invoices(salary, date, name, code) Task: Find code from staff where a matching record exists in invoices with the same id. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = xnob.id );
{ "outer_table": "staff", "inner_table": "invoices", "outer_alias": "xnob", "inner_alias": "fal", "proj_col": "code", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02007
train
v3
Schema: tasks (alias: znob)(level, type, id, name) accounts(amount, status, type, value) Task: Retrieve salary from tasks with amount above the COUNT(salary) of accounts rows sharing the same status. SQL:
SELECT salary FROM tasks AS znob WHERE amount > ( SELECT COUNT(salary) FROM accounts AS jac WHERE jac.status = znob.status );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02008
train
v2
Schema: products (alias: nad)(value, type, id, date) items(value, date, name, salary) Task: Retrieve amount from products that have at least one corresponding entry in items sharing the same type. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = nad.type );
{ "outer_table": "products", "inner_table": "items", "outer_alias": "nad", "inner_alias": "ikob", "proj_col": "amount", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02009
train
v2
Schema: invoices (alias: fal)(value, code, id, salary) transactions(code, date, level, value) Task: Retrieve code from invoices that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT code FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = fal.code );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "code", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02010
train
v1
Schema: projects (alias: uliv)(status, amount, id, name) items(salary, type, value, date) Task: Retrieve amount from projects whose level is found in items rows where status matches the outer record. SQL:
SELECT amount FROM projects AS uliv WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.status = uliv.status );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02011
train
v1
Schema: shipments (alias: vnob)(salary, type, value, id) branches(date, value, salary, name) Task: Select id from shipments where code exists in branches for the same code. SQL:
SELECT id FROM shipments AS vnob WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "branches", "outer_alias": "vnob", "inner_alias": "agov", "proj_col": "id", "filter_col": "code", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02012
train
v2
Schema: orders (alias: kab)(level, status, value, code) requests(type, salary, code, amount) Task: Retrieve code from orders that have at least one corresponding entry in requests sharing the same status. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = kab.status );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "code", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02013
train
v1
Schema: regions (alias: okiv)(name, level, code, id) products(code, date, status, type) Task: Find code from regions where code appears in products entries with matching code. SQL:
SELECT code FROM regions AS okiv WHERE code IN ( SELECT code FROM products AS nad WHERE nad.code = okiv.code );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02014
train
v3
Schema: requests (alias: ejof)(name, id, code, status) shipments(code, level, value, salary) Task: Find code from requests where value exceeds the maximum amount from shipments for the same type. SQL:
SELECT code FROM requests AS ejof WHERE value > ( SELECT MAX(amount) FROM shipments AS vnob WHERE vnob.type = ejof.type );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ejof", "inner_alias": "vnob", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02015
train
v1
Schema: requests (alias: ejof)(name, type, date, id) customers(name, date, type, id) Task: Select amount from requests where status exists in customers for the same status. SQL:
SELECT amount FROM requests AS ejof WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.status = ejof.status );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02016
train
v2
Schema: customers (alias: lex)(level, amount, date, salary) products(value, code, amount, level) Task: Find id from customers where a matching record exists in products with the same code. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = lex.code );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "id", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02017
train
v2
Schema: invoices (alias: fal)(id, status, type, amount) regions(date, code, id, value) Task: Retrieve code from invoices that have at least one corresponding entry in regions sharing the same id. SQL:
SELECT code FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = fal.id );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "code", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02018
train
v3
Schema: schedules (alias: vmob)(code, amount, salary, value) orders(status, date, salary, level) Task: Retrieve value from schedules with value above the SUM(amount) of orders rows sharing the same status. SQL:
SELECT value FROM schedules AS vmob WHERE value > ( SELECT SUM(amount) FROM orders AS kab WHERE kab.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "orders", "outer_alias": "vmob", "inner_alias": "kab", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02019
train
v2
Schema: branches (alias: agov)(status, amount, level, id) projects(value, status, code, level) Task: Retrieve value from branches that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT value FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = agov.code );
{ "outer_table": "branches", "inner_table": "projects", "outer_alias": "agov", "inner_alias": "uliv", "proj_col": "value", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02020
train
v3
Schema: customers (alias: lex)(level, name, id, code) invoices(amount, level, code, type) Task: Retrieve value from customers with value above the COUNT(salary) of invoices rows sharing the same id. SQL:
SELECT value FROM customers AS lex WHERE value > ( SELECT COUNT(salary) FROM invoices AS fal WHERE fal.id = lex.id );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "lex", "inner_alias": "fal", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02021
train
v1
Schema: categories (alias: egiv)(date, level, code, id) sales(date, name, id, value) Task: Select name from categories where status exists in sales for the same status. SQL:
SELECT name 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": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02022
train
v3
Schema: products (alias: nad)(value, amount, code, status) categories(type, amount, salary, name) Task: Find salary from products where value exceeds the maximum value from categories for the same level. SQL:
SELECT salary FROM products AS nad WHERE value > ( SELECT MAX(value) FROM categories AS egiv WHERE egiv.level = nad.level );
{ "outer_table": "products", "inner_table": "categories", "outer_alias": "nad", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02023
train
v3
Schema: branches (alias: agov)(id, date, name, type) transactions(value, amount, name, status) Task: Retrieve value from branches with amount above the COUNT(salary) of transactions rows sharing the same code. SQL:
SELECT value FROM branches AS agov WHERE amount > ( SELECT COUNT(salary) FROM transactions AS gev WHERE gev.code = agov.code );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02024
train
v3
Schema: managers (alias: hac)(type, code, date, salary) employees(value, date, type, id) Task: Retrieve name from managers with value above the SUM(amount) of employees rows sharing the same type. SQL:
SELECT name FROM managers AS hac WHERE value > ( SELECT SUM(amount) FROM employees AS bev WHERE bev.type = hac.type );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02025
train
v1
Schema: branches (alias: agov)(amount, status, value, date) managers(code, amount, status, level) Task: Retrieve amount from branches whose code is found in managers rows where id matches the outer record. SQL:
SELECT amount FROM branches AS agov WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.id = agov.id );
{ "outer_table": "branches", "inner_table": "managers", "outer_alias": "agov", "inner_alias": "hac", "proj_col": "amount", "filter_col": "code", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02026
train
v1
Schema: managers (alias: hac)(amount, level, date, salary) transactions(value, type, id, code) Task: Select name from managers where id exists in transactions for the same code. SQL:
SELECT name FROM managers AS hac WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.code = hac.code );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02027
train
v2
Schema: employees (alias: bev)(salary, amount, status, date) invoices(salary, amount, id, value) Task: Find amount from employees where a matching record exists in invoices with the same id. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = bev.id );
{ "outer_table": "employees", "inner_table": "invoices", "outer_alias": "bev", "inner_alias": "fal", "proj_col": "amount", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02028
train
v2
Schema: orders (alias: kab)(value, level, code, amount) invoices(name, code, level, id) Task: Retrieve id from orders that have at least one corresponding entry in invoices sharing the same status. SQL:
SELECT id FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.status = kab.status );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "kab", "inner_alias": "fal", "proj_col": "id", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02029
train
v1
Schema: categories (alias: egiv)(salary, status, name, amount) employees(name, value, salary, amount) Task: Retrieve salary from categories whose level is found in employees rows where level matches the outer record. SQL:
SELECT salary FROM categories AS egiv WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.level = egiv.level );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "egiv", "inner_alias": "bev", "proj_col": "salary", "filter_col": "level", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02030
train
v2
Schema: transactions (alias: gev)(status, value, type, date) shipments(name, amount, id, date) Task: Find code from transactions where a matching record exists in shipments with the same level. SQL:
SELECT code FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "shipments", "outer_alias": "gev", "inner_alias": "vnob", "proj_col": "code", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02031
train
v1
Schema: customers (alias: lex)(amount, status, date, value) sales(level, value, salary, amount) Task: Retrieve salary from customers whose code is found in sales rows where id matches the outer record. SQL:
SELECT salary FROM customers AS lex WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.id = lex.id );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02032
train
v3
Schema: categories (alias: egiv)(value, name, salary, code) customers(code, type, status, salary) Task: Retrieve name from categories with amount above the AVG(amount) of customers rows sharing the same id. SQL:
SELECT name FROM categories AS egiv WHERE amount > ( SELECT AVG(amount) FROM customers AS lex WHERE lex.id = egiv.id );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02033
train
v3
Schema: items (alias: ikob)(date, salary, name, id) accounts(code, type, value, name) Task: Retrieve salary from items with salary above the MIN(value) of accounts rows sharing the same id. SQL:
SELECT salary FROM items AS ikob WHERE salary > ( SELECT MIN(value) FROM accounts AS jac WHERE jac.id = ikob.id );
{ "outer_table": "items", "inner_table": "accounts", "outer_alias": "ikob", "inner_alias": "jac", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02034
train
v3
Schema: categories (alias: egiv)(date, status, type, level) shipments(level, id, name, status) Task: Find code from categories where amount exceeds the count of amount from shipments for the same id. SQL:
SELECT code FROM categories AS egiv WHERE amount > ( SELECT COUNT(amount) FROM shipments AS vnob WHERE vnob.id = egiv.id );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02035
train
v3
Schema: projects (alias: uliv)(status, id, type, name) transactions(amount, date, code, level) Task: Find value from projects where value exceeds the total value from transactions for the same code. SQL:
SELECT value FROM projects AS uliv WHERE value > ( SELECT SUM(value) FROM transactions AS gev WHERE gev.code = uliv.code );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02036
train
v1
Schema: branches (alias: agov)(value, amount, type, id) departments(date, type, name, code) Task: Find salary from branches where status appears in departments entries with matching id. SQL:
SELECT salary FROM branches AS agov WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.id = agov.id );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02037
train
v3
Schema: invoices (alias: fal)(salary, name, code, id) managers(id, level, type, value) Task: Find salary from invoices where value exceeds the count of amount from managers for the same id. SQL:
SELECT salary FROM invoices AS fal WHERE value > ( SELECT COUNT(amount) FROM managers AS hac WHERE hac.id = fal.id );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02038
train
v2
Schema: sales (alias: cif)(type, status, id, value) requests(value, type, date, amount) Task: Retrieve name from sales that have at least one corresponding entry in requests sharing the same code. SQL:
SELECT name FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = cif.code );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "name", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02039
train
v1
Schema: invoices (alias: fal)(amount, date, type, level) employees(name, salary, code, amount) Task: Select value from invoices where code exists in employees for the same level. SQL:
SELECT value FROM invoices AS fal WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.level = fal.level );
{ "outer_table": "invoices", "inner_table": "employees", "outer_alias": "fal", "inner_alias": "bev", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02040
train
v2
Schema: items (alias: ikob)(value, level, type, status) invoices(salary, code, status, type) Task: Retrieve salary from items that have at least one corresponding entry in invoices sharing the same status. SQL:
SELECT salary FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.status = ikob.status );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "salary", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02041
train
v1
Schema: invoices (alias: fal)(amount, name, type, code) categories(amount, code, status, date) Task: Find value from invoices where type appears in categories entries with matching type. SQL:
SELECT value FROM invoices AS fal WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.type = fal.type );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "value", "filter_col": "type", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02042
train
v2
Schema: invoices (alias: fal)(code, id, value, date) products(type, amount, status, level) Task: Find salary from invoices where a matching record exists in products with the same id. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.id = fal.id );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "salary", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02043
train
v1
Schema: projects (alias: uliv)(date, status, level, amount) staff(type, code, id, salary) Task: Retrieve amount from projects whose status is found in staff rows where code matches the outer record. SQL:
SELECT amount FROM projects AS uliv WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "status", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02044
train
v1
Schema: products (alias: nad)(value, status, amount, code) orders(status, id, name, date) Task: Select amount from products where status exists in orders for the same id. SQL:
SELECT amount FROM products AS nad WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.id = nad.id );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "nad", "inner_alias": "kab", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02045
train
v1
Schema: categories (alias: egiv)(value, date, name, level) tasks(amount, type, value, code) Task: Retrieve value from categories whose type is found in tasks rows where id matches the outer record. SQL:
SELECT value FROM categories AS egiv WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.id = egiv.id );
{ "outer_table": "categories", "inner_table": "tasks", "outer_alias": "egiv", "inner_alias": "znob", "proj_col": "value", "filter_col": "type", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02046
train
v2
Schema: branches (alias: agov)(amount, type, status, level) customers(salary, status, id, date) Task: Retrieve amount from branches that have at least one corresponding entry in customers sharing the same code. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = agov.code );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "amount", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02047
train
v3
Schema: shipments (alias: vnob)(type, code, value, level) regions(amount, status, value, type) Task: Find salary from shipments where amount exceeds the minimum value from regions for the same level. SQL:
SELECT salary FROM shipments AS vnob WHERE amount > ( SELECT MIN(value) FROM regions AS okiv WHERE okiv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02048
train
v3
Schema: sales (alias: cif)(date, id, code, value) employees(date, amount, level, code) Task: Find amount from sales where salary exceeds the minimum value from employees for the same type. SQL:
SELECT amount FROM sales AS cif WHERE salary > ( SELECT MIN(value) FROM employees AS bev WHERE bev.type = cif.type );
{ "outer_table": "sales", "inner_table": "employees", "outer_alias": "cif", "inner_alias": "bev", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02049
train
v2
Schema: staff (alias: xnob)(amount, code, name, salary) requests(amount, type, name, level) Task: Find amount from staff where a matching record exists in requests with the same status. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = xnob.status );
{ "outer_table": "staff", "inner_table": "requests", "outer_alias": "xnob", "inner_alias": "ejof", "proj_col": "amount", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02050
train
v1
Schema: products (alias: nad)(salary, id, amount, level) schedules(value, type, status, level) Task: Select name from products where code exists in schedules for the same code. SQL:
SELECT name FROM products AS nad WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.code = nad.code );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02051
train
v1
Schema: regions (alias: okiv)(name, value, level, type) categories(level, salary, date, status) Task: Retrieve salary from regions whose level is found in categories rows where status matches the outer record. SQL:
SELECT salary FROM regions AS okiv WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.status = okiv.status );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02052
train
v2
Schema: sales (alias: cif)(name, type, id, code) branches(value, date, id, level) Task: Retrieve name from sales that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT name FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = cif.code );
{ "outer_table": "sales", "inner_table": "branches", "outer_alias": "cif", "inner_alias": "agov", "proj_col": "name", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02053
train
v2
Schema: items (alias: ikob)(value, salary, level, type) transactions(id, name, amount, value) Task: Retrieve value from items that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = ikob.code );
{ "outer_table": "items", "inner_table": "transactions", "outer_alias": "ikob", "inner_alias": "gev", "proj_col": "value", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02054
train
v2
Schema: tasks (alias: znob)(type, status, date, salary) items(level, status, date, amount) Task: Retrieve name from tasks that have at least one corresponding entry in items sharing the same id. SQL:
SELECT name FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "name", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02055
train
v1
Schema: staff (alias: xnob)(value, level, type, name) accounts(level, amount, salary, id) Task: Retrieve id from staff whose status is found in accounts rows where id matches the outer record. SQL:
SELECT id FROM staff AS xnob WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.id = xnob.id );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02056
train
v3
Schema: requests (alias: ejof)(date, code, type, salary) products(salary, value, name, id) Task: Retrieve value from requests with amount above the MIN(salary) of products rows sharing the same code. SQL:
SELECT value FROM requests AS ejof WHERE amount > ( SELECT MIN(salary) FROM products AS nad WHERE nad.code = ejof.code );
{ "outer_table": "requests", "inner_table": "products", "outer_alias": "ejof", "inner_alias": "nad", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02057
train
v3
Schema: sales (alias: cif)(amount, level, value, type) accounts(code, id, name, status) Task: Find value from sales where salary exceeds the average amount from accounts for the same code. SQL:
SELECT value FROM sales AS cif WHERE salary > ( SELECT AVG(amount) FROM accounts AS jac WHERE jac.code = cif.code );
{ "outer_table": "sales", "inner_table": "accounts", "outer_alias": "cif", "inner_alias": "jac", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02058
train
v2
Schema: customers (alias: lex)(amount, name, salary, value) staff(date, name, salary, id) Task: Find amount from customers where a matching record exists in staff with the same code. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = lex.code );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "amount", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02059
train
v3
Schema: requests (alias: ejof)(name, salary, value, level) employees(amount, type, level, status) Task: Find code from requests where amount exceeds the average salary from employees for the same level. SQL:
SELECT code FROM requests AS ejof WHERE amount > ( SELECT AVG(salary) FROM employees AS bev WHERE bev.level = ejof.level );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ejof", "inner_alias": "bev", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02060
train
v2
Schema: managers (alias: hac)(salary, date, status, amount) items(name, value, date, type) Task: Find salary from managers where a matching record exists in items with the same id. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.id = hac.id );
{ "outer_table": "managers", "inner_table": "items", "outer_alias": "hac", "inner_alias": "ikob", "proj_col": "salary", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02061
train
v2
Schema: staff (alias: xnob)(type, salary, date, value) managers(value, status, type, amount) Task: Retrieve code from staff that have at least one corresponding entry in managers sharing the same type. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = xnob.type );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "xnob", "inner_alias": "hac", "proj_col": "code", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02062
train
v2
Schema: departments (alias: dov)(salary, name, status, level) requests(level, name, date, salary) Task: Retrieve id from departments that have at least one corresponding entry in requests sharing the same code. SQL:
SELECT id FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = dov.code );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "id", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02063
train
v2
Schema: tasks (alias: znob)(code, id, date, name) departments(amount, code, type, name) Task: Retrieve salary from tasks that have at least one corresponding entry in departments sharing the same type. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = znob.type );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "salary", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02064
train
v3
Schema: transactions (alias: gev)(id, amount, date, code) products(level, code, type, name) Task: Find salary from transactions where salary exceeds the count of value from products for the same status. SQL:
SELECT salary FROM transactions AS gev WHERE salary > ( SELECT COUNT(value) FROM products AS nad WHERE nad.status = gev.status );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02065
train
v3
Schema: requests (alias: ejof)(salary, level, name, code) departments(id, level, date, value) Task: Find name from requests where value exceeds the maximum value from departments for the same level. SQL:
SELECT name FROM requests AS ejof WHERE value > ( SELECT MAX(value) FROM departments AS dov WHERE dov.level = ejof.level );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02066
train
v2
Schema: branches (alias: agov)(value, level, type, salary) requests(level, status, id, name) Task: Retrieve salary from branches that have at least one corresponding entry in requests sharing the same id. SQL:
SELECT salary FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = agov.id );
{ "outer_table": "branches", "inner_table": "requests", "outer_alias": "agov", "inner_alias": "ejof", "proj_col": "salary", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02067
train
v2
Schema: tasks (alias: znob)(name, code, status, date) sales(date, amount, code, type) Task: Find amount from tasks where a matching record exists in sales with the same type. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = znob.type );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "znob", "inner_alias": "cif", "proj_col": "amount", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02068
train
v3
Schema: transactions (alias: gev)(salary, value, amount, type) products(code, date, level, amount) Task: Retrieve value from transactions with amount above the COUNT(amount) of products rows sharing the same type. SQL:
SELECT value FROM transactions AS gev WHERE amount > ( SELECT COUNT(amount) FROM products AS nad WHERE nad.type = gev.type );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02069
train
v2
Schema: customers (alias: lex)(status, amount, code, level) items(type, value, code, name) Task: Retrieve name from customers that have at least one corresponding entry in items sharing the same type. SQL:
SELECT name FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = lex.type );
{ "outer_table": "customers", "inner_table": "items", "outer_alias": "lex", "inner_alias": "ikob", "proj_col": "name", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02070
train
v2
Schema: projects (alias: uliv)(code, id, value, salary) items(name, date, type, code) Task: Find id from projects where a matching record exists in items with the same status. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = uliv.status );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "id", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02071
train
v1
Schema: staff (alias: xnob)(id, amount, code, level) regions(amount, level, salary, name) Task: Retrieve name from staff whose id is found in regions rows where status matches the outer record. SQL:
SELECT name FROM staff AS xnob WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.status = xnob.status );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02072
train
v2
Schema: tasks (alias: znob)(status, level, name, type) items(value, status, salary, id) Task: Retrieve value from tasks that have at least one corresponding entry in items sharing the same level. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = znob.level );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "value", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02073
train
v3
Schema: regions (alias: okiv)(id, type, amount, value) invoices(name, date, id, value) Task: Retrieve id from regions with amount above the AVG(amount) of invoices rows sharing the same code. SQL:
SELECT id FROM regions AS okiv WHERE amount > ( SELECT AVG(amount) FROM invoices AS fal WHERE fal.code = okiv.code );
{ "outer_table": "regions", "inner_table": "invoices", "outer_alias": "okiv", "inner_alias": "fal", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02074
train
v1
Schema: orders (alias: kab)(id, amount, value, salary) departments(status, id, type, code) Task: Select id from orders where type exists in departments for the same level. SQL:
SELECT id FROM orders AS kab WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.level = kab.level );
{ "outer_table": "orders", "inner_table": "departments", "outer_alias": "kab", "inner_alias": "dov", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02075
train
v1
Schema: managers (alias: hac)(salary, date, id, type) sales(date, level, type, status) Task: Retrieve id from managers whose level is found in sales rows where status matches the outer record. SQL:
SELECT id FROM managers AS hac WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.status = hac.status );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "id", "filter_col": "level", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02076
train
v1
Schema: staff (alias: xnob)(value, id, status, name) accounts(name, salary, date, type) Task: Find salary from staff where level appears in accounts entries with matching id. SQL:
SELECT salary FROM staff AS xnob WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.id = xnob.id );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02077
train
v1
Schema: sales (alias: cif)(amount, date, id, level) invoices(name, status, level, code) Task: Find salary from sales where type appears in invoices entries with matching code. SQL:
SELECT salary FROM sales AS cif WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.code = cif.code );
{ "outer_table": "sales", "inner_table": "invoices", "outer_alias": "cif", "inner_alias": "fal", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02078
train
v3
Schema: requests (alias: ejof)(name, level, date, salary) projects(code, type, date, value) Task: Retrieve salary from requests with value above the MAX(salary) of projects rows sharing the same type. SQL:
SELECT salary FROM requests AS ejof WHERE value > ( SELECT MAX(salary) FROM projects AS uliv WHERE uliv.type = ejof.type );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02079
train
v3
Schema: orders (alias: kab)(level, code, type, date) projects(status, id, date, code) Task: Find id from orders where value exceeds the average value from projects for the same level. SQL:
SELECT id FROM orders AS kab WHERE value > ( SELECT AVG(value) FROM projects AS uliv WHERE uliv.level = kab.level );
{ "outer_table": "orders", "inner_table": "projects", "outer_alias": "kab", "inner_alias": "uliv", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02080
train
v1
Schema: items (alias: ikob)(type, value, name, salary) sales(level, name, salary, date) Task: Select name from items where type exists in sales for the same id. SQL:
SELECT name FROM items AS ikob WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.id = ikob.id );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "name", "filter_col": "type", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02081
train
v3
Schema: regions (alias: okiv)(id, name, code, salary) orders(salary, name, value, id) Task: Find salary from regions where salary exceeds the average value from orders for the same id. SQL:
SELECT salary FROM regions AS okiv WHERE salary > ( SELECT AVG(value) FROM orders AS kab WHERE kab.id = okiv.id );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02082
train
v1
Schema: branches (alias: agov)(id, name, code, salary) orders(value, amount, id, salary) Task: Select name from branches where level exists in orders for the same level. SQL:
SELECT name FROM branches AS agov WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.level = agov.level );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "name", "filter_col": "level", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02083
train
v2
Schema: accounts (alias: jac)(amount, type, salary, value) products(name, level, type, salary) Task: Find amount from accounts where a matching record exists in products with the same code. SQL:
SELECT amount FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = jac.code );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "jac", "inner_alias": "nad", "proj_col": "amount", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02084
train
v2
Schema: items (alias: ikob)(code, type, date, level) shipments(id, type, status, code) Task: Find amount from items where a matching record exists in shipments with the same type. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = ikob.type );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "amount", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02085
train
v3
Schema: projects (alias: uliv)(name, date, salary, code) transactions(name, id, date, level) Task: Retrieve code from projects with amount above the COUNT(value) of transactions rows sharing the same code. SQL:
SELECT code FROM projects AS uliv WHERE amount > ( SELECT COUNT(value) FROM transactions AS gev WHERE gev.code = uliv.code );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02086
train
v1
Schema: employees (alias: bev)(salary, name, amount, code) items(level, code, date, amount) Task: Retrieve amount from employees whose id is found in items rows where code matches the outer record. SQL:
SELECT amount FROM employees AS bev WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.code = bev.code );
{ "outer_table": "employees", "inner_table": "items", "outer_alias": "bev", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02087
train
v1
Schema: schedules (alias: vmob)(date, amount, level, status) regions(value, type, name, code) Task: Find salary from schedules where type appears in regions entries with matching type. SQL:
SELECT salary FROM schedules AS vmob WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02088
train
v3
Schema: schedules (alias: vmob)(date, status, level, salary) employees(amount, code, value, date) Task: Retrieve name from schedules with salary above the COUNT(amount) of employees rows sharing the same type. SQL:
SELECT name FROM schedules AS vmob WHERE salary > ( SELECT COUNT(amount) FROM employees AS bev WHERE bev.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "vmob", "inner_alias": "bev", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02089
train
v2
Schema: departments (alias: dov)(amount, name, value, type) items(status, name, code, level) Task: Retrieve amount from departments that have at least one corresponding entry in items sharing the same level. SQL:
SELECT amount 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": "amount", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02090
train
v2
Schema: categories (alias: egiv)(type, level, value, id) projects(type, id, value, date) Task: Find value from categories where a matching record exists in projects with the same level. SQL:
SELECT value FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.level = egiv.level );
{ "outer_table": "categories", "inner_table": "projects", "outer_alias": "egiv", "inner_alias": "uliv", "proj_col": "value", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02091
train
v2
Schema: shipments (alias: vnob)(amount, code, name, id) invoices(type, amount, name, value) Task: Find value from shipments where a matching record exists in invoices with the same code. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "vnob", "inner_alias": "fal", "proj_col": "value", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02092
train
v1
Schema: schedules (alias: vmob)(status, code, id, value) sales(type, code, value, salary) Task: Find id from schedules where type appears in sales entries with matching code. SQL:
SELECT id FROM schedules AS vmob WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "vmob", "inner_alias": "cif", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02093
train
v2
Schema: requests (alias: ejof)(salary, id, date, level) staff(salary, name, level, amount) Task: Find value from requests where a matching record exists in staff with the same status. SQL:
SELECT value FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ejof", "inner_alias": "xnob", "proj_col": "value", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02094
train
v1
Schema: employees (alias: bev)(status, value, salary, name) staff(value, name, code, status) Task: Retrieve id from employees whose type is found in staff rows where id matches the outer record. SQL:
SELECT id FROM employees AS bev WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.id = bev.id );
{ "outer_table": "employees", "inner_table": "staff", "outer_alias": "bev", "inner_alias": "xnob", "proj_col": "id", "filter_col": "type", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02095
train
v3
Schema: employees (alias: bev)(name, code, status, id) shipments(type, date, salary, value) Task: Find id from employees where amount exceeds the total value from shipments for the same type. SQL:
SELECT id FROM employees AS bev WHERE amount > ( SELECT SUM(value) FROM shipments AS vnob WHERE vnob.type = bev.type );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02096
train
v2
Schema: products (alias: nad)(amount, name, id, value) managers(code, name, id, salary) Task: Find value from products where a matching record exists in managers with the same code. SQL:
SELECT value FROM products AS nad WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = nad.code );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "nad", "inner_alias": "hac", "proj_col": "value", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02097
train
v1
Schema: departments (alias: dov)(salary, type, status, id) customers(date, salary, value, amount) Task: Find salary from departments where type appears in customers entries with matching code. SQL:
SELECT salary FROM departments AS dov WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.code = dov.code );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02098
train
v3
Schema: schedules (alias: vmob)(date, type, code, amount) shipments(amount, salary, name, code) Task: Find code from schedules where amount exceeds the minimum salary from shipments for the same status. SQL:
SELECT code FROM schedules AS vmob WHERE amount > ( SELECT MIN(salary) FROM shipments AS vnob WHERE vnob.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "shipments", "outer_alias": "vmob", "inner_alias": "vnob", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02099
train