variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v2
Schema: projects (alias: uliv)(name, id, amount, status) customers(code, salary, type, amount) Task: Find value from projects where a matching record exists in customers with the same level. SQL:
SELECT value FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = uliv.level );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "uliv", "inner_alias": "lex", "proj_col": "value", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08600
train
v1
Schema: projects (alias: uliv)(name, amount, code, type) staff(name, value, salary, date) Task: Find value from projects where type appears in staff entries with matching status. SQL:
SELECT value FROM projects AS uliv WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.status = uliv.status );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08601
train
v3
Schema: invoices (alias: fal)(amount, salary, code, value) orders(status, amount, value, type) Task: Find value from invoices where value exceeds the maximum amount from orders for the same id. SQL:
SELECT value FROM invoices AS fal WHERE value > ( SELECT MAX(amount) FROM orders AS kab WHERE kab.id = fal.id );
{ "outer_table": "invoices", "inner_table": "orders", "outer_alias": "fal", "inner_alias": "kab", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08602
train
v1
Schema: items (alias: ikob)(code, value, amount, status) departments(level, value, date, status) Task: Retrieve amount from items whose level is found in departments rows where status matches the outer record. SQL:
SELECT amount FROM items AS ikob WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.status = ikob.status );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "ikob", "inner_alias": "dov", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08603
train
v2
Schema: shipments (alias: vnob)(level, value, amount, type) sales(level, value, status, date) Task: Retrieve code from shipments that have at least one corresponding entry in sales sharing the same id. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "code", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08604
train
v1
Schema: orders (alias: kab)(type, id, amount, code) shipments(name, type, salary, amount) Task: Find name from orders where code appears in shipments entries with matching level. SQL:
SELECT name FROM orders AS kab WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.level = kab.level );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "name", "filter_col": "code", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08605
train
v3
Schema: customers (alias: lex)(status, salary, name, amount) orders(status, code, amount, level) Task: Find code from customers where value exceeds the minimum amount from orders for the same code. SQL:
SELECT code FROM customers AS lex WHERE value > ( SELECT MIN(amount) FROM orders AS kab WHERE kab.code = lex.code );
{ "outer_table": "customers", "inner_table": "orders", "outer_alias": "lex", "inner_alias": "kab", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08606
train
v3
Schema: employees (alias: bev)(level, type, id, code) transactions(date, type, status, name) Task: Retrieve code from employees with salary above the SUM(salary) of transactions rows sharing the same level. SQL:
SELECT code FROM employees AS bev WHERE salary > ( SELECT SUM(salary) FROM transactions AS gev WHERE gev.level = bev.level );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "bev", "inner_alias": "gev", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08607
train
v2
Schema: managers (alias: hac)(amount, level, status, salary) staff(value, code, name, status) Task: Retrieve id from managers that have at least one corresponding entry in staff sharing the same id. SQL:
SELECT id FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = hac.id );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "hac", "inner_alias": "xnob", "proj_col": "id", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08608
train
v3
Schema: requests (alias: ejof)(name, code, date, level) schedules(id, amount, level, name) Task: Retrieve name from requests with value above the SUM(value) of schedules rows sharing the same type. SQL:
SELECT name FROM requests AS ejof WHERE value > ( SELECT SUM(value) FROM schedules AS vmob WHERE vmob.type = ejof.type );
{ "outer_table": "requests", "inner_table": "schedules", "outer_alias": "ejof", "inner_alias": "vmob", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08609
train
v3
Schema: staff (alias: xnob)(code, status, value, salary) managers(value, salary, code, status) Task: Retrieve code from staff with amount above the MIN(amount) of managers rows sharing the same code. SQL:
SELECT code FROM staff AS xnob WHERE amount > ( SELECT MIN(amount) FROM managers AS hac WHERE hac.code = xnob.code );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "xnob", "inner_alias": "hac", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08610
train
v1
Schema: shipments (alias: vnob)(level, name, status, date) customers(value, type, amount, date) Task: Select id from shipments where status exists in customers for the same code. SQL:
SELECT id FROM shipments AS vnob WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08611
train
v2
Schema: requests (alias: ejof)(status, salary, id, date) employees(name, status, type, code) Task: Find salary from requests where a matching record exists in employees with the same code. SQL:
SELECT salary FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.code = ejof.code );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ejof", "inner_alias": "bev", "proj_col": "salary", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08612
train
v3
Schema: branches (alias: agov)(level, code, date, id) tasks(name, amount, type, salary) Task: Retrieve name from branches with value above the MAX(amount) of tasks rows sharing the same type. SQL:
SELECT name FROM branches AS agov WHERE value > ( SELECT MAX(amount) FROM tasks AS znob WHERE znob.type = agov.type );
{ "outer_table": "branches", "inner_table": "tasks", "outer_alias": "agov", "inner_alias": "znob", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08613
train
v2
Schema: schedules (alias: vmob)(amount, id, salary, type) tasks(value, name, code, status) Task: Find salary from schedules where a matching record exists in tasks with the same type. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "salary", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08614
train
v2
Schema: invoices (alias: fal)(code, name, type, salary) items(type, salary, amount, value) Task: Retrieve amount from invoices that have at least one corresponding entry in items sharing the same code. SQL:
SELECT amount FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = fal.code );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "fal", "inner_alias": "ikob", "proj_col": "amount", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08615
train
v2
Schema: projects (alias: uliv)(value, name, date, salary) staff(name, code, id, amount) Task: Find amount from projects where a matching record exists in staff with the same code. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "amount", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08616
train
v2
Schema: departments (alias: dov)(date, type, name, level) employees(level, salary, value, id) Task: Retrieve salary from departments that have at least one corresponding entry in employees sharing the same level. SQL:
SELECT salary FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = dov.level );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "salary", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08617
train
v3
Schema: branches (alias: agov)(id, level, type, code) orders(salary, name, level, date) Task: Retrieve salary from branches with value above the MIN(value) of orders rows sharing the same level. SQL:
SELECT salary FROM branches AS agov WHERE value > ( SELECT MIN(value) FROM orders AS kab WHERE kab.level = agov.level );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08618
train
v1
Schema: schedules (alias: vmob)(name, salary, id, status) customers(level, salary, date, code) Task: Retrieve value from schedules whose status is found in customers rows where level matches the outer record. SQL:
SELECT value FROM schedules AS vmob WHERE status IN ( SELECT status FROM customers AS lex WHERE lex.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "vmob", "inner_alias": "lex", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08619
train
v3
Schema: shipments (alias: vnob)(amount, name, date, level) sales(value, code, type, name) Task: Find value from shipments where salary exceeds the maximum salary from sales for the same status. SQL:
SELECT value FROM shipments AS vnob WHERE salary > ( SELECT MAX(salary) FROM sales AS cif WHERE cif.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08620
train
v2
Schema: accounts (alias: jac)(id, date, code, salary) departments(code, level, name, salary) Task: Retrieve value from accounts that have at least one corresponding entry in departments sharing the same code. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = jac.code );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "value", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08621
train
v2
Schema: shipments (alias: vnob)(amount, id, code, date) staff(date, level, status, salary) Task: Find amount from shipments where a matching record exists in staff with the same code. SQL:
SELECT amount FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "amount", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08622
train
v2
Schema: schedules (alias: vmob)(name, id, date, amount) tasks(code, name, date, salary) Task: Retrieve value from schedules that have at least one corresponding entry in tasks sharing the same type. SQL:
SELECT value FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "value", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08623
train
v3
Schema: staff (alias: xnob)(amount, id, status, level) shipments(amount, level, type, salary) Task: Retrieve name from staff with value above the SUM(amount) of shipments rows sharing the same code. SQL:
SELECT name FROM staff AS xnob WHERE value > ( SELECT SUM(amount) FROM shipments AS vnob WHERE vnob.code = xnob.code );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08624
train
v1
Schema: transactions (alias: gev)(name, date, type, value) customers(status, id, type, value) Task: Find salary from transactions where type appears in customers entries with matching level. SQL:
SELECT salary FROM transactions AS gev WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.level = gev.level );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "gev", "inner_alias": "lex", "proj_col": "salary", "filter_col": "type", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08625
train
v3
Schema: regions (alias: okiv)(code, value, level, type) sales(name, code, level, value) Task: Retrieve value from regions with salary above the SUM(amount) of sales rows sharing the same id. SQL:
SELECT value FROM regions AS okiv WHERE salary > ( SELECT SUM(amount) FROM sales AS cif WHERE cif.id = okiv.id );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08626
train
v3
Schema: tasks (alias: znob)(level, value, status, code) transactions(date, type, salary, code) Task: Retrieve amount from tasks with salary above the SUM(amount) of transactions rows sharing the same status. SQL:
SELECT amount FROM tasks AS znob WHERE salary > ( SELECT SUM(amount) FROM transactions AS gev WHERE gev.status = znob.status );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08627
train
v3
Schema: products (alias: nad)(date, value, id, amount) accounts(type, id, code, level) Task: Find code from products where value exceeds the average value from accounts for the same status. SQL:
SELECT code FROM products AS nad WHERE value > ( SELECT AVG(value) FROM accounts AS jac WHERE jac.status = nad.status );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08628
train
v1
Schema: departments (alias: dov)(amount, status, type, name) categories(type, code, status, level) Task: Retrieve id from departments whose code is found in categories rows where code matches the outer record. SQL:
SELECT id FROM departments AS dov WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.code = dov.code );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dov", "inner_alias": "egiv", "proj_col": "id", "filter_col": "code", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08629
train
v2
Schema: employees (alias: bev)(id, salary, amount, level) products(status, salary, type, value) Task: Find name from employees where a matching record exists in products with the same level. SQL:
SELECT name FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.level = bev.level );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "name", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08630
train
v2
Schema: schedules (alias: vmob)(amount, level, name, date) items(value, type, code, name) Task: Retrieve salary from schedules that have at least one corresponding entry in items sharing the same type. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "vmob", "inner_alias": "ikob", "proj_col": "salary", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08631
train
v1
Schema: branches (alias: agov)(date, level, type, amount) items(value, amount, date, level) Task: Retrieve value from branches whose level is found in items rows where status matches the outer record. SQL:
SELECT value FROM branches AS agov WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.status = agov.status );
{ "outer_table": "branches", "inner_table": "items", "outer_alias": "agov", "inner_alias": "ikob", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08632
train
v3
Schema: regions (alias: okiv)(code, id, value, amount) items(amount, name, type, level) Task: Retrieve name from regions with value above the COUNT(value) of items rows sharing the same level. SQL:
SELECT name FROM regions AS okiv WHERE value > ( SELECT COUNT(value) FROM items AS ikob WHERE ikob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08633
train
v1
Schema: tasks (alias: znob)(name, value, date, code) customers(level, code, id, salary) Task: Select id from tasks where code exists in customers for the same id. SQL:
SELECT id FROM tasks AS znob WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.id = znob.id );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "znob", "inner_alias": "lex", "proj_col": "id", "filter_col": "code", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08634
train
v2
Schema: staff (alias: xnob)(name, status, salary, value) invoices(value, level, id, salary) Task: Find name from staff where a matching record exists in invoices with the same code. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = xnob.code );
{ "outer_table": "staff", "inner_table": "invoices", "outer_alias": "xnob", "inner_alias": "fal", "proj_col": "name", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08635
train
v1
Schema: products (alias: nad)(type, level, id, code) projects(id, date, value, amount) Task: Find value from products where type appears in projects entries with matching code. SQL:
SELECT value FROM products AS nad WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.code = nad.code );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "value", "filter_col": "type", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08636
train
v1
Schema: projects (alias: uliv)(date, status, salary, value) branches(amount, name, code, type) Task: Select value from projects where status exists in branches for the same id. SQL:
SELECT value FROM projects AS uliv WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.id = uliv.id );
{ "outer_table": "projects", "inner_table": "branches", "outer_alias": "uliv", "inner_alias": "agov", "proj_col": "value", "filter_col": "status", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08637
train
v3
Schema: branches (alias: agov)(value, date, name, status) accounts(amount, value, status, salary) Task: Retrieve value from branches with value above the MIN(value) of accounts rows sharing the same type. SQL:
SELECT value FROM branches AS agov WHERE value > ( SELECT MIN(value) FROM accounts AS jac WHERE jac.type = agov.type );
{ "outer_table": "branches", "inner_table": "accounts", "outer_alias": "agov", "inner_alias": "jac", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08638
train
v1
Schema: items (alias: ikob)(value, id, level, type) branches(type, level, value, salary) Task: Find id from items where level appears in branches entries with matching code. SQL:
SELECT id FROM items AS ikob WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.code = ikob.code );
{ "outer_table": "items", "inner_table": "branches", "outer_alias": "ikob", "inner_alias": "agov", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08639
train
v2
Schema: products (alias: nad)(amount, date, id, type) accounts(amount, id, status, code) Task: Retrieve id from products that have at least one corresponding entry in accounts sharing the same id. SQL:
SELECT id FROM products AS nad WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = nad.id );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "id", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08640
train
v2
Schema: regions (alias: okiv)(date, status, id, salary) accounts(type, name, code, value) Task: Find value from regions where a matching record exists in accounts with the same level. SQL:
SELECT value 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": "value", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_08641
train
v3
Schema: requests (alias: ejof)(id, name, type, code) departments(code, date, salary, amount) Task: Retrieve amount from requests with amount above the SUM(amount) of departments rows sharing the same status. SQL:
SELECT amount FROM requests AS ejof WHERE amount > ( SELECT SUM(amount) FROM departments AS dov WHERE dov.status = ejof.status );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08642
train
v2
Schema: schedules (alias: vmob)(type, level, status, salary) transactions(code, status, name, amount) Task: Retrieve name from schedules that have at least one corresponding entry in transactions sharing the same id. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "transactions", "outer_alias": "vmob", "inner_alias": "gev", "proj_col": "name", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08643
train
v3
Schema: managers (alias: hac)(date, status, level, name) staff(date, status, level, salary) Task: Find amount from managers where salary exceeds the minimum salary from staff for the same id. SQL:
SELECT amount FROM managers AS hac WHERE salary > ( SELECT MIN(salary) FROM staff AS xnob WHERE xnob.id = hac.id );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "hac", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08644
train
v1
Schema: departments (alias: dov)(amount, salary, type, date) categories(level, value, status, code) Task: Retrieve id from departments whose id is found in categories rows where level matches the outer record. SQL:
SELECT id FROM departments AS dov WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.level = dov.level );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dov", "inner_alias": "egiv", "proj_col": "id", "filter_col": "id", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08645
train
v3
Schema: categories (alias: egiv)(name, value, salary, id) branches(value, id, name, code) Task: Retrieve amount from categories with salary above the MAX(value) of branches rows sharing the same type. SQL:
SELECT amount FROM categories AS egiv WHERE salary > ( SELECT MAX(value) FROM branches AS agov WHERE agov.type = egiv.type );
{ "outer_table": "categories", "inner_table": "branches", "outer_alias": "egiv", "inner_alias": "agov", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08646
train
v2
Schema: managers (alias: hac)(level, id, amount, date) schedules(code, id, date, value) Task: Find value from managers where a matching record exists in schedules with the same status. SQL:
SELECT value FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = hac.status );
{ "outer_table": "managers", "inner_table": "schedules", "outer_alias": "hac", "inner_alias": "vmob", "proj_col": "value", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08647
train
v3
Schema: branches (alias: agov)(code, status, date, type) shipments(date, name, value, type) Task: Retrieve value from branches with value above the MIN(amount) of shipments rows sharing the same code. SQL:
SELECT value FROM branches AS agov WHERE value > ( SELECT MIN(amount) FROM shipments AS vnob WHERE vnob.code = agov.code );
{ "outer_table": "branches", "inner_table": "shipments", "outer_alias": "agov", "inner_alias": "vnob", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08648
train
v2
Schema: requests (alias: ejof)(type, status, code, amount) projects(date, name, id, amount) Task: Retrieve value from requests that have at least one corresponding entry in projects sharing the same type. SQL:
SELECT value 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": "value", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08649
train
v3
Schema: departments (alias: dov)(code, status, id, level) items(type, code, value, name) Task: Find name from departments where amount exceeds the total salary from items for the same status. SQL:
SELECT name FROM departments AS dov WHERE amount > ( SELECT SUM(salary) FROM items AS ikob WHERE ikob.status = dov.status );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08650
train
v2
Schema: products (alias: nad)(salary, level, status, date) regions(name, date, level, amount) Task: Retrieve salary from products that have at least one corresponding entry in regions sharing the same code. SQL:
SELECT salary FROM products AS nad WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = nad.code );
{ "outer_table": "products", "inner_table": "regions", "outer_alias": "nad", "inner_alias": "okiv", "proj_col": "salary", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08651
train
v1
Schema: staff (alias: xnob)(code, name, amount, status) customers(salary, name, value, status) Task: Find salary from staff where type appears in customers entries with matching code. SQL:
SELECT salary FROM staff AS xnob WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.code = xnob.code );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_08652
train
v1
Schema: branches (alias: agov)(salary, status, code, date) customers(name, status, id, code) Task: Retrieve salary from branches whose level is found in customers rows where level matches the outer record. SQL:
SELECT salary FROM branches AS agov WHERE level IN ( SELECT level FROM customers AS lex WHERE lex.level = agov.level );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "salary", "filter_col": "level", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08653
train
v2
Schema: categories (alias: egiv)(date, type, level, code) orders(date, name, level, type) Task: Find amount from categories where a matching record exists in orders with the same status. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = egiv.status );
{ "outer_table": "categories", "inner_table": "orders", "outer_alias": "egiv", "inner_alias": "kab", "proj_col": "amount", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08654
train
v3
Schema: shipments (alias: vnob)(salary, date, name, level) transactions(status, id, type, name) Task: Find id from shipments where salary exceeds the maximum value from transactions for the same id. SQL:
SELECT id FROM shipments AS vnob WHERE salary > ( SELECT MAX(value) FROM transactions AS gev WHERE gev.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "transactions", "outer_alias": "vnob", "inner_alias": "gev", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08655
train
v2
Schema: projects (alias: uliv)(amount, code, id, type) categories(amount, value, id, type) Task: Find salary from projects where a matching record exists in categories with the same type. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = uliv.type );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "salary", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08656
train
v3
Schema: schedules (alias: vmob)(salary, date, value, type) customers(status, date, level, code) Task: Retrieve name from schedules with salary above the AVG(salary) of customers rows sharing the same level. SQL:
SELECT name FROM schedules AS vmob WHERE salary > ( SELECT AVG(salary) FROM customers AS lex WHERE lex.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "vmob", "inner_alias": "lex", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08657
train
v1
Schema: accounts (alias: jac)(value, code, name, level) branches(value, amount, level, id) Task: Find code from accounts where code appears in branches entries with matching id. SQL:
SELECT code FROM accounts AS jac WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.id = jac.id );
{ "outer_table": "accounts", "inner_table": "branches", "outer_alias": "jac", "inner_alias": "agov", "proj_col": "code", "filter_col": "code", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08658
train
v1
Schema: shipments (alias: vnob)(status, date, type, value) orders(name, date, amount, id) Task: Find amount from shipments where level appears in orders entries with matching level. SQL:
SELECT amount FROM shipments AS vnob WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "amount", "filter_col": "level", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08659
train
v1
Schema: sales (alias: cif)(level, salary, type, amount) products(code, status, name, salary) Task: Select code from sales where type exists in products for the same code. SQL:
SELECT code FROM sales AS cif WHERE type IN ( SELECT type FROM products AS nad WHERE nad.code = cif.code );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08660
train
v3
Schema: invoices (alias: fal)(status, name, salary, value) regions(salary, status, date, name) Task: Find name from invoices where amount exceeds the maximum amount from regions for the same id. SQL:
SELECT name FROM invoices AS fal WHERE amount > ( SELECT MAX(amount) FROM regions AS okiv WHERE okiv.id = fal.id );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08661
train
v3
Schema: shipments (alias: vnob)(code, value, level, type) sales(type, value, id, level) Task: Retrieve name from shipments with value above the MAX(salary) of sales rows sharing the same code. SQL:
SELECT name FROM shipments AS vnob WHERE value > ( SELECT MAX(salary) FROM sales AS cif WHERE cif.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "name", "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_08662
train
v3
Schema: products (alias: nad)(date, name, type, value) projects(name, salary, level, type) Task: Find name from products where salary exceeds the maximum value from projects for the same level. SQL:
SELECT name FROM products AS nad WHERE salary > ( SELECT MAX(value) FROM projects AS uliv WHERE uliv.level = nad.level );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08663
train
v2
Schema: accounts (alias: jac)(id, level, date, type) orders(name, date, salary, value) Task: Retrieve value from accounts that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = jac.type );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "value", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08664
train
v1
Schema: employees (alias: bev)(type, date, amount, salary) categories(code, status, type, id) Task: Select amount from employees where type exists in categories for the same code. SQL:
SELECT amount FROM employees AS bev WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.code = bev.code );
{ "outer_table": "employees", "inner_table": "categories", "outer_alias": "bev", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08665
train
v2
Schema: schedules (alias: vmob)(name, amount, type, status) regions(date, type, salary, status) Task: Retrieve code from schedules that have at least one corresponding entry in regions sharing the same code. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "code", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08666
train
v3
Schema: accounts (alias: jac)(value, salary, status, code) sales(level, code, value, amount) Task: Retrieve name from accounts with salary above the AVG(amount) of sales rows sharing the same code. SQL:
SELECT name FROM accounts AS jac WHERE salary > ( SELECT AVG(amount) FROM sales AS cif WHERE cif.code = jac.code );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08667
train
v1
Schema: projects (alias: uliv)(code, amount, status, level) categories(name, code, date, status) Task: Retrieve name from projects whose code is found in categories rows where status matches the outer record. SQL:
SELECT name FROM projects AS uliv WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.status = uliv.status );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08668
train
v3
Schema: departments (alias: dov)(amount, type, level, salary) employees(id, name, code, status) Task: Find value from departments where amount exceeds the total salary from employees for the same status. SQL:
SELECT value FROM departments AS dov WHERE amount > ( SELECT SUM(salary) FROM employees AS bev WHERE bev.status = dov.status );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08669
train
v2
Schema: shipments (alias: vnob)(amount, status, id, type) schedules(amount, type, date, level) Task: Find code from shipments where a matching record exists in schedules with the same id. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "code", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_08670
train
v1
Schema: accounts (alias: jac)(type, value, salary, code) items(code, level, id, status) Task: Find value from accounts where code appears in items entries with matching status. SQL:
SELECT value FROM accounts AS jac WHERE code IN ( SELECT code FROM items AS ikob WHERE ikob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "value", "filter_col": "code", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08671
train
v1
Schema: branches (alias: agov)(level, code, status, value) sales(date, id, code, amount) Task: Select value from branches where status exists in sales for the same type. SQL:
SELECT value FROM branches AS agov WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.type = agov.type );
{ "outer_table": "branches", "inner_table": "sales", "outer_alias": "agov", "inner_alias": "cif", "proj_col": "value", "filter_col": "status", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08672
train
v2
Schema: invoices (alias: fal)(id, name, type, level) orders(date, name, value, id) Task: Find id from invoices where a matching record exists in orders with the same level. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = fal.level );
{ "outer_table": "invoices", "inner_table": "orders", "outer_alias": "fal", "inner_alias": "kab", "proj_col": "id", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08673
train
v3
Schema: invoices (alias: fal)(date, code, level, id) regions(status, type, amount, salary) Task: Find value from invoices where salary exceeds the count of value from regions for the same status. SQL:
SELECT value FROM invoices AS fal WHERE salary > ( SELECT COUNT(value) FROM regions AS okiv WHERE okiv.status = fal.status );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08674
train
v3
Schema: categories (alias: egiv)(level, code, id, name) employees(code, id, value, name) Task: Retrieve name from categories with salary above the MIN(value) of employees rows sharing the same id. SQL:
SELECT name FROM categories AS egiv WHERE salary > ( SELECT MIN(value) FROM employees AS bev WHERE bev.id = egiv.id );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "egiv", "inner_alias": "bev", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08675
train
v2
Schema: tasks (alias: znob)(status, level, type, id) requests(salary, id, name, value) Task: Find value from tasks where a matching record exists in requests with the same code. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = znob.code );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "value", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08676
train
v3
Schema: accounts (alias: jac)(salary, type, code, level) departments(value, id, type, salary) Task: Retrieve code from accounts with value above the MIN(value) of departments rows sharing the same status. SQL:
SELECT code FROM accounts AS jac WHERE value > ( SELECT MIN(value) FROM departments AS dov WHERE dov.status = jac.status );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08677
train
v2
Schema: schedules (alias: vmob)(status, id, amount, salary) items(type, status, value, salary) Task: Find code from schedules where a matching record exists in items with the same status. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "vmob", "inner_alias": "ikob", "proj_col": "code", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08678
train
v1
Schema: invoices (alias: fal)(status, value, name, code) shipments(level, salary, name, status) Task: Select id from invoices where type exists in shipments for the same level. SQL:
SELECT id FROM invoices AS fal WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.level = fal.level );
{ "outer_table": "invoices", "inner_table": "shipments", "outer_alias": "fal", "inner_alias": "vnob", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08679
train
v2
Schema: managers (alias: hac)(salary, amount, status, date) schedules(id, status, amount, level) Task: Retrieve name from managers that have at least one corresponding entry in schedules sharing the same id. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.id = hac.id );
{ "outer_table": "managers", "inner_table": "schedules", "outer_alias": "hac", "inner_alias": "vmob", "proj_col": "name", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08680
train
v2
Schema: categories (alias: egiv)(type, date, status, value) transactions(amount, value, id, name) Task: Find name from categories where a matching record exists in transactions with the same level. SQL:
SELECT name FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = egiv.level );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "egiv", "inner_alias": "gev", "proj_col": "name", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_08681
train
v3
Schema: sales (alias: cif)(amount, id, salary, status) branches(amount, date, type, salary) Task: Find code from sales where value exceeds the total value from branches for the same type. SQL:
SELECT code FROM sales AS cif WHERE value > ( SELECT SUM(value) FROM branches AS agov WHERE agov.type = cif.type );
{ "outer_table": "sales", "inner_table": "branches", "outer_alias": "cif", "inner_alias": "agov", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08682
train
v2
Schema: tasks (alias: znob)(level, salary, value, type) items(level, date, code, status) Task: Find id from tasks where a matching record exists in items with the same id. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "id", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_08683
train
v1
Schema: branches (alias: agov)(salary, id, code, amount) transactions(name, level, code, date) Task: Retrieve amount from branches whose type is found in transactions rows where code matches the outer record. SQL:
SELECT amount FROM branches AS agov WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.code = agov.code );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08684
train
v2
Schema: requests (alias: ejof)(id, salary, type, level) regions(status, id, salary, amount) Task: Find code from requests where a matching record exists in regions with the same type. SQL:
SELECT code FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = ejof.type );
{ "outer_table": "requests", "inner_table": "regions", "outer_alias": "ejof", "inner_alias": "okiv", "proj_col": "code", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08685
train
v1
Schema: branches (alias: agov)(type, name, level, amount) transactions(code, value, name, status) Task: Select id from branches where code exists in transactions for the same type. SQL:
SELECT id FROM branches AS agov WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.type = agov.type );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_08686
train
v2
Schema: schedules (alias: vmob)(name, code, salary, amount) regions(id, amount, date, value) Task: Find code from schedules where a matching record exists in regions with the same type. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "code", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_08687
train
v2
Schema: sales (alias: cif)(code, level, value, amount) categories(salary, type, level, value) Task: Find salary from sales where a matching record exists in categories with the same type. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = cif.type );
{ "outer_table": "sales", "inner_table": "categories", "outer_alias": "cif", "inner_alias": "egiv", "proj_col": "salary", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08688
train
v1
Schema: projects (alias: uliv)(id, name, date, status) managers(type, amount, level, code) Task: Find value from projects where code appears in managers entries with matching status. SQL:
SELECT value FROM projects AS uliv WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.status = uliv.status );
{ "outer_table": "projects", "inner_table": "managers", "outer_alias": "uliv", "inner_alias": "hac", "proj_col": "value", "filter_col": "code", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08689
train
v3
Schema: projects (alias: uliv)(status, salary, date, name) products(id, value, date, status) Task: Retrieve value from projects with value above the MAX(salary) of products rows sharing the same id. SQL:
SELECT value FROM projects AS uliv WHERE value > ( SELECT MAX(salary) FROM products AS nad WHERE nad.id = uliv.id );
{ "outer_table": "projects", "inner_table": "products", "outer_alias": "uliv", "inner_alias": "nad", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_08690
train
v2
Schema: items (alias: ikob)(code, status, salary, level) sales(salary, date, name, value) Task: Find amount from items where a matching record exists in sales with the same id. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = ikob.id );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "amount", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08691
train
v3
Schema: managers (alias: hac)(date, id, code, value) projects(level, name, type, status) Task: Retrieve name from managers with value above the AVG(value) of projects rows sharing the same level. SQL:
SELECT name FROM managers AS hac WHERE value > ( SELECT AVG(value) FROM projects AS uliv WHERE uliv.level = hac.level );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "hac", "inner_alias": "uliv", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08692
train
v1
Schema: employees (alias: bev)(value, name, level, status) sales(level, salary, id, date) Task: Find amount from employees where id appears in sales entries with matching status. SQL:
SELECT amount FROM employees AS bev WHERE id IN ( SELECT id FROM sales AS cif WHERE cif.status = bev.status );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08693
train
v2
Schema: employees (alias: bev)(level, salary, amount, id) branches(code, value, level, salary) Task: Find salary from employees where a matching record exists in branches with the same status. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = bev.status );
{ "outer_table": "employees", "inner_table": "branches", "outer_alias": "bev", "inner_alias": "agov", "proj_col": "salary", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08694
train
v1
Schema: orders (alias: kab)(code, salary, level, type) staff(level, type, name, salary) Task: Retrieve id from orders whose status is found in staff rows where id matches the outer record. SQL:
SELECT id FROM orders AS kab WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.id = kab.id );
{ "outer_table": "orders", "inner_table": "staff", "outer_alias": "kab", "inner_alias": "xnob", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08695
train
v1
Schema: employees (alias: bev)(level, value, amount, id) transactions(date, salary, name, type) Task: Select code from employees where id exists in transactions for the same level. SQL:
SELECT code FROM employees AS bev WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.level = bev.level );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "bev", "inner_alias": "gev", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_08696
train
v2
Schema: items (alias: ikob)(salary, id, date, name) categories(id, name, value, amount) Task: Find value from items where a matching record exists in categories with the same status. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = ikob.status );
{ "outer_table": "items", "inner_table": "categories", "outer_alias": "ikob", "inner_alias": "egiv", "proj_col": "value", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08697
train
v3
Schema: items (alias: ikob)(id, value, date, type) employees(status, name, level, type) Task: Find salary from items where salary exceeds the maximum amount from employees for the same id. SQL:
SELECT salary FROM items AS ikob WHERE salary > ( SELECT MAX(amount) FROM employees AS bev WHERE bev.id = ikob.id );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_08698
train
v2
Schema: requests (alias: ejof)(name, value, status, amount) schedules(value, date, salary, level) Task: Retrieve amount from requests that have at least one corresponding entry in schedules sharing the same code. SQL:
SELECT amount FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "schedules", "outer_alias": "ejof", "inner_alias": "vmob", "proj_col": "amount", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_08699
train