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
v3
Schema: regions (alias: okiv)(date, id, type, value) departments(amount, code, name, id) Task: Find code from regions where value exceeds the average value from departments for the same id. SQL:
SELECT code FROM regions AS okiv WHERE value > ( SELECT AVG(value) FROM departments AS dov WHERE dov.id = okiv.id );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "okiv", "inner_alias": "dov", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06500
train
v3
Schema: schedules (alias: vmob)(id, status, code, date) orders(amount, salary, value, code) Task: Find amount from schedules where salary exceeds the total amount from orders for the same id. SQL:
SELECT amount FROM schedules AS vmob WHERE salary > ( SELECT SUM(amount) FROM orders AS kab WHERE kab.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "orders", "outer_alias": "vmob", "inner_alias": "kab", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06501
train
v2
Schema: products (alias: nad)(code, amount, date, name) accounts(salary, id, type, level) Task: Retrieve amount from products that have at least one corresponding entry in accounts sharing the same level. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.level = nad.level );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "amount", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06502
train
v1
Schema: products (alias: nad)(value, salary, level, date) branches(level, id, value, amount) Task: Retrieve value from products whose id is found in branches rows where id matches the outer record. SQL:
SELECT value FROM products AS nad WHERE id IN ( SELECT id FROM branches AS agov WHERE agov.id = nad.id );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "value", "filter_col": "id", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06503
train
v1
Schema: products (alias: nad)(amount, name, type, code) managers(salary, value, level, status) Task: Find value from products where type appears in managers entries with matching status. SQL:
SELECT value FROM products AS nad WHERE type IN ( SELECT type FROM managers AS hac WHERE hac.status = nad.status );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "nad", "inner_alias": "hac", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06504
train
v2
Schema: schedules (alias: vmob)(date, name, salary, id) accounts(level, status, date, type) Task: Retrieve salary from schedules that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "accounts", "outer_alias": "vmob", "inner_alias": "jac", "proj_col": "salary", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06505
train
v2
Schema: managers (alias: hac)(type, amount, date, level) customers(code, salary, name, value) Task: Find value from managers where a matching record exists in customers with the same type. SQL:
SELECT value FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = hac.type );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "value", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06506
train
v3
Schema: employees (alias: bev)(status, date, type, id) shipments(type, name, id, level) Task: Retrieve salary from employees with value above the AVG(salary) of shipments rows sharing the same level. SQL:
SELECT salary FROM employees AS bev WHERE value > ( SELECT AVG(salary) FROM shipments AS vnob WHERE vnob.level = bev.level );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06507
train
v3
Schema: employees (alias: bev)(value, status, id, name) orders(value, salary, code, status) Task: Find code from employees where salary exceeds the minimum salary from orders for the same type. SQL:
SELECT code FROM employees AS bev WHERE salary > ( SELECT MIN(salary) FROM orders AS kab WHERE kab.type = bev.type );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06508
train
v2
Schema: items (alias: ikob)(amount, status, id, date) requests(id, value, amount, date) Task: Find salary from items where a matching record exists in requests with the same code. SQL:
SELECT salary FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = ikob.code );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "ikob", "inner_alias": "ejof", "proj_col": "salary", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06509
train
v2
Schema: tasks (alias: znob)(level, status, code, name) orders(name, amount, id, date) Task: Find value from tasks where a matching record exists in orders with the same status. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = znob.status );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "value", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06510
train
v1
Schema: managers (alias: hac)(date, value, salary, id) orders(name, type, code, salary) Task: Find id from managers where id appears in orders entries with matching status. SQL:
SELECT id FROM managers AS hac WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.status = hac.status );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "id", "filter_col": "id", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06511
train
v3
Schema: managers (alias: hac)(date, id, level, code) staff(salary, date, id, amount) Task: Retrieve salary from managers with salary above the AVG(salary) of staff rows sharing the same status. SQL:
SELECT salary FROM managers AS hac WHERE salary > ( SELECT AVG(salary) FROM staff AS xnob WHERE xnob.status = hac.status );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "hac", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06512
train
v2
Schema: schedules (alias: vmob)(code, level, salary, id) products(id, value, date, type) Task: Retrieve id from schedules that have at least one corresponding entry in products sharing the same type. SQL:
SELECT id FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "products", "outer_alias": "vmob", "inner_alias": "nad", "proj_col": "id", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06513
train
v1
Schema: products (alias: nad)(code, level, value, id) invoices(status, amount, date, value) Task: Find id from products where status appears in invoices entries with matching code. SQL:
SELECT id FROM products AS nad WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.code = nad.code );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06514
train
v3
Schema: tasks (alias: znob)(value, type, code, name) categories(status, salary, id, value) Task: Find name from tasks where salary exceeds the minimum amount from categories for the same status. SQL:
SELECT name FROM tasks AS znob WHERE salary > ( SELECT MIN(amount) FROM categories AS egiv WHERE egiv.status = znob.status );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06515
train
v1
Schema: projects (alias: uliv)(amount, date, id, value) requests(id, level, value, date) Task: Retrieve code from projects whose level is found in requests rows where id matches the outer record. SQL:
SELECT code FROM projects AS uliv WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.id = uliv.id );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "code", "filter_col": "level", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06516
train
v1
Schema: requests (alias: ejof)(status, date, level, code) regions(type, value, status, amount) Task: Select code from requests where id exists in regions for the same type. SQL:
SELECT code FROM requests AS ejof WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.type = ejof.type );
{ "outer_table": "requests", "inner_table": "regions", "outer_alias": "ejof", "inner_alias": "okiv", "proj_col": "code", "filter_col": "id", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06517
train
v3
Schema: categories (alias: egiv)(salary, amount, name, level) projects(type, id, salary, amount) Task: Find id from categories where value exceeds the total value from projects for the same level. SQL:
SELECT id FROM categories AS egiv WHERE value > ( SELECT SUM(value) FROM projects AS uliv WHERE uliv.level = egiv.level );
{ "outer_table": "categories", "inner_table": "projects", "outer_alias": "egiv", "inner_alias": "uliv", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06518
train
v3
Schema: products (alias: nad)(salary, status, level, id) orders(id, name, salary, value) Task: Find value from products where salary exceeds the minimum value from orders for the same status. SQL:
SELECT value FROM products AS nad WHERE salary > ( SELECT MIN(value) FROM orders AS kab WHERE kab.status = nad.status );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "nad", "inner_alias": "kab", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06519
train
v3
Schema: shipments (alias: vnob)(amount, code, level, status) requests(level, id, value, salary) Task: Retrieve salary from shipments with value above the COUNT(value) of requests rows sharing the same status. SQL:
SELECT salary FROM shipments AS vnob WHERE value > ( SELECT COUNT(value) FROM requests AS ejof WHERE ejof.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "requests", "outer_alias": "vnob", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06520
train
v3
Schema: invoices (alias: fal)(type, salary, value, code) products(type, value, salary, amount) Task: Retrieve salary from invoices with value above the AVG(value) of products rows sharing the same type. SQL:
SELECT salary FROM invoices AS fal WHERE value > ( SELECT AVG(value) FROM products AS nad WHERE nad.type = fal.type );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06521
train
v2
Schema: tasks (alias: znob)(salary, amount, name, code) projects(id, salary, name, date) Task: Retrieve salary from tasks that have at least one corresponding entry in projects sharing the same status. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = znob.status );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "salary", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06522
train
v2
Schema: sales (alias: cif)(status, type, salary, code) managers(type, level, status, name) Task: Find value from sales where a matching record exists in managers with the same code. SQL:
SELECT value FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = cif.code );
{ "outer_table": "sales", "inner_table": "managers", "outer_alias": "cif", "inner_alias": "hac", "proj_col": "value", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06523
train
v3
Schema: categories (alias: egiv)(amount, status, code, value) invoices(value, level, salary, name) Task: Retrieve name from categories with amount above the MAX(amount) of invoices rows sharing the same id. SQL:
SELECT name FROM categories AS egiv WHERE amount > ( SELECT MAX(amount) FROM invoices AS fal WHERE fal.id = egiv.id );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06524
train
v1
Schema: products (alias: nad)(type, amount, status, date) regions(date, amount, status, code) Task: Retrieve value from products whose level is found in regions rows where code matches the outer record. SQL:
SELECT value FROM products AS nad WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.code = nad.code );
{ "outer_table": "products", "inner_table": "regions", "outer_alias": "nad", "inner_alias": "okiv", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06525
train
v2
Schema: projects (alias: uliv)(value, amount, status, name) categories(level, salary, type, status) Task: Retrieve id from projects that have at least one corresponding entry in categories sharing the same status. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = uliv.status );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "id", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06526
train
v3
Schema: tasks (alias: znob)(date, amount, code, type) projects(id, level, type, value) Task: Find code from tasks where value exceeds the count of salary from projects for the same type. SQL:
SELECT code FROM tasks AS znob WHERE value > ( SELECT COUNT(salary) FROM projects AS uliv WHERE uliv.type = znob.type );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06527
train
v2
Schema: invoices (alias: fal)(level, value, amount, code) regions(type, level, name, date) Task: Find code from invoices where a matching record exists in regions with the same id. SQL:
SELECT code FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = fal.id );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "code", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06528
train
v3
Schema: invoices (alias: fal)(code, type, date, value) employees(amount, type, status, level) Task: Find salary from invoices where value exceeds the total amount from employees for the same id. SQL:
SELECT salary FROM invoices AS fal WHERE value > ( SELECT SUM(amount) FROM employees AS bev WHERE bev.id = fal.id );
{ "outer_table": "invoices", "inner_table": "employees", "outer_alias": "fal", "inner_alias": "bev", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06529
train
v2
Schema: sales (alias: cif)(amount, level, id, status) shipments(name, salary, id, code) Task: Find amount from sales where a matching record exists in shipments with the same id. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = cif.id );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "amount", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06530
train
v3
Schema: employees (alias: bev)(level, id, value, salary) projects(id, status, amount, type) Task: Find value from employees where value exceeds the total amount from projects for the same status. SQL:
SELECT value FROM employees AS bev WHERE value > ( SELECT SUM(amount) FROM projects AS uliv WHERE uliv.status = bev.status );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06531
train
v3
Schema: departments (alias: dov)(date, name, value, level) requests(salary, amount, code, level) Task: Retrieve id from departments with amount above the AVG(value) of requests rows sharing the same id. SQL:
SELECT id FROM departments AS dov WHERE amount > ( SELECT AVG(value) FROM requests AS ejof WHERE ejof.id = dov.id );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06532
train
v2
Schema: accounts (alias: jac)(type, name, salary, value) sales(date, amount, level, id) Task: Find name from accounts where a matching record exists in sales with the same type. SQL:
SELECT name 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": "name", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06533
train
v2
Schema: transactions (alias: gev)(level, code, status, type) sales(amount, code, salary, level) Task: Retrieve salary from transactions that have at least one corresponding entry in sales sharing the same type. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = gev.type );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "salary", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06534
train
v2
Schema: invoices (alias: fal)(amount, status, id, date) shipments(type, amount, name, value) Task: Retrieve value from invoices that have at least one corresponding entry in shipments sharing the same code. SQL:
SELECT value FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = fal.code );
{ "outer_table": "invoices", "inner_table": "shipments", "outer_alias": "fal", "inner_alias": "vnob", "proj_col": "value", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06535
train
v1
Schema: products (alias: nad)(amount, salary, type, value) invoices(amount, date, id, name) Task: Retrieve value from products whose code is found in invoices rows where code matches the outer record. SQL:
SELECT value FROM products AS nad WHERE code IN ( SELECT code FROM invoices AS fal WHERE fal.code = nad.code );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "value", "filter_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06536
train
v2
Schema: schedules (alias: vmob)(code, level, amount, status) sales(name, value, amount, id) Task: Retrieve name from schedules that have at least one corresponding entry in sales sharing the same code. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "vmob", "inner_alias": "cif", "proj_col": "name", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06537
train
v3
Schema: regions (alias: okiv)(code, value, level, date) categories(salary, date, status, value) Task: Find salary from regions where salary exceeds the average salary from categories for the same type. SQL:
SELECT salary FROM regions AS okiv WHERE salary > ( SELECT AVG(salary) FROM categories AS egiv WHERE egiv.type = okiv.type );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06538
train
v2
Schema: categories (alias: egiv)(date, amount, type, value) shipments(salary, type, date, value) Task: Retrieve salary from categories that have at least one corresponding entry in shipments sharing the same type. SQL:
SELECT salary FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "salary", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06539
train
v2
Schema: orders (alias: kab)(code, name, value, type) sales(date, status, value, level) Task: Find salary from orders where a matching record exists in sales with the same code. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = kab.code );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "salary", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06540
train
v3
Schema: invoices (alias: fal)(id, value, salary, code) accounts(code, date, status, salary) Task: Find salary from invoices where amount exceeds the count of value from accounts for the same level. SQL:
SELECT salary FROM invoices AS fal WHERE amount > ( SELECT COUNT(value) FROM accounts AS jac WHERE jac.level = fal.level );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06541
train
v2
Schema: managers (alias: hac)(code, salary, value, level) invoices(id, value, code, status) Task: Find amount from managers where a matching record exists in invoices with the same type. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = hac.type );
{ "outer_table": "managers", "inner_table": "invoices", "outer_alias": "hac", "inner_alias": "fal", "proj_col": "amount", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06542
train
v3
Schema: shipments (alias: vnob)(salary, date, amount, type) regions(value, type, amount, date) Task: Retrieve code from shipments with value above the MAX(salary) of regions rows sharing the same code. SQL:
SELECT code FROM shipments AS vnob WHERE value > ( SELECT MAX(salary) FROM regions AS okiv WHERE okiv.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06543
train
v1
Schema: projects (alias: uliv)(amount, value, type, salary) orders(level, date, status, code) Task: Find id from projects where status appears in orders entries with matching level. SQL:
SELECT id FROM projects AS uliv WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.level = uliv.level );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "id", "filter_col": "status", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06544
train
v1
Schema: customers (alias: lex)(level, type, id, salary) branches(status, date, type, name) Task: Select name from customers where code exists in branches for the same id. SQL:
SELECT name FROM customers AS lex WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.id = lex.id );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06545
train
v3
Schema: customers (alias: lex)(date, type, id, value) schedules(name, code, id, salary) Task: Retrieve amount from customers with amount above the MIN(salary) of schedules rows sharing the same id. SQL:
SELECT amount FROM customers AS lex WHERE amount > ( SELECT MIN(salary) FROM schedules AS vmob WHERE vmob.id = lex.id );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06546
train
v3
Schema: shipments (alias: vnob)(id, type, level, amount) regions(status, date, amount, value) Task: Find value from shipments where salary exceeds the total amount from regions for the same level. SQL:
SELECT value FROM shipments AS vnob WHERE salary > ( SELECT SUM(amount) FROM regions AS okiv WHERE okiv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06547
train
v1
Schema: branches (alias: agov)(amount, level, name, date) regions(date, id, status, name) Task: Find name from branches where status appears in regions entries with matching type. SQL:
SELECT name FROM branches AS agov WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.type = agov.type );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06548
train
v2
Schema: products (alias: nad)(code, type, level, salary) staff(value, type, salary, name) Task: Retrieve name from products that have at least one corresponding entry in staff sharing the same status. SQL:
SELECT name FROM products AS nad WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = nad.status );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "name", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06549
train
v2
Schema: categories (alias: egiv)(status, type, code, id) sales(id, name, amount, value) 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_06550
train
v3
Schema: regions (alias: okiv)(id, amount, name, date) departments(salary, value, date, name) Task: Retrieve code from regions with salary above the MAX(amount) of departments rows sharing the same status. SQL:
SELECT code FROM regions AS okiv WHERE salary > ( SELECT MAX(amount) FROM departments AS dov WHERE dov.status = okiv.status );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "okiv", "inner_alias": "dov", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06551
train
v2
Schema: regions (alias: okiv)(status, salary, code, value) products(value, name, code, salary) Task: Retrieve amount from regions that have at least one corresponding entry in products sharing the same type. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = okiv.type );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "amount", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06552
train
v3
Schema: transactions (alias: gev)(code, level, status, salary) invoices(status, type, code, value) Task: Find name from transactions where amount exceeds the average amount from invoices for the same type. SQL:
SELECT name FROM transactions AS gev WHERE amount > ( SELECT AVG(amount) FROM invoices AS fal WHERE fal.type = gev.type );
{ "outer_table": "transactions", "inner_table": "invoices", "outer_alias": "gev", "inner_alias": "fal", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06553
train
v1
Schema: products (alias: nad)(type, date, status, value) requests(amount, date, type, value) Task: Find id from products where code appears in requests entries with matching id. SQL:
SELECT id FROM products AS nad WHERE code IN ( SELECT code FROM requests AS ejof WHERE ejof.id = nad.id );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "id", "filter_col": "code", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06554
train
v1
Schema: products (alias: nad)(type, level, name, amount) shipments(level, value, type, id) Task: Retrieve id from products whose level is found in shipments rows where code matches the outer record. SQL:
SELECT id FROM products AS nad WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.code = nad.code );
{ "outer_table": "products", "inner_table": "shipments", "outer_alias": "nad", "inner_alias": "vnob", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06555
train
v2
Schema: projects (alias: uliv)(amount, type, level, salary) tasks(amount, level, type, id) Task: Retrieve amount from projects that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = uliv.id );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "uliv", "inner_alias": "znob", "proj_col": "amount", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06556
train
v3
Schema: departments (alias: dov)(value, code, salary, date) requests(type, level, id, status) Task: Find id from departments where salary exceeds the minimum amount from requests for the same id. SQL:
SELECT id FROM departments AS dov WHERE salary > ( SELECT MIN(amount) FROM requests AS ejof WHERE ejof.id = dov.id );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06557
train
v1
Schema: shipments (alias: vnob)(status, code, name, level) items(code, amount, id, level) Task: Find name from shipments where level appears in items entries with matching code. SQL:
SELECT name FROM shipments AS vnob WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "items", "outer_alias": "vnob", "inner_alias": "ikob", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06558
train
v1
Schema: orders (alias: kab)(amount, id, salary, type) sales(amount, id, status, date) Task: Select amount from orders where code exists in sales for the same code. SQL:
SELECT amount FROM orders AS kab WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.code = kab.code );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06559
train
v1
Schema: managers (alias: hac)(level, status, salary, type) sales(date, name, value, salary) Task: Retrieve id from managers whose type is found in sales rows where status matches the outer record. SQL:
SELECT id FROM managers AS hac WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.status = hac.status );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06560
train
v2
Schema: sales (alias: cif)(status, date, level, amount) orders(status, level, type, value) Task: Retrieve code from sales that have at least one corresponding entry in orders sharing the same id. SQL:
SELECT code FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = cif.id );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "code", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06561
train
v2
Schema: regions (alias: okiv)(date, type, amount, id) departments(value, id, name, date) Task: Find salary from regions where a matching record exists in departments with the same id. SQL:
SELECT salary FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = okiv.id );
{ "outer_table": "regions", "inner_table": "departments", "outer_alias": "okiv", "inner_alias": "dov", "proj_col": "salary", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06562
train
v1
Schema: projects (alias: uliv)(name, type, amount, id) shipments(salary, level, date, amount) Task: Find amount from projects where type appears in shipments entries with matching type. SQL:
SELECT amount FROM projects AS uliv WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "shipments", "outer_alias": "uliv", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06563
train
v1
Schema: categories (alias: egiv)(code, name, type, status) managers(date, code, id, name) Task: Find code from categories where type appears in managers entries with matching status. SQL:
SELECT code FROM categories AS egiv WHERE type IN ( SELECT type FROM managers AS hac WHERE hac.status = egiv.status );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06564
train
v2
Schema: invoices (alias: fal)(status, level, salary, value) orders(code, amount, id, type) Task: Retrieve name from invoices that have at least one corresponding entry in orders sharing the same status. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = fal.status );
{ "outer_table": "invoices", "inner_table": "orders", "outer_alias": "fal", "inner_alias": "kab", "proj_col": "name", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06565
train
v3
Schema: items (alias: ikob)(name, value, code, status) invoices(value, name, type, amount) Task: Retrieve name from items with salary above the COUNT(salary) of invoices rows sharing the same status. SQL:
SELECT name FROM items AS ikob WHERE salary > ( SELECT COUNT(salary) FROM invoices AS fal WHERE fal.status = ikob.status );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06566
train
v1
Schema: requests (alias: ejof)(name, id, date, type) accounts(status, level, id, code) Task: Retrieve value from requests whose id is found in accounts rows where type matches the outer record. SQL:
SELECT value FROM requests AS ejof WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.type = ejof.type );
{ "outer_table": "requests", "inner_table": "accounts", "outer_alias": "ejof", "inner_alias": "jac", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06567
train
v1
Schema: schedules (alias: vmob)(type, level, status, code) employees(level, type, amount, code) Task: Select salary from schedules where level exists in employees for the same status. SQL:
SELECT salary FROM schedules AS vmob WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "vmob", "inner_alias": "bev", "proj_col": "salary", "filter_col": "level", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06568
train
v1
Schema: employees (alias: bev)(level, name, status, date) shipments(type, id, name, level) Task: Retrieve salary from employees whose status is found in shipments rows where level matches the outer record. SQL:
SELECT salary FROM employees AS bev WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.level = bev.level );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06569
train
v1
Schema: categories (alias: egiv)(level, amount, date, code) tasks(amount, date, id, value) Task: Find id from categories where code appears in tasks entries with matching type. SQL:
SELECT id FROM categories AS egiv WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "tasks", "outer_alias": "egiv", "inner_alias": "znob", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06570
train
v3
Schema: accounts (alias: jac)(id, status, level, type) invoices(name, id, type, status) Task: Find value from accounts where salary exceeds the minimum amount from invoices for the same type. SQL:
SELECT value FROM accounts AS jac WHERE salary > ( SELECT MIN(amount) FROM invoices AS fal WHERE fal.type = jac.type );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06571
train
v2
Schema: schedules (alias: vmob)(value, name, type, code) staff(code, level, value, name) Task: Find value from schedules where a matching record exists in staff with the same code. SQL:
SELECT value FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "value", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06572
train
v3
Schema: invoices (alias: fal)(date, level, value, code) regions(level, status, date, type) Task: Find amount from invoices where amount exceeds the minimum salary from regions for the same id. SQL:
SELECT amount FROM invoices AS fal WHERE amount > ( SELECT MIN(salary) FROM regions AS okiv WHERE okiv.id = fal.id );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06573
train
v1
Schema: categories (alias: egiv)(type, status, level, code) tasks(amount, type, date, name) Task: Select name from categories where level exists in tasks for the same status. SQL:
SELECT name FROM categories AS egiv WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "tasks", "outer_alias": "egiv", "inner_alias": "znob", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06574
train
v2
Schema: products (alias: nad)(status, level, name, type) orders(id, code, level, type) Task: Find name from products where a matching record exists in orders with the same level. SQL:
SELECT name FROM products AS nad WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = nad.level );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "nad", "inner_alias": "kab", "proj_col": "name", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06575
train
v3
Schema: invoices (alias: fal)(value, level, name, amount) items(level, amount, value, id) Task: Find name from invoices where salary exceeds the minimum amount from items for the same id. SQL:
SELECT name FROM invoices AS fal WHERE salary > ( SELECT MIN(amount) FROM items AS ikob WHERE ikob.id = fal.id );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "fal", "inner_alias": "ikob", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06576
train
v1
Schema: employees (alias: bev)(type, name, amount, salary) orders(name, status, salary, code) Task: Find value from employees where status appears in orders entries with matching code. SQL:
SELECT value FROM employees AS bev WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.code = bev.code );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "value", "filter_col": "status", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06577
train
v1
Schema: shipments (alias: vnob)(status, type, code, id) transactions(status, code, level, type) Task: Find code from shipments where id appears in transactions entries with matching level. SQL:
SELECT code FROM shipments AS vnob WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "transactions", "outer_alias": "vnob", "inner_alias": "gev", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06578
train
v2
Schema: transactions (alias: gev)(salary, name, amount, code) sales(level, salary, code, value) Task: Find amount from transactions where a matching record exists in sales with the same code. SQL:
SELECT amount FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.code = gev.code );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "amount", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06579
train
v3
Schema: staff (alias: xnob)(salary, id, code, level) customers(level, name, value, salary) Task: Retrieve code from staff with salary above the SUM(salary) of customers rows sharing the same type. SQL:
SELECT code FROM staff AS xnob WHERE salary > ( SELECT SUM(salary) FROM customers AS lex WHERE lex.type = xnob.type );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06580
train
v3
Schema: schedules (alias: vmob)(name, status, salary, level) managers(date, level, code, status) Task: Retrieve code from schedules with amount above the MAX(value) of managers rows sharing the same code. SQL:
SELECT code FROM schedules AS vmob WHERE amount > ( SELECT MAX(value) FROM managers AS hac WHERE hac.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06581
train
v3
Schema: managers (alias: hac)(code, date, amount, name) employees(level, amount, salary, name) Task: Find id from managers where value exceeds the total value from employees for the same level. SQL:
SELECT id FROM managers AS hac WHERE value > ( SELECT SUM(value) FROM employees AS bev WHERE bev.level = hac.level );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06582
train
v2
Schema: requests (alias: ejof)(code, date, salary, value) employees(value, status, salary, name) Task: Retrieve value from requests that have at least one corresponding entry in employees sharing the same id. SQL:
SELECT value FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = ejof.id );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ejof", "inner_alias": "bev", "proj_col": "value", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06583
train
v3
Schema: projects (alias: uliv)(status, amount, name, code) invoices(name, date, id, salary) Task: Retrieve amount from projects with amount above the MAX(value) of invoices rows sharing the same status. SQL:
SELECT amount FROM projects AS uliv WHERE amount > ( SELECT MAX(value) FROM invoices AS fal WHERE fal.status = uliv.status );
{ "outer_table": "projects", "inner_table": "invoices", "outer_alias": "uliv", "inner_alias": "fal", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06584
train
v2
Schema: shipments (alias: vnob)(name, code, status, id) accounts(date, name, type, level) Task: Find amount from shipments where a matching record exists in accounts with the same type. SQL:
SELECT amount FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "accounts", "outer_alias": "vnob", "inner_alias": "jac", "proj_col": "amount", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06585
train
v2
Schema: categories (alias: egiv)(type, date, name, code) managers(salary, level, amount, name) Task: Retrieve code from categories that have at least one corresponding entry in managers sharing the same type. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = egiv.type );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "code", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06586
train
v2
Schema: tasks (alias: znob)(level, name, type, status) schedules(id, value, type, amount) Task: Find amount from tasks where a matching record exists in schedules with the same status. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "amount", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06587
train
v3
Schema: items (alias: ikob)(type, salary, value, level) projects(status, name, code, value) Task: Retrieve amount from items with amount above the COUNT(amount) of projects rows sharing the same status. SQL:
SELECT amount FROM items AS ikob WHERE amount > ( SELECT COUNT(amount) FROM projects AS uliv WHERE uliv.status = ikob.status );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06588
train
v2
Schema: staff (alias: xnob)(amount, code, name, date) requests(level, type, date, amount) Task: Retrieve name from staff that have at least one corresponding entry in requests sharing the same id. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = xnob.id );
{ "outer_table": "staff", "inner_table": "requests", "outer_alias": "xnob", "inner_alias": "ejof", "proj_col": "name", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06589
train
v3
Schema: schedules (alias: vmob)(name, salary, type, status) accounts(id, code, date, name) Task: Find salary from schedules where amount exceeds the count of amount from accounts for the same type. SQL:
SELECT salary FROM schedules AS vmob WHERE amount > ( SELECT COUNT(amount) FROM accounts AS jac WHERE jac.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "accounts", "outer_alias": "vmob", "inner_alias": "jac", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06590
train
v3
Schema: departments (alias: dov)(level, type, code, date) staff(salary, name, date, value) Task: Find name from departments where amount exceeds the average value from staff for the same status. SQL:
SELECT name FROM departments AS dov WHERE amount > ( SELECT AVG(value) FROM staff AS xnob WHERE xnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "staff", "outer_alias": "dov", "inner_alias": "xnob", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06591
train
v1
Schema: orders (alias: kab)(amount, value, level, date) schedules(level, type, salary, date) Task: Select salary from orders where code exists in schedules for the same status. SQL:
SELECT salary FROM orders AS kab WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.status = kab.status );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06592
train
v3
Schema: projects (alias: uliv)(name, code, value, type) orders(value, status, type, date) Task: Retrieve value from projects with value above the MIN(amount) of orders rows sharing the same id. SQL:
SELECT value FROM projects AS uliv WHERE value > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.id = uliv.id );
{ "outer_table": "projects", "inner_table": "orders", "outer_alias": "uliv", "inner_alias": "kab", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06593
train
v2
Schema: accounts (alias: jac)(salary, date, id, level) projects(id, code, name, date) Task: Retrieve salary from accounts that have at least one corresponding entry in projects sharing the same type. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = jac.type );
{ "outer_table": "accounts", "inner_table": "projects", "outer_alias": "jac", "inner_alias": "uliv", "proj_col": "salary", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06594
train
v1
Schema: accounts (alias: jac)(value, level, salary, amount) sales(amount, type, value, code) Task: Find code from accounts where id appears in sales entries with matching status. SQL:
SELECT code FROM accounts AS jac WHERE id IN ( SELECT id FROM sales AS cif WHERE cif.status = jac.status );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06595
train
v1
Schema: products (alias: nad)(amount, type, code, salary) transactions(amount, id, date, salary) Task: Retrieve salary from products whose id is found in transactions rows where code matches the outer record. SQL:
SELECT salary FROM products AS nad WHERE id IN ( SELECT id 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": "id", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06596
train
v3
Schema: departments (alias: dov)(code, status, value, date) regions(value, level, amount, date) Task: Retrieve value from departments with value above the AVG(salary) of regions rows sharing the same id. SQL:
SELECT value FROM departments AS dov WHERE value > ( SELECT AVG(salary) FROM regions AS okiv WHERE okiv.id = dov.id );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dov", "inner_alias": "okiv", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06597
train
v1
Schema: sales (alias: cif)(name, type, status, id) projects(value, salary, type, id) Task: Select amount from sales where type exists in projects for the same type. SQL:
SELECT amount FROM sales AS cif WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.type = cif.type );
{ "outer_table": "sales", "inner_table": "projects", "outer_alias": "cif", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "type", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06598
train
v3
Schema: orders (alias: kab)(level, amount, status, salary) categories(value, level, code, amount) Task: Find name from orders where value exceeds the maximum value from categories for the same type. SQL:
SELECT name FROM orders AS kab WHERE value > ( SELECT MAX(value) FROM categories AS egiv WHERE egiv.type = kab.type );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06599
train