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: tasks (alias: znob)(id, amount, status, code) orders(name, amount, code, type) Task: Find value from tasks where status appears in orders entries with matching status. SQL:
SELECT value FROM tasks AS znob WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.status = znob.status );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "value", "filter_col": "status", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08500
train
v1
Schema: accounts (alias: jac)(amount, name, date, level) requests(code, date, value, id) Task: Retrieve amount from accounts whose type is found in requests rows where code matches the outer record. SQL:
SELECT amount FROM accounts AS jac WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.code = jac.code );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "jac", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08501
train
v2
Schema: requests (alias: ejof)(level, type, salary, name) projects(code, value, id, type) Task: Find code from requests where a matching record exists in projects with the same code. SQL:
SELECT code FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "code", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08502
train
v3
Schema: customers (alias: lex)(date, name, value, code) sales(amount, code, value, status) Task: Retrieve value from customers with amount above the SUM(salary) of sales rows sharing the same level. SQL:
SELECT value FROM customers AS lex WHERE amount > ( SELECT SUM(salary) FROM sales AS cif WHERE cif.level = lex.level );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08503
train
v2
Schema: requests (alias: ejof)(salary, code, date, value) projects(id, level, value, salary) Task: Retrieve name from requests that have at least one corresponding entry in projects sharing the same type. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = ejof.type );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "name", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08504
train
v2
Schema: tasks (alias: znob)(level, value, salary, status) staff(status, name, date, value) Task: Retrieve code from tasks that have at least one corresponding entry in staff sharing the same id. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "code", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08505
train
v2
Schema: orders (alias: kab)(id, amount, level, value) transactions(date, name, id, level) Task: Find salary from orders where a matching record exists in transactions with the same id. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = kab.id );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "salary", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08506
train
v1
Schema: invoices (alias: fal)(name, status, date, level) projects(date, type, id, code) Task: Retrieve value from invoices whose type is found in projects rows where level matches the outer record. SQL:
SELECT value FROM invoices AS fal WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.level = fal.level );
{ "outer_table": "invoices", "inner_table": "projects", "outer_alias": "fal", "inner_alias": "uliv", "proj_col": "value", "filter_col": "type", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08507
train
v1
Schema: tasks (alias: znob)(value, date, level, code) categories(type, level, status, date) Task: Find value from tasks where status appears in categories entries with matching type. SQL:
SELECT value FROM tasks AS znob WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.type = znob.type );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "value", "filter_col": "status", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08508
train
v2
Schema: categories (alias: egiv)(level, status, date, salary) managers(salary, type, value, status) Task: Retrieve name from categories that have at least one corresponding entry in managers sharing the same level. SQL:
SELECT name FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = egiv.level );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "name", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08509
train
v1
Schema: departments (alias: dov)(name, level, date, amount) orders(level, id, salary, value) Task: Select amount from departments where status exists in orders for the same type. SQL:
SELECT amount FROM departments AS dov WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.type = dov.type );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dov", "inner_alias": "kab", "proj_col": "amount", "filter_col": "status", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08510
train
v2
Schema: employees (alias: bev)(name, code, status, id) projects(status, level, code, salary) Task: Find name from employees where a matching record exists in projects with the same code. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = bev.code );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "name", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08511
train
v3
Schema: accounts (alias: jac)(salary, code, id, date) requests(value, amount, id, name) Task: Find value from accounts where salary exceeds the count of salary from requests for the same level. SQL:
SELECT value FROM accounts AS jac WHERE salary > ( SELECT COUNT(salary) FROM requests AS ejof WHERE ejof.level = jac.level );
{ "outer_table": "accounts", "inner_table": "requests", "outer_alias": "jac", "inner_alias": "ejof", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08512
train
v2
Schema: schedules (alias: vmob)(code, amount, value, type) regions(salary, date, name, value) Task: Retrieve name from schedules that have at least one corresponding entry in regions sharing the same status. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "name", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08513
train
v1
Schema: managers (alias: hac)(status, amount, type, salary) regions(value, id, date, type) Task: Select code from managers where type exists in regions for the same type. SQL:
SELECT code FROM managers AS hac WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.type = hac.type );
{ "outer_table": "managers", "inner_table": "regions", "outer_alias": "hac", "inner_alias": "okiv", "proj_col": "code", "filter_col": "type", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08514
train
v3
Schema: products (alias: nad)(code, salary, level, type) categories(name, amount, value, type) Task: Find id from products where salary exceeds the total salary from categories for the same code. SQL:
SELECT id FROM products AS nad WHERE salary > ( SELECT SUM(salary) FROM categories AS egiv WHERE egiv.code = nad.code );
{ "outer_table": "products", "inner_table": "categories", "outer_alias": "nad", "inner_alias": "egiv", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08515
train
v2
Schema: staff (alias: xnob)(level, salary, status, date) categories(type, id, status, value) Task: Retrieve id from staff that have at least one corresponding entry in categories sharing the same type. SQL:
SELECT id FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = xnob.type );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "id", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08516
train
v3
Schema: regions (alias: okiv)(id, date, name, status) shipments(code, value, status, date) Task: Retrieve value from regions with salary above the MAX(salary) of shipments rows sharing the same id. SQL:
SELECT value FROM regions AS okiv WHERE salary > ( SELECT MAX(salary) FROM shipments AS vnob WHERE vnob.id = okiv.id );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "okiv", "inner_alias": "vnob", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08517
train
v1
Schema: shipments (alias: vnob)(value, salary, level, status) requests(id, name, type, amount) Task: Retrieve code from shipments whose type is found in requests rows where status matches the outer record. SQL:
SELECT code FROM shipments AS vnob WHERE type IN ( SELECT type FROM requests AS ejof WHERE ejof.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "requests", "outer_alias": "vnob", "inner_alias": "ejof", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08518
train
v1
Schema: orders (alias: kab)(value, amount, level, date) invoices(status, amount, id, value) Task: Select salary from orders where type exists in invoices for the same status. SQL:
SELECT salary FROM orders AS kab WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.status = kab.status );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "kab", "inner_alias": "fal", "proj_col": "salary", "filter_col": "type", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08519
train
v1
Schema: requests (alias: ejof)(code, name, id, date) branches(amount, name, value, status) Task: Find code from requests where code appears in branches entries with matching level. SQL:
SELECT code FROM requests AS ejof WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.level = ejof.level );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08520
train
v2
Schema: shipments (alias: vnob)(status, value, level, type) orders(amount, value, salary, name) Task: Find code from shipments where a matching record exists in orders with the same status. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "code", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08521
train
v2
Schema: products (alias: nad)(level, amount, code, id) shipments(id, name, status, type) Task: Retrieve amount from products that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = nad.code );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "amount", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08522
train
v2
Schema: customers (alias: lex)(level, value, code, amount) accounts(name, value, salary, level) Task: Retrieve amount from customers that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = lex.code );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "lex", "inner_alias": "jac", "proj_col": "amount", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08523
train
v1
Schema: employees (alias: bev)(id, value, status, amount) orders(date, salary, type, value) Task: Select value from employees where status exists in orders for the same id. SQL:
SELECT value FROM employees AS bev WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.id = bev.id );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "value", "filter_col": "status", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08524
train
v1
Schema: employees (alias: bev)(date, status, id, amount) products(status, id, name, code) Task: Find id from employees where status appears in products entries with matching status. SQL:
SELECT id FROM employees AS bev WHERE status IN ( SELECT status FROM products AS nad WHERE nad.status = bev.status );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08525
train
v1
Schema: invoices (alias: fal)(salary, status, id, value) branches(value, level, type, salary) Task: Find amount from invoices where code appears in branches entries with matching id. SQL:
SELECT amount FROM invoices AS fal WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.id = fal.id );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "amount", "filter_col": "code", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08526
train
v1
Schema: regions (alias: okiv)(name, salary, id, date) categories(level, code, name, salary) Task: Select code from regions where type exists in categories for the same level. SQL:
SELECT code FROM regions AS okiv WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.level = okiv.level );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08527
train
v1
Schema: staff (alias: xnob)(salary, value, status, id) customers(name, id, value, date) Task: Find name from staff where type appears in customers entries with matching level. SQL:
SELECT name FROM staff AS xnob WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.level = xnob.level );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "name", "filter_col": "type", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08528
train
v3
Schema: categories (alias: egiv)(status, id, name, value) branches(salary, id, name, date) Task: Find code from categories where salary exceeds the average value from branches for the same status. SQL:
SELECT code FROM categories AS egiv WHERE salary > ( SELECT AVG(value) FROM branches AS agov WHERE agov.status = egiv.status );
{ "outer_table": "categories", "inner_table": "branches", "outer_alias": "egiv", "inner_alias": "agov", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08529
train
v3
Schema: items (alias: ikob)(name, code, status, type) categories(level, salary, id, code) Task: Retrieve salary from items with amount above the SUM(value) of categories rows sharing the same type. SQL:
SELECT salary FROM items AS ikob WHERE amount > ( SELECT SUM(value) FROM categories AS egiv WHERE egiv.type = ikob.type );
{ "outer_table": "items", "inner_table": "categories", "outer_alias": "ikob", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08530
train
v3
Schema: managers (alias: hac)(value, amount, date, status) invoices(date, id, status, salary) Task: Retrieve code from managers with value above the MAX(amount) of invoices rows sharing the same type. SQL:
SELECT code FROM managers AS hac WHERE value > ( SELECT MAX(amount) FROM invoices AS fal WHERE fal.type = hac.type );
{ "outer_table": "managers", "inner_table": "invoices", "outer_alias": "hac", "inner_alias": "fal", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08531
train
v1
Schema: sales (alias: cif)(salary, level, id, code) invoices(amount, date, code, name) Task: Retrieve amount from sales whose code is found in invoices rows where status matches the outer record. SQL:
SELECT amount FROM sales AS cif WHERE code IN ( SELECT code FROM invoices AS fal WHERE fal.status = cif.status );
{ "outer_table": "sales", "inner_table": "invoices", "outer_alias": "cif", "inner_alias": "fal", "proj_col": "amount", "filter_col": "code", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08532
train
v1
Schema: customers (alias: lex)(date, code, status, amount) schedules(status, value, name, amount) Task: Select salary from customers where status exists in schedules for the same level. SQL:
SELECT salary FROM customers AS lex WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.level = lex.level );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08533
train
v1
Schema: tasks (alias: znob)(type, level, status, amount) employees(value, level, amount, salary) Task: Select code from tasks where type exists in employees for the same code. SQL:
SELECT code FROM tasks AS znob WHERE type IN ( SELECT type FROM employees AS bev WHERE bev.code = znob.code );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08534
train
v3
Schema: transactions (alias: gev)(type, code, id, status) items(amount, type, status, value) Task: Retrieve code from transactions with amount above the COUNT(salary) of items rows sharing the same level. SQL:
SELECT code FROM transactions AS gev WHERE amount > ( SELECT COUNT(salary) FROM items AS ikob WHERE ikob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "gev", "inner_alias": "ikob", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08535
train
v3
Schema: orders (alias: kab)(date, amount, type, value) shipments(type, level, id, value) Task: Retrieve salary from orders with amount above the MAX(amount) of shipments rows sharing the same level. SQL:
SELECT salary FROM orders AS kab WHERE amount > ( SELECT MAX(amount) FROM shipments AS vnob WHERE vnob.level = kab.level );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08536
train
v1
Schema: managers (alias: hac)(date, salary, code, name) employees(level, type, date, name) Task: Retrieve code from managers whose id is found in employees rows where level matches the outer record. SQL:
SELECT code FROM managers AS hac WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.level = hac.level );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08537
train
v3
Schema: orders (alias: kab)(type, amount, name, salary) requests(id, status, code, amount) Task: Find salary from orders where value exceeds the total value from requests for the same type. SQL:
SELECT salary FROM orders AS kab WHERE value > ( SELECT SUM(value) FROM requests AS ejof WHERE ejof.type = kab.type );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08538
train
v2
Schema: accounts (alias: jac)(amount, level, status, code) orders(id, date, level, status) Task: Find salary from accounts where a matching record exists in orders with the same status. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = jac.status );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "salary", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08539
train
v2
Schema: transactions (alias: gev)(name, level, salary, status) categories(code, salary, status, amount) Task: Find amount from transactions where a matching record exists in categories with the same type. SQL:
SELECT amount FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = gev.type );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "amount", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08540
train
v3
Schema: departments (alias: dov)(id, amount, value, name) invoices(amount, date, level, name) Task: Retrieve salary from departments with value above the COUNT(salary) of invoices rows sharing the same id. SQL:
SELECT salary FROM departments AS dov WHERE value > ( SELECT COUNT(salary) FROM invoices AS fal WHERE fal.id = dov.id );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08541
train
v2
Schema: departments (alias: dov)(code, date, id, name) categories(name, level, amount, value) Task: Find name from departments where a matching record exists in categories with the same level. SQL:
SELECT name FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = dov.level );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dov", "inner_alias": "egiv", "proj_col": "name", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08542
train
v3
Schema: projects (alias: uliv)(status, salary, name, date) orders(id, status, code, date) Task: Find code from projects where value exceeds the average salary from orders for the same status. SQL:
SELECT code FROM projects AS uliv WHERE value > ( SELECT AVG(salary) FROM orders AS kab WHERE kab.status = uliv.status );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08543
train
v3
Schema: items (alias: ikob)(salary, code, status, type) staff(name, value, code, status) Task: Retrieve amount from items with amount above the MAX(value) of staff rows sharing the same type. SQL:
SELECT amount FROM items AS ikob WHERE amount > ( SELECT MAX(value) FROM staff AS xnob WHERE xnob.type = ikob.type );
{ "outer_table": "items", "inner_table": "staff", "outer_alias": "ikob", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08544
train
v2
Schema: tasks (alias: znob)(id, value, type, salary) staff(level, date, value, status) Task: Retrieve value from tasks that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = znob.level );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "value", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08545
train
v1
Schema: tasks (alias: znob)(name, value, type, id) regions(id, name, code, status) Task: Select code from tasks where type exists in regions for the same status. SQL:
SELECT code FROM tasks AS znob WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.status = znob.status );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08546
train
v2
Schema: products (alias: nad)(id, date, status, salary) departments(date, id, value, status) Task: Find salary from products where a matching record exists in departments with the same type. SQL:
SELECT salary FROM products AS nad WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = nad.type );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "salary", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08547
train
v1
Schema: customers (alias: lex)(value, id, level, salary) invoices(amount, date, salary, level) Task: Find id from customers where type appears in invoices entries with matching status. SQL:
SELECT id FROM customers AS lex WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.status = lex.status );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "lex", "inner_alias": "fal", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08548
train
v1
Schema: shipments (alias: vnob)(code, amount, value, salary) employees(date, value, level, salary) Task: Select id from shipments where status exists in employees for the same code. SQL:
SELECT id FROM shipments AS vnob WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08549
train
v2
Schema: orders (alias: kab)(date, level, type, name) categories(amount, status, date, level) Task: Retrieve id from orders that have at least one corresponding entry in categories sharing the same type. SQL:
SELECT id FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = kab.type );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "id", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08550
train
v2
Schema: branches (alias: agov)(type, value, id, name) invoices(status, name, amount, code) Task: Retrieve name from branches that have at least one corresponding entry in invoices sharing the same type. SQL:
SELECT name FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = agov.type );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "name", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08551
train
v1
Schema: orders (alias: kab)(id, name, value, amount) tasks(type, name, date, status) Task: Retrieve code from orders whose code is found in tasks rows where code matches the outer record. SQL:
SELECT code FROM orders AS kab WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.code = kab.code );
{ "outer_table": "orders", "inner_table": "tasks", "outer_alias": "kab", "inner_alias": "znob", "proj_col": "code", "filter_col": "code", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08552
train
v2
Schema: orders (alias: kab)(type, date, status, name) sales(type, level, name, salary) Task: Retrieve code from orders that have at least one corresponding entry in sales sharing the same type. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = kab.type );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "code", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08553
train
v2
Schema: requests (alias: ejof)(id, name, level, code) products(value, amount, code, date) Task: Retrieve amount from requests that have at least one corresponding entry in products sharing the same status. SQL:
SELECT amount FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = ejof.status );
{ "outer_table": "requests", "inner_table": "products", "outer_alias": "ejof", "inner_alias": "nad", "proj_col": "amount", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08554
train
v2
Schema: staff (alias: xnob)(id, code, status, type) employees(type, status, id, name) Task: Retrieve amount from staff that have at least one corresponding entry in employees sharing the same status. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = xnob.status );
{ "outer_table": "staff", "inner_table": "employees", "outer_alias": "xnob", "inner_alias": "bev", "proj_col": "amount", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08555
train
v1
Schema: categories (alias: egiv)(date, amount, code, status) departments(level, status, id, amount) Task: Find code from categories where type appears in departments entries with matching level. SQL:
SELECT code FROM categories AS egiv WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.level = egiv.level );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08556
train
v3
Schema: accounts (alias: jac)(amount, salary, name, date) items(code, level, status, salary) Task: Find value from accounts where amount exceeds the minimum salary from items for the same code. SQL:
SELECT value FROM accounts AS jac WHERE amount > ( SELECT MIN(salary) FROM items AS ikob WHERE ikob.code = jac.code );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08557
train
v1
Schema: accounts (alias: jac)(status, name, type, id) staff(value, code, name, date) Task: Retrieve salary from accounts whose status is found in staff rows where id matches the outer record. SQL:
SELECT salary FROM accounts AS jac WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.id = jac.id );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "jac", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08558
train
v1
Schema: projects (alias: uliv)(code, salary, status, name) sales(level, type, name, salary) Task: Retrieve amount from projects whose level is found in sales rows where type matches the outer record. SQL:
SELECT amount FROM projects AS uliv WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.type = uliv.type );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "amount", "filter_col": "level", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08559
train
v3
Schema: products (alias: nad)(code, name, status, value) requests(id, status, date, code) Task: Find value from products where value exceeds the maximum salary from requests for the same type. SQL:
SELECT value FROM products AS nad WHERE value > ( SELECT MAX(salary) FROM requests AS ejof WHERE ejof.type = nad.type );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08560
train
v2
Schema: regions (alias: okiv)(name, level, value, date) accounts(name, id, status, amount) Task: Find name from regions where a matching record exists in accounts with the same level. SQL:
SELECT name FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = okiv.level );
{ "outer_table": "regions", "inner_table": "accounts", "outer_alias": "okiv", "inner_alias": "jac", "proj_col": "name", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08561
train
v2
Schema: invoices (alias: fal)(type, code, name, value) products(status, name, salary, date) Task: Retrieve amount from invoices that have at least one corresponding entry in products sharing the same level. SQL:
SELECT amount FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = fal.level );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "amount", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08562
train
v2
Schema: orders (alias: kab)(value, level, status, code) products(type, name, status, date) Task: Find name from orders where a matching record exists in products with the same level. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = kab.level );
{ "outer_table": "orders", "inner_table": "products", "outer_alias": "kab", "inner_alias": "nad", "proj_col": "name", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08563
train
v3
Schema: products (alias: nad)(status, name, id, type) items(amount, type, id, date) Task: Find code from products where amount exceeds the average amount from items for the same id. SQL:
SELECT code FROM products AS nad WHERE amount > ( SELECT AVG(amount) FROM items AS ikob WHERE ikob.id = nad.id );
{ "outer_table": "products", "inner_table": "items", "outer_alias": "nad", "inner_alias": "ikob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08564
train
v1
Schema: managers (alias: hac)(amount, level, salary, value) products(value, amount, type, salary) Task: Find amount from managers where type appears in products entries with matching level. SQL:
SELECT amount FROM managers AS hac WHERE type IN ( SELECT type FROM products AS nad WHERE nad.level = hac.level );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "hac", "inner_alias": "nad", "proj_col": "amount", "filter_col": "type", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08565
train
v1
Schema: transactions (alias: gev)(value, status, date, name) managers(value, code, salary, name) Task: Select amount from transactions where id exists in managers for the same level. SQL:
SELECT amount FROM transactions AS gev WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.level = gev.level );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "gev", "inner_alias": "hac", "proj_col": "amount", "filter_col": "id", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08566
train
v1
Schema: invoices (alias: fal)(value, type, date, level) employees(date, value, level, type) Task: Retrieve code from invoices whose type is found in employees rows where level matches the outer record. SQL:
SELECT code FROM invoices AS fal WHERE type IN ( SELECT type FROM employees AS bev WHERE bev.level = fal.level );
{ "outer_table": "invoices", "inner_table": "employees", "outer_alias": "fal", "inner_alias": "bev", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08567
train
v1
Schema: orders (alias: kab)(salary, status, date, code) transactions(status, salary, type, value) Task: Retrieve amount from orders whose status is found in transactions rows where id matches the outer record. SQL:
SELECT amount FROM orders AS kab WHERE status IN ( SELECT status FROM transactions AS gev WHERE gev.id = kab.id );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08568
train
v1
Schema: transactions (alias: gev)(code, amount, type, level) categories(id, amount, salary, level) Task: Retrieve code from transactions whose type is found in categories rows where level matches the outer record. SQL:
SELECT code FROM transactions AS gev WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.level = gev.level );
{ "outer_table": "transactions", "inner_table": "categories", "outer_alias": "gev", "inner_alias": "egiv", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08569
train
v2
Schema: invoices (alias: fal)(salary, type, level, value) employees(code, salary, amount, date) Task: Find id from invoices where a matching record exists in employees with the same status. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.status = fal.status );
{ "outer_table": "invoices", "inner_table": "employees", "outer_alias": "fal", "inner_alias": "bev", "proj_col": "id", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08570
train
v3
Schema: branches (alias: agov)(id, level, status, date) customers(value, type, date, status) Task: Find code from branches where salary exceeds the minimum amount from customers for the same level. SQL:
SELECT code FROM branches AS agov WHERE salary > ( SELECT MIN(amount) FROM customers AS lex WHERE lex.level = agov.level );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08571
train
v1
Schema: managers (alias: hac)(code, level, type, value) tasks(value, name, amount, date) Task: Find value from managers where level appears in tasks entries with matching status. SQL:
SELECT value FROM managers AS hac WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.status = hac.status );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08572
train
v3
Schema: orders (alias: kab)(salary, name, type, code) shipments(amount, level, name, id) Task: Retrieve code from orders with value above the SUM(salary) of shipments rows sharing the same type. SQL:
SELECT code FROM orders AS kab WHERE value > ( SELECT SUM(salary) FROM shipments AS vnob WHERE vnob.type = kab.type );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08573
train
v3
Schema: categories (alias: egiv)(type, amount, value, id) shipments(id, name, amount, code) Task: Find id from categories where amount exceeds the maximum salary from shipments for the same level. SQL:
SELECT id FROM categories AS egiv WHERE amount > ( SELECT MAX(salary) FROM shipments AS vnob WHERE vnob.level = egiv.level );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08574
train
v1
Schema: products (alias: nad)(type, id, level, amount) projects(amount, type, id, level) Task: Select code from products where status exists in projects for the same id. SQL:
SELECT code FROM products AS nad WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.id = nad.id );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "code", "filter_col": "status", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08575
train
v2
Schema: tasks (alias: znob)(value, id, status, amount) requests(level, status, date, code) Task: Find value from tasks where a matching record exists in requests with the same id. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = znob.id );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "value", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08576
train
v1
Schema: transactions (alias: gev)(salary, amount, date, code) sales(name, id, value, salary) Task: Find name from transactions where type appears in sales entries with matching type. SQL:
SELECT name FROM transactions AS gev WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.type = gev.type );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "name", "filter_col": "type", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08577
train
v1
Schema: products (alias: nad)(amount, date, level, type) schedules(amount, id, type, code) Task: Retrieve value from products whose code is found in schedules rows where level matches the outer record. SQL:
SELECT value FROM products AS nad WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.level = nad.level );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08578
train
v1
Schema: projects (alias: uliv)(level, value, code, amount) schedules(date, id, type, salary) Task: Select code from projects where type exists in schedules for the same code. SQL:
SELECT code FROM projects AS uliv WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08579
train
v2
Schema: sales (alias: cif)(type, value, salary, id) products(amount, status, type, value) Task: Find code from sales where a matching record exists in products with the same level. SQL:
SELECT code FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = cif.level );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "code", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08580
train
v3
Schema: staff (alias: xnob)(status, value, amount, salary) products(type, status, code, value) Task: Find name from staff where salary exceeds the average salary from products for the same id. SQL:
SELECT name FROM staff AS xnob WHERE salary > ( SELECT AVG(salary) FROM products AS nad WHERE nad.id = xnob.id );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08581
train
v1
Schema: products (alias: nad)(date, value, code, salary) invoices(value, status, type, amount) Task: Select code from products where type exists in invoices for the same type. SQL:
SELECT code FROM products AS nad WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.type = nad.type );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "code", "filter_col": "type", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08582
train
v2
Schema: departments (alias: dov)(code, type, value, level) requests(salary, value, amount, level) Task: Find salary from departments where a matching record exists in requests with the same type. SQL:
SELECT salary FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.type = dov.type );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "salary", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08583
train
v2
Schema: shipments (alias: vnob)(salary, status, amount, id) projects(amount, type, code, level) Task: Retrieve name from shipments that have at least one corresponding entry in projects sharing the same level. SQL:
SELECT name FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "projects", "outer_alias": "vnob", "inner_alias": "uliv", "proj_col": "name", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08584
train
v1
Schema: staff (alias: xnob)(level, date, value, type) branches(amount, name, status, id) Task: Select name from staff where id exists in branches for the same status. SQL:
SELECT name FROM staff AS xnob WHERE id IN ( SELECT id FROM branches AS agov WHERE agov.status = xnob.status );
{ "outer_table": "staff", "inner_table": "branches", "outer_alias": "xnob", "inner_alias": "agov", "proj_col": "name", "filter_col": "id", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08585
train
v1
Schema: products (alias: nad)(status, value, code, id) transactions(amount, type, value, date) Task: Retrieve salary from products whose code is found in transactions rows where code matches the outer record. SQL:
SELECT salary FROM products AS nad WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.code = nad.code );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08586
train
v2
Schema: branches (alias: agov)(status, name, level, code) schedules(value, amount, type, name) Task: Find code from branches where a matching record exists in schedules with the same status. SQL:
SELECT code FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = agov.status );
{ "outer_table": "branches", "inner_table": "schedules", "outer_alias": "agov", "inner_alias": "vmob", "proj_col": "code", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08587
train
v1
Schema: sales (alias: cif)(status, id, value, salary) products(code, value, salary, name) Task: Find name from sales where level appears in products entries with matching status. SQL:
SELECT name FROM sales AS cif WHERE level IN ( SELECT level FROM products AS nad WHERE nad.status = cif.status );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08588
train
v1
Schema: employees (alias: bev)(amount, name, level, value) branches(date, type, level, name) Task: Retrieve name from employees whose code is found in branches rows where code matches the outer record. SQL:
SELECT name FROM employees AS bev WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.code = bev.code );
{ "outer_table": "employees", "inner_table": "branches", "outer_alias": "bev", "inner_alias": "agov", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08589
train
v2
Schema: orders (alias: kab)(type, code, date, level) customers(salary, name, level, status) Task: Retrieve name from orders that have at least one corresponding entry in customers sharing the same code. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = kab.code );
{ "outer_table": "orders", "inner_table": "customers", "outer_alias": "kab", "inner_alias": "lex", "proj_col": "name", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08590
train
v1
Schema: invoices (alias: fal)(level, name, code, id) projects(name, value, id, date) Task: Retrieve name from invoices whose level is found in projects rows where type matches the outer record. SQL:
SELECT name FROM invoices AS fal WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.type = fal.type );
{ "outer_table": "invoices", "inner_table": "projects", "outer_alias": "fal", "inner_alias": "uliv", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08591
train
v1
Schema: staff (alias: xnob)(name, value, level, amount) regions(name, code, date, value) Task: Find value from staff where type appears in regions entries with matching status. SQL:
SELECT value FROM staff AS xnob WHERE type IN ( SELECT type FROM regions AS okiv WHERE okiv.status = xnob.status );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08592
train
v3
Schema: customers (alias: lex)(id, type, name, code) regions(date, status, salary, code) Task: Find id from customers where salary exceeds the count of salary from regions for the same status. SQL:
SELECT id FROM customers AS lex WHERE salary > ( SELECT COUNT(salary) FROM regions AS okiv WHERE okiv.status = lex.status );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08593
train
v2
Schema: accounts (alias: jac)(type, date, name, value) sales(code, value, type, salary) Task: Retrieve salary from accounts that have at least one corresponding entry in sales sharing the same type. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = jac.type );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "salary", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08594
train
v3
Schema: invoices (alias: fal)(status, salary, id, amount) departments(amount, value, level, type) Task: Retrieve amount from invoices with salary above the MAX(salary) of departments rows sharing the same id. SQL:
SELECT amount FROM invoices AS fal WHERE salary > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.id = fal.id );
{ "outer_table": "invoices", "inner_table": "departments", "outer_alias": "fal", "inner_alias": "dov", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08595
train
v2
Schema: categories (alias: egiv)(id, date, level, value) managers(type, id, level, date) Task: Retrieve salary from categories that have at least one corresponding entry in managers sharing the same id. SQL:
SELECT salary FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.id = egiv.id );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "salary", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08596
train
v3
Schema: categories (alias: egiv)(status, type, level, date) schedules(date, value, level, type) Task: Retrieve salary from categories with amount above the SUM(amount) of schedules rows sharing the same status. SQL:
SELECT salary FROM categories AS egiv WHERE amount > ( SELECT SUM(amount) FROM schedules AS vmob WHERE vmob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "egiv", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08597
train
v2
Schema: invoices (alias: fal)(level, id, salary, amount) accounts(value, type, name, status) Task: Retrieve id from invoices that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = fal.code );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "id", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08598
train
v3
Schema: projects (alias: uliv)(level, amount, id, status) managers(type, status, code, name) Task: Retrieve salary from projects with salary above the MAX(salary) of managers rows sharing the same id. SQL:
SELECT salary FROM projects AS uliv WHERE salary > ( SELECT MAX(salary) FROM managers AS hac WHERE hac.id = uliv.id );
{ "outer_table": "projects", "inner_table": "managers", "outer_alias": "uliv", "inner_alias": "hac", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08599
train