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: staff (alias: xnob)(status, amount, id, name) departments(id, name, date, value) Task: Find code from staff where a matching record exists in departments with the same code. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = xnob.code );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "code", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08300
train
v2
Schema: accounts (alias: jac)(id, value, name, date) products(code, type, name, status) Task: Retrieve code from accounts that have at least one corresponding entry in products sharing the same type. SQL:
SELECT code FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = jac.type );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "jac", "inner_alias": "nad", "proj_col": "code", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08301
train
v3
Schema: requests (alias: ejof)(type, level, id, value) transactions(type, amount, name, level) Task: Find value from requests where amount exceeds the total salary from transactions for the same level. SQL:
SELECT value FROM requests AS ejof WHERE amount > ( SELECT SUM(salary) FROM transactions AS gev WHERE gev.level = ejof.level );
{ "outer_table": "requests", "inner_table": "transactions", "outer_alias": "ejof", "inner_alias": "gev", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08302
train
v1
Schema: sales (alias: cif)(name, value, salary, date) regions(amount, code, value, level) Task: Retrieve salary from sales whose code is found in regions rows where id matches the outer record. SQL:
SELECT salary FROM sales AS cif WHERE code IN ( SELECT code FROM regions AS okiv WHERE okiv.id = cif.id );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08303
train
v3
Schema: projects (alias: uliv)(type, level, date, value) transactions(name, id, value, amount) Task: Find code from projects where amount exceeds the maximum salary from transactions for the same level. SQL:
SELECT code FROM projects AS uliv WHERE amount > ( SELECT MAX(salary) FROM transactions AS gev WHERE gev.level = uliv.level );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08304
train
v1
Schema: employees (alias: bev)(status, value, salary, date) regions(salary, value, level, code) Task: Select value from employees where type exists in regions for the same status. SQL:
SELECT value FROM employees AS bev WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.status = bev.status );
{ "outer_table": "employees", "inner_table": "regions", "outer_alias": "bev", "inner_alias": "okiv", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08305
train
v2
Schema: accounts (alias: jac)(id, amount, salary, status) departments(status, level, code, type) Task: Retrieve name from accounts that have at least one corresponding entry in departments sharing the same status. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = jac.status );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "name", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08306
train
v3
Schema: branches (alias: agov)(value, name, amount, id) employees(amount, status, date, salary) Task: Retrieve amount from branches with value above the SUM(value) of employees rows sharing the same level. SQL:
SELECT amount FROM branches AS agov WHERE value > ( SELECT SUM(value) FROM employees AS bev WHERE bev.level = agov.level );
{ "outer_table": "branches", "inner_table": "employees", "outer_alias": "agov", "inner_alias": "bev", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08307
train
v2
Schema: products (alias: nad)(code, status, amount, name) invoices(id, type, code, value) Task: Find name from products where a matching record exists in invoices with the same code. SQL:
SELECT name FROM products AS nad WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = nad.code );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "name", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08308
train
v2
Schema: shipments (alias: vnob)(name, salary, date, status) customers(level, date, status, salary) Task: Find value from shipments where a matching record exists in customers with the same level. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "value", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08309
train
v3
Schema: sales (alias: cif)(value, date, code, status) items(date, id, salary, level) Task: Retrieve salary from sales with salary above the SUM(salary) of items rows sharing the same type. SQL:
SELECT salary FROM sales AS cif WHERE salary > ( SELECT SUM(salary) FROM items AS ikob WHERE ikob.type = cif.type );
{ "outer_table": "sales", "inner_table": "items", "outer_alias": "cif", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08310
train
v1
Schema: invoices (alias: fal)(salary, level, value, id) managers(status, name, amount, id) Task: Select code from invoices where id exists in managers for the same type. SQL:
SELECT code FROM invoices AS fal WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.type = fal.type );
{ "outer_table": "invoices", "inner_table": "managers", "outer_alias": "fal", "inner_alias": "hac", "proj_col": "code", "filter_col": "id", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08311
train
v3
Schema: managers (alias: hac)(name, amount, type, salary) employees(id, name, code, status) Task: Find code from managers where value exceeds the total amount from employees for the same code. SQL:
SELECT code FROM managers AS hac WHERE value > ( SELECT SUM(amount) FROM employees AS bev WHERE bev.code = hac.code );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08312
train
v1
Schema: requests (alias: ejof)(value, level, id, status) branches(name, date, level, type) Task: Find name from requests where status appears in branches entries with matching code. SQL:
SELECT name FROM requests AS ejof WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.code = ejof.code );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08313
train
v3
Schema: sales (alias: cif)(value, code, amount, status) staff(amount, name, level, type) Task: Find name from sales where value exceeds the count of amount from staff for the same type. SQL:
SELECT name FROM sales AS cif WHERE value > ( SELECT COUNT(amount) FROM staff AS xnob WHERE xnob.type = cif.type );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08314
train
v3
Schema: requests (alias: ejof)(value, salary, type, id) products(amount, status, id, value) Task: Find salary from requests where amount exceeds the average salary from products for the same code. SQL:
SELECT salary FROM requests AS ejof WHERE amount > ( SELECT AVG(salary) FROM products AS nad WHERE nad.code = ejof.code );
{ "outer_table": "requests", "inner_table": "products", "outer_alias": "ejof", "inner_alias": "nad", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08315
train
v2
Schema: regions (alias: okiv)(id, date, code, amount) orders(name, value, amount, salary) Task: Find value from regions where a matching record exists in orders with the same status. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = okiv.status );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "value", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08316
train
v3
Schema: customers (alias: lex)(value, id, salary, amount) branches(date, type, amount, code) Task: Retrieve id from customers with value above the MIN(salary) of branches rows sharing the same id. SQL:
SELECT id FROM customers AS lex WHERE value > ( SELECT MIN(salary) FROM branches AS agov WHERE agov.id = lex.id );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08317
train
v2
Schema: transactions (alias: gev)(id, status, type, amount) requests(level, date, id, salary) Task: Find id from transactions where a matching record exists in requests with the same id. SQL:
SELECT id FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = gev.id );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "id", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08318
train
v3
Schema: invoices (alias: fal)(amount, type, name, status) staff(date, name, amount, level) Task: Retrieve salary from invoices with salary above the AVG(salary) of staff rows sharing the same id. SQL:
SELECT salary FROM invoices AS fal WHERE salary > ( SELECT AVG(salary) FROM staff AS xnob WHERE xnob.id = fal.id );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08319
train
v3
Schema: staff (alias: xnob)(salary, date, amount, value) products(amount, value, code, date) Task: Find id from staff where value exceeds the average salary from products for the same level. SQL:
SELECT id FROM staff AS xnob WHERE value > ( SELECT AVG(salary) FROM products AS nad WHERE nad.level = xnob.level );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08320
train
v2
Schema: orders (alias: kab)(code, salary, amount, name) departments(code, level, value, amount) Task: Find id from orders where a matching record exists in departments with the same type. SQL:
SELECT id FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = kab.type );
{ "outer_table": "orders", "inner_table": "departments", "outer_alias": "kab", "inner_alias": "dov", "proj_col": "id", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08321
train
v2
Schema: accounts (alias: jac)(code, value, name, date) customers(amount, salary, date, level) Task: Retrieve code from accounts that have at least one corresponding entry in customers sharing the same level. SQL:
SELECT code FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = jac.level );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "code", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08322
train
v3
Schema: shipments (alias: vnob)(level, name, code, salary) categories(status, type, value, amount) Task: Retrieve id from shipments with amount above the AVG(value) of categories rows sharing the same level. SQL:
SELECT id FROM shipments AS vnob WHERE amount > ( SELECT AVG(value) FROM categories AS egiv WHERE egiv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "categories", "outer_alias": "vnob", "inner_alias": "egiv", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08323
train
v3
Schema: managers (alias: hac)(status, salary, value, name) employees(salary, name, amount, status) Task: Retrieve value from managers with amount above the SUM(amount) of employees rows sharing the same code. SQL:
SELECT value FROM managers AS hac WHERE amount > ( SELECT SUM(amount) FROM employees AS bev WHERE bev.code = hac.code );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08324
train
v1
Schema: sales (alias: cif)(status, value, id, date) staff(type, date, salary, level) Task: Select name from sales where id exists in staff for the same code. SQL:
SELECT name FROM sales AS cif WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.code = cif.code );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08325
train
v2
Schema: requests (alias: ejof)(type, amount, salary, date) items(code, amount, type, level) Task: Retrieve id from requests that have at least one corresponding entry in items sharing the same code. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "items", "outer_alias": "ejof", "inner_alias": "ikob", "proj_col": "id", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08326
train
v3
Schema: managers (alias: hac)(type, code, amount, id) staff(salary, level, type, value) Task: Find code from managers where salary exceeds the minimum value from staff for the same id. SQL:
SELECT code FROM managers AS hac WHERE salary > ( SELECT MIN(value) FROM staff AS xnob WHERE xnob.id = hac.id );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "hac", "inner_alias": "xnob", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08327
train
v3
Schema: requests (alias: ejof)(name, status, type, value) tasks(level, date, status, code) Task: Retrieve amount from requests with amount above the COUNT(amount) of tasks rows sharing the same id. SQL:
SELECT amount FROM requests AS ejof WHERE amount > ( SELECT COUNT(amount) FROM tasks AS znob WHERE znob.id = ejof.id );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08328
train
v3
Schema: items (alias: ikob)(id, level, date, amount) orders(type, code, value, amount) Task: Retrieve id from items with salary above the MAX(value) of orders rows sharing the same type. SQL:
SELECT id FROM items AS ikob WHERE salary > ( SELECT MAX(value) FROM orders AS kab WHERE kab.type = ikob.type );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08329
train
v2
Schema: shipments (alias: vnob)(name, amount, level, type) schedules(type, status, code, date) Task: Retrieve value from shipments that have at least one corresponding entry in schedules sharing the same id. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "value", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08330
train
v1
Schema: departments (alias: dov)(id, value, name, amount) customers(type, code, id, status) Task: Find id from departments where type appears in customers entries with matching level. SQL:
SELECT id FROM departments AS dov WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.level = dov.level );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08331
train
v1
Schema: requests (alias: ejof)(code, level, name, type) invoices(name, value, code, type) Task: Select salary from requests where type exists in invoices for the same id. SQL:
SELECT salary FROM requests AS ejof WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.id = ejof.id );
{ "outer_table": "requests", "inner_table": "invoices", "outer_alias": "ejof", "inner_alias": "fal", "proj_col": "salary", "filter_col": "type", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08332
train
v2
Schema: transactions (alias: gev)(salary, type, name, code) requests(code, level, salary, amount) Task: Retrieve code from transactions that have at least one corresponding entry in requests sharing the same code. SQL:
SELECT code FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = gev.code );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "code", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08333
train
v2
Schema: categories (alias: egiv)(date, salary, amount, level) customers(amount, id, salary, code) Task: Find salary from categories where a matching record exists in customers with the same code. SQL:
SELECT salary FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = egiv.code );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "salary", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08334
train
v1
Schema: schedules (alias: vmob)(code, level, name, type) sales(amount, name, status, value) Task: Select name from schedules where level exists in sales for the same level. SQL:
SELECT name FROM schedules AS vmob WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "vmob", "inner_alias": "cif", "proj_col": "name", "filter_col": "level", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08335
train
v2
Schema: shipments (alias: vnob)(level, value, status, name) orders(name, date, type, status) Task: Find name from shipments where a matching record exists in orders with the same level. SQL:
SELECT name FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "name", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08336
train
v2
Schema: managers (alias: hac)(date, salary, type, status) employees(amount, date, id, value) Task: Find salary from managers where a matching record exists in employees with the same type. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.type = hac.type );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "salary", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08337
train
v3
Schema: projects (alias: uliv)(salary, name, code, date) transactions(salary, value, status, type) Task: Retrieve value from projects with salary above the SUM(amount) of transactions rows sharing the same level. SQL:
SELECT value FROM projects AS uliv WHERE salary > ( SELECT SUM(amount) FROM transactions AS gev WHERE gev.level = uliv.level );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08338
train
v2
Schema: employees (alias: bev)(status, salary, amount, date) products(name, value, salary, level) Task: Find salary from employees where a matching record exists in products with the same type. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = bev.type );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "salary", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08339
train
v2
Schema: orders (alias: kab)(status, date, value, id) accounts(amount, name, status, type) Task: Retrieve code from orders that have at least one corresponding entry in accounts sharing the same id. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = kab.id );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "kab", "inner_alias": "jac", "proj_col": "code", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08340
train
v3
Schema: regions (alias: okiv)(salary, status, type, amount) projects(level, type, name, value) Task: Find salary from regions where value exceeds the minimum amount from projects for the same type. SQL:
SELECT salary FROM regions AS okiv WHERE value > ( SELECT MIN(amount) FROM projects AS uliv WHERE uliv.type = okiv.type );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08341
train
v2
Schema: sales (alias: cif)(amount, name, code, type) customers(code, amount, type, salary) Task: Retrieve id from sales that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT id FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = cif.type );
{ "outer_table": "sales", "inner_table": "customers", "outer_alias": "cif", "inner_alias": "lex", "proj_col": "id", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08342
train
v3
Schema: departments (alias: dov)(status, code, id, date) transactions(id, level, name, date) Task: Retrieve name from departments with amount above the SUM(salary) of transactions rows sharing the same status. SQL:
SELECT name FROM departments AS dov WHERE amount > ( SELECT SUM(salary) FROM transactions AS gev WHERE gev.status = dov.status );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dov", "inner_alias": "gev", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08343
train
v2
Schema: invoices (alias: fal)(level, date, status, salary) staff(level, amount, code, id) Task: Find salary from invoices where a matching record exists in staff with the same id. SQL:
SELECT salary FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = fal.id );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "salary", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08344
train
v1
Schema: transactions (alias: gev)(amount, date, name, type) regions(level, id, name, value) Task: Select salary from transactions where id exists in regions for the same status. SQL:
SELECT salary 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": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08345
train
v2
Schema: staff (alias: xnob)(code, status, value, amount) transactions(salary, name, id, status) Task: Find salary from staff where a matching record exists in transactions with the same type. SQL:
SELECT salary FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = xnob.type );
{ "outer_table": "staff", "inner_table": "transactions", "outer_alias": "xnob", "inner_alias": "gev", "proj_col": "salary", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08346
train
v1
Schema: products (alias: nad)(value, type, id, name) transactions(amount, code, value, date) Task: Find value from products where status appears in transactions entries with matching code. SQL:
SELECT value FROM products AS nad WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.code = nad.code );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "value", "filter_col": "status", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08347
train
v1
Schema: categories (alias: egiv)(id, value, amount, code) shipments(status, id, name, level) Task: Find code from categories where type appears in shipments entries with matching level. SQL:
SELECT code FROM categories AS egiv WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.level = egiv.level );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08348
train
v3
Schema: requests (alias: ejof)(salary, status, level, date) customers(value, amount, code, date) Task: Retrieve name from requests with value above the MAX(salary) of customers rows sharing the same id. SQL:
SELECT name FROM requests AS ejof WHERE value > ( SELECT MAX(salary) FROM customers AS lex WHERE lex.id = ejof.id );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08349
train
v3
Schema: requests (alias: ejof)(amount, value, date, status) branches(level, code, id, name) Task: Find code from requests where salary exceeds the total salary from branches for the same code. SQL:
SELECT code FROM requests AS ejof WHERE salary > ( SELECT SUM(salary) FROM branches AS agov WHERE agov.code = ejof.code );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08350
train
v1
Schema: tasks (alias: znob)(name, status, level, value) accounts(id, name, level, salary) Task: Retrieve code from tasks whose type is found in accounts rows where id matches the outer record. SQL:
SELECT code FROM tasks AS znob WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.id = znob.id );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "code", "filter_col": "type", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08351
train
v1
Schema: requests (alias: ejof)(salary, type, amount, id) staff(value, type, code, status) Task: Select amount from requests where status exists in staff for the same code. SQL:
SELECT amount FROM requests AS ejof WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ejof", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "status", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08352
train
v2
Schema: requests (alias: ejof)(status, level, name, date) shipments(amount, type, salary, code) Task: Retrieve id from requests that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ejof", "inner_alias": "vnob", "proj_col": "id", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08353
train
v2
Schema: customers (alias: lex)(name, code, type, amount) transactions(amount, status, level, name) Task: Find code from customers where a matching record exists in transactions with the same status. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = lex.status );
{ "outer_table": "customers", "inner_table": "transactions", "outer_alias": "lex", "inner_alias": "gev", "proj_col": "code", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08354
train
v1
Schema: departments (alias: dov)(date, amount, code, level) employees(status, code, amount, name) Task: Select salary from departments where level exists in employees for the same code. SQL:
SELECT salary FROM departments AS dov WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.code = dov.code );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "salary", "filter_col": "level", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08355
train
v2
Schema: employees (alias: bev)(type, value, date, name) managers(code, amount, status, id) Task: Find name from employees where a matching record exists in managers with the same code. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = bev.code );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "bev", "inner_alias": "hac", "proj_col": "name", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08356
train
v1
Schema: tasks (alias: znob)(status, level, name, id) items(type, date, amount, status) Task: Retrieve name from tasks whose id is found in items rows where code matches the outer record. SQL:
SELECT name FROM tasks AS znob WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.code = znob.code );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08357
train
v2
Schema: departments (alias: dov)(amount, date, value, status) accounts(id, level, type, salary) Task: Retrieve amount from departments that have at least one corresponding entry in accounts sharing the same level. SQL:
SELECT amount FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = dov.level );
{ "outer_table": "departments", "inner_table": "accounts", "outer_alias": "dov", "inner_alias": "jac", "proj_col": "amount", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08358
train
v1
Schema: invoices (alias: fal)(date, id, level, salary) sales(type, name, id, amount) Task: Select salary from invoices where id exists in sales for the same status. SQL:
SELECT salary FROM invoices AS fal WHERE id IN ( SELECT id FROM sales AS cif WHERE cif.status = fal.status );
{ "outer_table": "invoices", "inner_table": "sales", "outer_alias": "fal", "inner_alias": "cif", "proj_col": "salary", "filter_col": "id", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08359
train
v1
Schema: managers (alias: hac)(salary, status, level, value) requests(status, type, name, date) Task: Find name from managers where type appears in requests entries with matching level. SQL:
SELECT name FROM managers AS hac WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.level = hac.level );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "name", "filter_col": "type", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08360
train
v2
Schema: categories (alias: egiv)(name, salary, value, id) transactions(code, name, date, level) Task: Find code from categories where a matching record exists in transactions with the same status. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.status = egiv.status );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "egiv", "inner_alias": "gev", "proj_col": "code", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08361
train
v2
Schema: tasks (alias: znob)(salary, amount, type, date) sales(value, salary, level, code) Task: Retrieve code from tasks that have at least one corresponding entry in sales sharing the same id. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = znob.id );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "znob", "inner_alias": "cif", "proj_col": "code", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08362
train
v1
Schema: customers (alias: lex)(id, salary, status, amount) shipments(id, salary, value, amount) Task: Select id from customers where level exists in shipments for the same level. SQL:
SELECT id FROM customers AS lex WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.level = lex.level );
{ "outer_table": "customers", "inner_table": "shipments", "outer_alias": "lex", "inner_alias": "vnob", "proj_col": "id", "filter_col": "level", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08363
train
v1
Schema: products (alias: nad)(id, salary, amount, status) projects(amount, level, id, salary) Task: Retrieve amount from products whose level is found in projects rows where id matches the outer record. SQL:
SELECT amount FROM products AS nad WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.id = nad.id );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08364
train
v3
Schema: managers (alias: hac)(type, level, value, code) invoices(code, amount, date, salary) Task: Find id from managers where amount exceeds the average amount from invoices for the same id. SQL:
SELECT id FROM managers AS hac WHERE amount > ( SELECT AVG(amount) FROM invoices AS fal WHERE fal.id = hac.id );
{ "outer_table": "managers", "inner_table": "invoices", "outer_alias": "hac", "inner_alias": "fal", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08365
train
v2
Schema: shipments (alias: vnob)(type, value, date, name) departments(date, level, id, status) Task: Find name from shipments where a matching record exists in departments with the same type. SQL:
SELECT name FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "name", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08366
train
v3
Schema: accounts (alias: jac)(status, name, id, type) orders(level, id, amount, type) Task: Retrieve name from accounts with salary above the COUNT(amount) of orders rows sharing the same type. SQL:
SELECT name FROM accounts AS jac WHERE salary > ( SELECT COUNT(amount) FROM orders AS kab WHERE kab.type = jac.type );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08367
train
v2
Schema: tasks (alias: znob)(value, level, code, name) regions(code, status, type, id) Task: Retrieve id from tasks that have at least one corresponding entry in regions sharing the same level. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = znob.level );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "id", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08368
train
v3
Schema: invoices (alias: fal)(name, amount, id, salary) requests(date, level, value, amount) Task: Find value from invoices where salary exceeds the total salary from requests for the same id. SQL:
SELECT value FROM invoices AS fal WHERE salary > ( SELECT SUM(salary) FROM requests AS ejof WHERE ejof.id = fal.id );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08369
train
v2
Schema: projects (alias: uliv)(value, amount, name, date) requests(value, type, name, id) Task: Find name from projects where a matching record exists in requests with the same status. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = uliv.status );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "name", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08370
train
v2
Schema: managers (alias: hac)(date, type, salary, status) sales(type, status, salary, date) Task: Retrieve salary from managers that have at least one corresponding entry in sales sharing the same id. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = hac.id );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "salary", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08371
train
v2
Schema: projects (alias: uliv)(salary, code, name, status) tasks(id, amount, status, type) Task: Find code from projects where a matching record exists in tasks with the same status. SQL:
SELECT code FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = uliv.status );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "uliv", "inner_alias": "znob", "proj_col": "code", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08372
train
v3
Schema: requests (alias: ejof)(amount, type, name, id) products(date, status, level, code) Task: Find amount from requests where amount exceeds the maximum amount from products for the same type. SQL:
SELECT amount FROM requests AS ejof WHERE amount > ( SELECT MAX(amount) FROM products AS nad WHERE nad.type = ejof.type );
{ "outer_table": "requests", "inner_table": "products", "outer_alias": "ejof", "inner_alias": "nad", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08373
train
v1
Schema: employees (alias: bev)(type, amount, level, code) tasks(salary, status, value, id) Task: Find amount from employees where status appears in tasks entries with matching type. SQL:
SELECT amount FROM employees AS bev WHERE status IN ( SELECT status FROM tasks AS znob WHERE znob.type = bev.type );
{ "outer_table": "employees", "inner_table": "tasks", "outer_alias": "bev", "inner_alias": "znob", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08374
train
v2
Schema: managers (alias: hac)(date, value, status, salary) items(level, type, amount, value) Task: Retrieve id from managers that have at least one corresponding entry in items sharing the same status. SQL:
SELECT id 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": "id", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08375
train
v2
Schema: staff (alias: xnob)(name, date, level, code) managers(type, amount, salary, date) Task: Find name from staff where a matching record exists in managers with the same type. SQL:
SELECT name 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": "name", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08376
train
v3
Schema: requests (alias: ejof)(salary, amount, id, date) schedules(salary, date, type, level) Task: Retrieve salary from requests with value above the COUNT(value) of schedules rows sharing the same level. SQL:
SELECT salary FROM requests AS ejof WHERE value > ( SELECT COUNT(value) FROM schedules AS vmob WHERE vmob.level = ejof.level );
{ "outer_table": "requests", "inner_table": "schedules", "outer_alias": "ejof", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08377
train
v2
Schema: tasks (alias: znob)(code, name, value, status) invoices(type, amount, id, status) Task: Find name from tasks where a matching record exists in invoices with the same id. SQL:
SELECT name FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = znob.id );
{ "outer_table": "tasks", "inner_table": "invoices", "outer_alias": "znob", "inner_alias": "fal", "proj_col": "name", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08378
train
v1
Schema: schedules (alias: vmob)(type, salary, id, level) products(amount, date, code, value) Task: Select name from schedules where level exists in products for the same id. SQL:
SELECT name FROM schedules AS vmob WHERE level IN ( SELECT level FROM products AS nad WHERE nad.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "name", "filter_col": "level", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08379
train
v2
Schema: requests (alias: ejof)(value, amount, name, type) schedules(code, status, type, amount) Task: Retrieve value from requests that have at least one corresponding entry in schedules sharing the same type. SQL:
SELECT value FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = ejof.type );
{ "outer_table": "requests", "inner_table": "schedules", "outer_alias": "ejof", "inner_alias": "vmob", "proj_col": "value", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08380
train
v1
Schema: accounts (alias: jac)(amount, value, status, level) schedules(date, type, salary, id) Task: Retrieve name from accounts whose id is found in schedules rows where status matches the outer record. SQL:
SELECT name FROM accounts AS jac WHERE id IN ( SELECT id FROM schedules AS vmob WHERE vmob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08381
train
v3
Schema: projects (alias: uliv)(level, amount, status, name) regions(value, id, salary, name) Task: Retrieve code from projects with salary above the MIN(value) of regions rows sharing the same id. SQL:
SELECT code FROM projects AS uliv WHERE salary > ( SELECT MIN(value) FROM regions AS okiv WHERE okiv.id = uliv.id );
{ "outer_table": "projects", "inner_table": "regions", "outer_alias": "uliv", "inner_alias": "okiv", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08382
train
v2
Schema: categories (alias: egiv)(amount, id, name, type) sales(value, amount, code, date) Task: Find code from categories where a matching record exists in sales with the same id. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = egiv.id );
{ "outer_table": "categories", "inner_table": "sales", "outer_alias": "egiv", "inner_alias": "cif", "proj_col": "code", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08383
train
v1
Schema: departments (alias: dov)(salary, level, id, value) staff(salary, code, name, level) Task: Retrieve salary from departments whose code is found in staff rows where code matches the outer record. SQL:
SELECT salary FROM departments AS dov WHERE code IN ( SELECT code FROM staff AS xnob WHERE xnob.code = dov.code );
{ "outer_table": "departments", "inner_table": "staff", "outer_alias": "dov", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08384
train
v2
Schema: employees (alias: bev)(code, type, date, salary) managers(type, code, date, amount) Task: Retrieve amount from employees that have at least one corresponding entry in managers sharing the same id. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = bev.id );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "bev", "inner_alias": "hac", "proj_col": "amount", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08385
train
v2
Schema: departments (alias: dov)(status, name, code, amount) invoices(level, amount, date, value) Task: Retrieve code from departments that have at least one corresponding entry in invoices sharing the same code. SQL:
SELECT code FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = dov.code );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "code", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08386
train
v3
Schema: products (alias: nad)(name, type, amount, id) customers(amount, level, value, code) Task: Retrieve code from products with amount above the COUNT(value) of customers rows sharing the same code. SQL:
SELECT code FROM products AS nad WHERE amount > ( SELECT COUNT(value) FROM customers AS lex WHERE lex.code = nad.code );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08387
train
v1
Schema: categories (alias: egiv)(date, level, amount, salary) regions(type, level, date, id) Task: Find amount from categories where code appears in regions entries with matching code. SQL:
SELECT amount FROM categories AS egiv WHERE code IN ( SELECT code FROM regions AS okiv WHERE okiv.code = egiv.code );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08388
train
v3
Schema: requests (alias: ejof)(code, salary, amount, type) accounts(amount, date, status, level) Task: Find salary from requests where salary exceeds the total value from accounts for the same code. SQL:
SELECT salary FROM requests AS ejof WHERE salary > ( SELECT SUM(value) FROM accounts AS jac WHERE jac.code = ejof.code );
{ "outer_table": "requests", "inner_table": "accounts", "outer_alias": "ejof", "inner_alias": "jac", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08389
train
v1
Schema: schedules (alias: vmob)(level, date, name, status) shipments(id, name, type, date) Task: Retrieve value from schedules whose id is found in shipments rows where level matches the outer record. SQL:
SELECT value FROM schedules AS vmob WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "shipments", "outer_alias": "vmob", "inner_alias": "vnob", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08390
train
v1
Schema: products (alias: nad)(value, status, name, type) requests(amount, type, value, status) Task: Find value from products where status appears in requests entries with matching code. SQL:
SELECT value FROM products AS nad WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.code = nad.code );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "value", "filter_col": "status", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08391
train
v1
Schema: regions (alias: okiv)(date, salary, value, id) items(value, code, id, level) Task: Select code from regions where status exists in items for the same status. SQL:
SELECT code FROM regions AS okiv WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.status = okiv.status );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08392
train
v3
Schema: employees (alias: bev)(date, name, salary, type) invoices(value, id, amount, date) Task: Find id from employees where salary exceeds the maximum value from invoices for the same type. SQL:
SELECT id FROM employees AS bev WHERE salary > ( SELECT MAX(value) FROM invoices AS fal WHERE fal.type = bev.type );
{ "outer_table": "employees", "inner_table": "invoices", "outer_alias": "bev", "inner_alias": "fal", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08393
train
v2
Schema: accounts (alias: jac)(name, amount, code, type) projects(status, id, date, name) Task: Retrieve name from accounts that have at least one corresponding entry in projects sharing the same status. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = jac.status );
{ "outer_table": "accounts", "inner_table": "projects", "outer_alias": "jac", "inner_alias": "uliv", "proj_col": "name", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08394
train
v3
Schema: accounts (alias: jac)(status, type, date, amount) transactions(status, id, name, type) Task: Find code from accounts where value exceeds the average amount from transactions for the same level. SQL:
SELECT code FROM accounts AS jac WHERE value > ( SELECT AVG(amount) FROM transactions AS gev WHERE gev.level = jac.level );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "jac", "inner_alias": "gev", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08395
train
v1
Schema: categories (alias: egiv)(code, amount, name, id) items(value, id, level, salary) Task: Retrieve salary from categories whose code is found in items rows where level matches the outer record. SQL:
SELECT salary FROM categories AS egiv WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.level = egiv.level );
{ "outer_table": "categories", "inner_table": "items", "outer_alias": "egiv", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "code", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08396
train
v1
Schema: requests (alias: ejof)(amount, id, code, value) branches(value, name, salary, status) Task: Retrieve code from requests whose code is found in branches rows where id matches the outer record. SQL:
SELECT code FROM requests AS ejof WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.id = ejof.id );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "code", "filter_col": "code", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08397
train
v2
Schema: managers (alias: hac)(salary, code, type, id) sales(level, date, status, type) Task: Find amount from managers where a matching record exists in sales with the same id. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = hac.id );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "amount", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08398
train
v3
Schema: managers (alias: hac)(id, code, name, status) customers(code, type, name, id) Task: Find id from managers where salary exceeds the count of value from customers for the same status. SQL:
SELECT id FROM managers AS hac WHERE salary > ( SELECT COUNT(value) FROM customers AS lex WHERE lex.status = hac.status );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08399
train