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: tasks (alias: znob)(id, status, level, date) products(date, type, salary, level) Task: Retrieve value from tasks that have at least one corresponding entry in products sharing the same code. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = znob.code );
{ "outer_table": "tasks", "inner_table": "products", "outer_alias": "znob", "inner_alias": "nad", "proj_col": "value", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07400
train
v2
Schema: schedules (alias: vmob)(amount, level, value, id) staff(id, level, type, code) Task: Retrieve value from schedules that have at least one corresponding entry in staff sharing the same level. SQL:
SELECT value FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "value", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07401
train
v3
Schema: staff (alias: xnob)(amount, level, status, salary) departments(id, type, name, salary) Task: Find name from staff where value exceeds the total salary from departments for the same code. SQL:
SELECT name FROM staff AS xnob WHERE value > ( SELECT SUM(salary) FROM departments AS dov WHERE dov.code = xnob.code );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07402
train
v3
Schema: sales (alias: cif)(salary, amount, level, status) employees(value, code, date, id) Task: Find amount from sales where amount exceeds the minimum amount from employees for the same code. SQL:
SELECT amount FROM sales AS cif WHERE amount > ( SELECT MIN(amount) FROM employees AS bev WHERE bev.code = cif.code );
{ "outer_table": "sales", "inner_table": "employees", "outer_alias": "cif", "inner_alias": "bev", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07403
train
v3
Schema: customers (alias: lex)(status, code, name, level) regions(date, level, name, salary) Task: Find id from customers where amount exceeds the total salary from regions for the same status. SQL:
SELECT id FROM customers AS lex WHERE amount > ( SELECT SUM(salary) FROM regions AS okiv WHERE okiv.status = lex.status );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07404
train
v1
Schema: managers (alias: hac)(id, type, amount, name) branches(salary, amount, value, date) Task: Retrieve value from managers whose type is found in branches rows where status matches the outer record. SQL:
SELECT value FROM managers AS hac WHERE type IN ( SELECT type FROM branches AS agov WHERE agov.status = hac.status );
{ "outer_table": "managers", "inner_table": "branches", "outer_alias": "hac", "inner_alias": "agov", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07405
train
v3
Schema: shipments (alias: vnob)(status, id, date, type) managers(date, level, status, code) Task: Retrieve code from shipments with amount above the AVG(amount) of managers rows sharing the same id. SQL:
SELECT code FROM shipments AS vnob WHERE amount > ( SELECT AVG(amount) FROM managers AS hac WHERE hac.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07406
train
v2
Schema: customers (alias: lex)(value, date, type, amount) staff(salary, status, date, level) Task: Retrieve amount from customers that have at least one corresponding entry in staff sharing the same status. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = lex.status );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "amount", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07407
train
v2
Schema: accounts (alias: jac)(status, id, date, level) staff(name, level, id, date) Task: Find id from accounts where a matching record exists in staff with the same id. SQL:
SELECT id FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = jac.id );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "jac", "inner_alias": "xnob", "proj_col": "id", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07408
train
v2
Schema: products (alias: nad)(name, date, value, status) projects(name, salary, status, amount) Task: Retrieve value from products that have at least one corresponding entry in projects sharing the same id. SQL:
SELECT value FROM products AS nad WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.id = nad.id );
{ "outer_table": "products", "inner_table": "projects", "outer_alias": "nad", "inner_alias": "uliv", "proj_col": "value", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07409
train
v2
Schema: customers (alias: lex)(level, date, code, value) shipments(id, value, type, salary) Task: Retrieve amount from customers that have at least one corresponding entry in shipments sharing the same id. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = lex.id );
{ "outer_table": "customers", "inner_table": "shipments", "outer_alias": "lex", "inner_alias": "vnob", "proj_col": "amount", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07410
train
v3
Schema: shipments (alias: vnob)(amount, value, type, code) items(type, amount, value, id) Task: Retrieve name from shipments with amount above the SUM(amount) of items rows sharing the same code. SQL:
SELECT name FROM shipments AS vnob WHERE amount > ( SELECT SUM(amount) 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": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07411
train
v2
Schema: staff (alias: xnob)(salary, level, type, date) departments(status, amount, type, id) Task: Find code from staff where a matching record exists in departments with the same code. SQL:
SELECT code FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = xnob.code );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "code", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07412
train
v1
Schema: branches (alias: agov)(salary, date, status, value) customers(salary, status, level, type) Task: Find name from branches where type appears in customers entries with matching id. SQL:
SELECT name FROM branches AS agov WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.id = agov.id );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "name", "filter_col": "type", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07413
train
v2
Schema: sales (alias: cif)(type, name, code, id) branches(date, amount, id, level) Task: Find salary from sales where a matching record exists in branches with the same id. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = cif.id );
{ "outer_table": "sales", "inner_table": "branches", "outer_alias": "cif", "inner_alias": "agov", "proj_col": "salary", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07414
train
v3
Schema: tasks (alias: znob)(level, code, value, salary) branches(salary, amount, level, id) Task: Find id from tasks where salary exceeds the count of salary from branches for the same type. SQL:
SELECT id FROM tasks AS znob WHERE salary > ( SELECT COUNT(salary) FROM branches AS agov WHERE agov.type = znob.type );
{ "outer_table": "tasks", "inner_table": "branches", "outer_alias": "znob", "inner_alias": "agov", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07415
train
v2
Schema: transactions (alias: gev)(code, salary, status, level) staff(date, amount, salary, type) Task: Retrieve value from transactions that have at least one corresponding entry in staff sharing the same status. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = gev.status );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "value", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07416
train
v2
Schema: staff (alias: xnob)(id, salary, date, value) departments(date, status, value, salary) Task: Find value from staff where a matching record exists in departments with the same level. SQL:
SELECT value FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = xnob.level );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "value", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07417
train
v3
Schema: shipments (alias: vnob)(level, type, value, status) departments(value, name, id, status) Task: Find salary from shipments where value exceeds the minimum amount from departments for the same code. SQL:
SELECT salary FROM shipments AS vnob WHERE value > ( SELECT MIN(amount) FROM departments AS dov WHERE dov.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07418
train
v1
Schema: staff (alias: xnob)(code, type, status, date) products(value, date, type, amount) Task: Select id from staff where status exists in products for the same status. SQL:
SELECT id FROM staff AS xnob WHERE status IN ( SELECT status FROM products AS nad WHERE nad.status = xnob.status );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07419
train
v1
Schema: transactions (alias: gev)(code, status, value, level) employees(value, code, id, date) Task: Find name from transactions where level appears in employees entries with matching level. SQL:
SELECT name FROM transactions AS gev WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.level = gev.level );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "gev", "inner_alias": "bev", "proj_col": "name", "filter_col": "level", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07420
train
v3
Schema: requests (alias: ejof)(type, amount, value, salary) schedules(id, date, code, type) Task: Find amount from requests where salary exceeds the count of value from schedules for the same type. SQL:
SELECT amount FROM requests AS ejof WHERE salary > ( SELECT COUNT(value) FROM schedules AS vmob WHERE vmob.type = ejof.type );
{ "outer_table": "requests", "inner_table": "schedules", "outer_alias": "ejof", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07421
train
v1
Schema: requests (alias: ejof)(status, name, id, date) projects(value, code, level, name) Task: Find name from requests where code appears in projects entries with matching status. SQL:
SELECT name FROM requests AS ejof WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.status = ejof.status );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07422
train
v1
Schema: accounts (alias: jac)(level, date, amount, type) invoices(type, salary, level, code) Task: Retrieve id from accounts whose id is found in invoices rows where id matches the outer record. SQL:
SELECT id FROM accounts AS jac WHERE id IN ( SELECT id FROM invoices AS fal WHERE fal.id = jac.id );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "id", "filter_col": "id", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07423
train
v2
Schema: sales (alias: cif)(value, id, type, level) products(code, value, amount, id) Task: Retrieve code from sales that have at least one corresponding entry in products sharing the same id. SQL:
SELECT code FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.id = cif.id );
{ "outer_table": "sales", "inner_table": "products", "outer_alias": "cif", "inner_alias": "nad", "proj_col": "code", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07424
train
v2
Schema: customers (alias: lex)(amount, level, code, id) sales(status, date, code, value) Task: Find id from customers where a matching record exists in sales with the same level. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = lex.level );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "id", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07425
train
v3
Schema: categories (alias: egiv)(status, date, salary, type) accounts(date, status, name, id) Task: Find id from categories where amount exceeds the total value from accounts for the same id. SQL:
SELECT id FROM categories AS egiv WHERE amount > ( SELECT SUM(value) FROM accounts AS jac WHERE jac.id = egiv.id );
{ "outer_table": "categories", "inner_table": "accounts", "outer_alias": "egiv", "inner_alias": "jac", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07426
train
v2
Schema: employees (alias: bev)(id, date, code, salary) branches(status, value, amount, name) Task: Retrieve salary from employees that have at least one corresponding entry in branches sharing the same type. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.type = bev.type );
{ "outer_table": "employees", "inner_table": "branches", "outer_alias": "bev", "inner_alias": "agov", "proj_col": "salary", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07427
train
v2
Schema: items (alias: ikob)(id, name, level, status) categories(type, salary, amount, value) Task: Find code from items where a matching record exists in categories with the same level. SQL:
SELECT code FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = ikob.level );
{ "outer_table": "items", "inner_table": "categories", "outer_alias": "ikob", "inner_alias": "egiv", "proj_col": "code", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07428
train
v3
Schema: items (alias: ikob)(id, value, name, amount) invoices(status, id, level, code) Task: Find salary from items where value exceeds the total value from invoices for the same type. SQL:
SELECT salary FROM items AS ikob WHERE value > ( SELECT SUM(value) FROM invoices AS fal WHERE fal.type = ikob.type );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07429
train
v2
Schema: customers (alias: lex)(date, status, type, amount) managers(name, id, type, date) Task: Retrieve id from customers that have at least one corresponding entry in managers sharing the same status. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = lex.status );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "id", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07430
train
v2
Schema: schedules (alias: vmob)(value, salary, name, status) projects(value, level, amount, id) Task: Retrieve salary from schedules that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "salary", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07431
train
v3
Schema: customers (alias: lex)(level, amount, value, name) projects(salary, id, level, type) Task: Retrieve code from customers with value above the COUNT(salary) of projects rows sharing the same code. SQL:
SELECT code FROM customers AS lex WHERE value > ( SELECT COUNT(salary) FROM projects AS uliv WHERE uliv.code = lex.code );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07432
train
v3
Schema: tasks (alias: znob)(value, status, type, id) regions(date, name, salary, amount) Task: Retrieve amount from tasks with amount above the MAX(salary) of regions rows sharing the same status. SQL:
SELECT amount FROM tasks AS znob WHERE amount > ( SELECT MAX(salary) FROM regions AS okiv WHERE okiv.status = znob.status );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07433
train
v3
Schema: items (alias: ikob)(date, code, name, status) shipments(type, id, code, status) Task: Find salary from items where value exceeds the count of salary from shipments for the same code. SQL:
SELECT salary FROM items AS ikob WHERE value > ( SELECT COUNT(salary) FROM shipments AS vnob WHERE vnob.code = ikob.code );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07434
train
v2
Schema: sales (alias: cif)(status, type, id, date) accounts(amount, id, type, date) Task: Retrieve salary from sales that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = cif.code );
{ "outer_table": "sales", "inner_table": "accounts", "outer_alias": "cif", "inner_alias": "jac", "proj_col": "salary", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07435
train
v1
Schema: employees (alias: bev)(salary, level, code, value) accounts(type, name, date, salary) Task: Find code from employees where code appears in accounts entries with matching id. SQL:
SELECT code FROM employees AS bev WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.id = bev.id );
{ "outer_table": "employees", "inner_table": "accounts", "outer_alias": "bev", "inner_alias": "jac", "proj_col": "code", "filter_col": "code", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07436
train
v3
Schema: products (alias: nad)(amount, value, name, date) items(type, name, id, value) Task: Retrieve salary from products with salary above the AVG(value) of items rows sharing the same type. SQL:
SELECT salary FROM products AS nad WHERE salary > ( SELECT AVG(value) FROM items AS ikob WHERE ikob.type = nad.type );
{ "outer_table": "products", "inner_table": "items", "outer_alias": "nad", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07437
train
v1
Schema: regions (alias: okiv)(level, id, status, salary) items(date, name, type, id) Task: Retrieve salary from regions whose type is found in items rows where id matches the outer record. SQL:
SELECT salary FROM regions AS okiv WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.id = okiv.id );
{ "outer_table": "regions", "inner_table": "items", "outer_alias": "okiv", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "type", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07438
train
v2
Schema: transactions (alias: gev)(status, amount, name, date) employees(amount, status, id, value) Task: Retrieve code from transactions that have at least one corresponding entry in employees sharing the same id. SQL:
SELECT code FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = gev.id );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "gev", "inner_alias": "bev", "proj_col": "code", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07439
train
v3
Schema: customers (alias: lex)(amount, id, value, type) tasks(level, code, amount, value) Task: Retrieve name from customers with value above the SUM(amount) of tasks rows sharing the same type. SQL:
SELECT name FROM customers AS lex WHERE value > ( SELECT SUM(amount) FROM tasks AS znob WHERE znob.type = lex.type );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07440
train
v1
Schema: transactions (alias: gev)(type, value, status, salary) staff(salary, value, date, level) Task: Retrieve salary from transactions whose status is found in staff rows where id matches the outer record. SQL:
SELECT salary FROM transactions AS gev WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "status", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07441
train
v2
Schema: employees (alias: bev)(date, salary, name, status) departments(type, id, code, amount) Task: Retrieve id from employees that have at least one corresponding entry in departments sharing the same status. SQL:
SELECT id FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = bev.status );
{ "outer_table": "employees", "inner_table": "departments", "outer_alias": "bev", "inner_alias": "dov", "proj_col": "id", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07442
train
v3
Schema: invoices (alias: fal)(id, date, salary, type) orders(salary, amount, level, status) Task: Find amount from invoices where amount exceeds the maximum salary from orders for the same status. SQL:
SELECT amount FROM invoices AS fal WHERE amount > ( SELECT MAX(salary) FROM orders AS kab WHERE kab.status = fal.status );
{ "outer_table": "invoices", "inner_table": "orders", "outer_alias": "fal", "inner_alias": "kab", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07443
train
v3
Schema: schedules (alias: vmob)(type, level, date, amount) staff(name, level, id, type) Task: Find salary from schedules where salary exceeds the minimum salary from staff for the same status. SQL:
SELECT salary FROM schedules AS vmob WHERE salary > ( SELECT MIN(salary) FROM staff AS xnob WHERE xnob.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07444
train
v1
Schema: projects (alias: uliv)(value, code, level, date) shipments(salary, code, value, date) Task: Find code from projects where type appears in shipments entries with matching status. SQL:
SELECT code FROM projects AS uliv WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.status = uliv.status );
{ "outer_table": "projects", "inner_table": "shipments", "outer_alias": "uliv", "inner_alias": "vnob", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07445
train
v2
Schema: items (alias: ikob)(type, name, value, code) regions(code, type, status, salary) Task: Find code from items where a matching record exists in regions with the same id. SQL:
SELECT code FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = ikob.id );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "code", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07446
train
v3
Schema: items (alias: ikob)(amount, value, type, level) employees(date, level, status, name) Task: Retrieve code from items with salary above the SUM(amount) of employees rows sharing the same status. SQL:
SELECT code FROM items AS ikob WHERE salary > ( SELECT SUM(amount) FROM employees AS bev WHERE bev.status = ikob.status );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07447
train
v2
Schema: shipments (alias: vnob)(status, value, code, level) managers(value, type, code, status) Task: Retrieve value from shipments that have at least one corresponding entry in managers sharing the same type. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "value", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07448
train
v2
Schema: items (alias: ikob)(value, level, name, amount) staff(amount, level, date, id) Task: Find salary from items where a matching record exists in staff with the same id. SQL:
SELECT salary FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = ikob.id );
{ "outer_table": "items", "inner_table": "staff", "outer_alias": "ikob", "inner_alias": "xnob", "proj_col": "salary", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07449
train
v1
Schema: staff (alias: xnob)(value, salary, name, status) sales(level, id, amount, salary) Task: Retrieve code from staff whose level is found in sales rows where code matches the outer record. SQL:
SELECT code FROM staff AS xnob WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.code = xnob.code );
{ "outer_table": "staff", "inner_table": "sales", "outer_alias": "xnob", "inner_alias": "cif", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07450
train
v1
Schema: items (alias: ikob)(name, status, code, type) sales(date, id, salary, status) Task: Find amount from items where status appears in sales entries with matching level. SQL:
SELECT amount FROM items AS ikob WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.level = ikob.level );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07451
train
v1
Schema: regions (alias: okiv)(value, amount, status, name) shipments(id, name, value, amount) Task: Select salary from regions where type exists in shipments for the same level. SQL:
SELECT salary FROM regions AS okiv WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "shipments", "outer_alias": "okiv", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "type", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07452
train
v2
Schema: branches (alias: agov)(id, value, salary, level) schedules(type, level, code, date) Task: Find id from branches where a matching record exists in schedules with the same code. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = agov.code );
{ "outer_table": "branches", "inner_table": "schedules", "outer_alias": "agov", "inner_alias": "vmob", "proj_col": "id", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07453
train
v1
Schema: orders (alias: kab)(salary, name, date, status) employees(type, status, date, level) Task: Retrieve id from orders whose status is found in employees rows where id matches the outer record. SQL:
SELECT id FROM orders AS kab WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.id = kab.id );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07454
train
v1
Schema: staff (alias: xnob)(date, type, id, code) customers(level, value, salary, amount) Task: Find value from staff where code appears in customers entries with matching code. SQL:
SELECT value FROM staff AS xnob WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.code = xnob.code );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "value", "filter_col": "code", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07455
train
v2
Schema: orders (alias: kab)(status, level, value, salary) tasks(id, amount, status, value) Task: Retrieve amount from orders that have at least one corresponding entry in tasks sharing the same level. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.level = kab.level );
{ "outer_table": "orders", "inner_table": "tasks", "outer_alias": "kab", "inner_alias": "znob", "proj_col": "amount", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07456
train
v2
Schema: schedules (alias: vmob)(type, salary, status, level) categories(salary, status, date, name) Task: Retrieve salary from schedules that have at least one corresponding entry in categories sharing the same type. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "salary", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07457
train
v1
Schema: departments (alias: dov)(salary, date, value, type) sales(salary, type, value, level) Task: Retrieve id from departments whose level is found in sales rows where code matches the outer record. SQL:
SELECT id FROM departments AS dov WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.code = dov.code );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07458
train
v2
Schema: tasks (alias: znob)(date, id, name, salary) managers(value, status, type, date) Task: Find name from tasks where a matching record exists in managers with the same code. SQL:
SELECT name FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = znob.code );
{ "outer_table": "tasks", "inner_table": "managers", "outer_alias": "znob", "inner_alias": "hac", "proj_col": "name", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07459
train
v3
Schema: customers (alias: lex)(status, salary, name, level) schedules(date, level, amount, value) Task: Retrieve amount from customers with value above the MAX(salary) of schedules rows sharing the same level. SQL:
SELECT amount FROM customers AS lex WHERE value > ( SELECT MAX(salary) FROM schedules AS vmob WHERE vmob.level = lex.level );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07460
train
v2
Schema: products (alias: nad)(code, salary, name, date) departments(level, amount, value, date) Task: Find id from products where a matching record exists in departments with the same code. SQL:
SELECT id FROM products AS nad WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.code = nad.code );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "id", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07461
train
v2
Schema: products (alias: nad)(date, level, type, id) orders(salary, code, level, amount) Task: Find amount from products where a matching record exists in orders with the same status. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = nad.status );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "nad", "inner_alias": "kab", "proj_col": "amount", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07462
train
v3
Schema: categories (alias: egiv)(status, value, name, date) customers(value, date, amount, status) Task: Retrieve id from categories with amount above the AVG(value) of customers rows sharing the same level. SQL:
SELECT id FROM categories AS egiv WHERE amount > ( SELECT AVG(value) FROM customers AS lex WHERE lex.level = egiv.level );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07463
train
v2
Schema: employees (alias: bev)(salary, code, id, value) invoices(salary, amount, name, type) Task: Retrieve amount from employees that have at least one corresponding entry in invoices sharing the same type. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.type = bev.type );
{ "outer_table": "employees", "inner_table": "invoices", "outer_alias": "bev", "inner_alias": "fal", "proj_col": "amount", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07464
train
v3
Schema: categories (alias: egiv)(value, name, status, level) schedules(level, value, status, type) Task: Find salary from categories where value exceeds the total value from schedules for the same code. SQL:
SELECT salary FROM categories AS egiv WHERE value > ( SELECT SUM(value) FROM schedules AS vmob WHERE vmob.code = egiv.code );
{ "outer_table": "categories", "inner_table": "schedules", "outer_alias": "egiv", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07465
train
v3
Schema: projects (alias: uliv)(salary, code, status, level) schedules(name, id, value, code) Task: Find salary from projects where value exceeds the maximum salary from schedules for the same status. SQL:
SELECT salary FROM projects AS uliv WHERE value > ( SELECT MAX(salary) FROM schedules AS vmob WHERE vmob.status = uliv.status );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07466
train
v2
Schema: transactions (alias: gev)(code, type, status, name) requests(salary, type, amount, level) Task: Find name from transactions where a matching record exists in requests with the same id. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = gev.id );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "name", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07467
train
v2
Schema: projects (alias: uliv)(date, level, name, salary) accounts(level, amount, date, name) Task: Find id from projects where a matching record exists in accounts with the same type. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = uliv.type );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "id", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07468
train
v2
Schema: accounts (alias: jac)(name, type, date, amount) products(id, type, level, salary) Task: Find id from accounts where a matching record exists in products with the same id. SQL:
SELECT id FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.id = jac.id );
{ "outer_table": "accounts", "inner_table": "products", "outer_alias": "jac", "inner_alias": "nad", "proj_col": "id", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07469
train
v3
Schema: categories (alias: egiv)(id, type, salary, level) transactions(id, type, date, value) Task: Retrieve code from categories with salary above the SUM(amount) of transactions rows sharing the same type. SQL:
SELECT code FROM categories AS egiv WHERE salary > ( SELECT SUM(amount) FROM transactions AS gev WHERE gev.type = egiv.type );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "egiv", "inner_alias": "gev", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07470
train
v1
Schema: items (alias: ikob)(date, code, salary, amount) projects(salary, value, level, type) Task: Find salary from items where type appears in projects entries with matching code. SQL:
SELECT salary FROM items AS ikob WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.code = ikob.code );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "type", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07471
train
v2
Schema: staff (alias: xnob)(code, date, salary, value) categories(date, name, salary, code) Task: Retrieve amount from staff that have at least one corresponding entry in categories sharing the same status. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.status = xnob.status );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "amount", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07472
train
v2
Schema: tasks (alias: znob)(name, value, code, level) projects(level, salary, id, value) Task: Retrieve id from tasks that have at least one corresponding entry in projects sharing the same code. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = znob.code );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "id", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07473
train
v3
Schema: staff (alias: xnob)(status, date, salary, id) regions(id, name, status, amount) Task: Retrieve salary from staff with amount above the MIN(amount) of regions rows sharing the same type. SQL:
SELECT salary FROM staff AS xnob WHERE amount > ( SELECT MIN(amount) FROM regions AS okiv WHERE okiv.type = xnob.type );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07474
train
v3
Schema: products (alias: nad)(status, name, code, value) requests(id, salary, type, status) Task: Find value from products where salary exceeds the minimum amount from requests for the same id. SQL:
SELECT value FROM products AS nad WHERE salary > ( SELECT MIN(amount) FROM requests AS ejof WHERE ejof.id = nad.id );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07475
train
v1
Schema: schedules (alias: vmob)(name, id, date, amount) sales(amount, type, value, date) Task: Retrieve salary from schedules whose status is found in sales rows where level matches the outer record. SQL:
SELECT salary FROM schedules AS vmob WHERE status IN ( SELECT status FROM sales AS cif WHERE cif.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "vmob", "inner_alias": "cif", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07476
train
v3
Schema: employees (alias: bev)(code, salary, type, amount) transactions(type, name, level, status) Task: Find amount from employees where amount exceeds the maximum amount from transactions for the same code. SQL:
SELECT amount FROM employees AS bev WHERE amount > ( SELECT MAX(amount) FROM transactions AS gev WHERE gev.code = bev.code );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "bev", "inner_alias": "gev", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07477
train
v1
Schema: tasks (alias: znob)(id, date, name, type) transactions(level, salary, status, id) Task: Retrieve name from tasks whose level is found in transactions rows where status matches the outer record. SQL:
SELECT name FROM tasks AS znob WHERE level IN ( SELECT level FROM transactions AS gev WHERE gev.status = znob.status );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07478
train
v1
Schema: schedules (alias: vmob)(type, code, level, id) staff(code, salary, date, value) Task: Retrieve name from schedules whose type is found in staff rows where status matches the outer record. SQL:
SELECT name FROM schedules AS vmob WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "name", "filter_col": "type", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07479
train
v2
Schema: sales (alias: cif)(code, level, type, salary) tasks(type, salary, id, amount) Task: Retrieve id from sales that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT id FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = cif.id );
{ "outer_table": "sales", "inner_table": "tasks", "outer_alias": "cif", "inner_alias": "znob", "proj_col": "id", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07480
train
v2
Schema: projects (alias: uliv)(amount, type, salary, id) categories(status, date, amount, id) Task: Retrieve value from projects that have at least one corresponding entry in categories sharing the same status. SQL:
SELECT value 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": "value", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07481
train
v2
Schema: customers (alias: lex)(id, name, status, type) shipments(status, salary, name, level) Task: Retrieve salary from customers that have at least one corresponding entry in shipments sharing the same type. SQL:
SELECT salary FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = lex.type );
{ "outer_table": "customers", "inner_table": "shipments", "outer_alias": "lex", "inner_alias": "vnob", "proj_col": "salary", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07482
train
v2
Schema: managers (alias: hac)(level, status, code, amount) items(id, amount, status, date) Task: Find code from managers where a matching record exists in items with the same type. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = hac.type );
{ "outer_table": "managers", "inner_table": "items", "outer_alias": "hac", "inner_alias": "ikob", "proj_col": "code", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07483
train
v1
Schema: tasks (alias: znob)(level, code, amount, name) schedules(code, salary, date, name) Task: Select id from tasks where status exists in schedules for the same code. SQL:
SELECT id FROM tasks AS znob WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.code = znob.code );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07484
train
v3
Schema: orders (alias: kab)(amount, name, id, code) items(level, status, id, salary) Task: Find code from orders where salary exceeds the count of salary from items for the same code. SQL:
SELECT code FROM orders AS kab WHERE salary > ( SELECT COUNT(salary) FROM items AS ikob WHERE ikob.code = kab.code );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "kab", "inner_alias": "ikob", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07485
train
v1
Schema: managers (alias: hac)(date, amount, status, code) staff(id, salary, status, date) Task: Find value from managers where type appears in staff entries with matching status. SQL:
SELECT value FROM managers AS hac WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.status = hac.status );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "hac", "inner_alias": "xnob", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07486
train
v2
Schema: branches (alias: agov)(name, level, date, type) transactions(level, value, amount, status) Task: Retrieve id from branches that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = agov.code );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "id", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07487
train
v3
Schema: products (alias: nad)(date, status, code, level) departments(salary, date, id, type) Task: Find value from products where amount exceeds the maximum salary from departments for the same level. SQL:
SELECT value FROM products AS nad WHERE amount > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.level = nad.level );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07488
train
v1
Schema: staff (alias: xnob)(id, amount, date, level) departments(status, amount, date, salary) Task: Retrieve name from staff whose status is found in departments rows where status matches the outer record. SQL:
SELECT name FROM staff AS xnob WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.status = xnob.status );
{ "outer_table": "staff", "inner_table": "departments", "outer_alias": "xnob", "inner_alias": "dov", "proj_col": "name", "filter_col": "status", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07489
train
v2
Schema: accounts (alias: jac)(status, level, salary, code) regions(salary, status, value, amount) Task: Retrieve code from accounts that have at least one corresponding entry in regions sharing the same id. SQL:
SELECT code FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = jac.id );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "code", "join_col": "id", "correlated_ref": "jac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07490
train
v2
Schema: items (alias: ikob)(name, level, status, date) invoices(amount, date, status, type) Task: Retrieve amount from items that have at least one corresponding entry in invoices sharing the same id. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = ikob.id );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "amount", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07491
train
v1
Schema: sales (alias: cif)(id, salary, code, name) categories(value, salary, date, id) Task: Select code from sales where type exists in categories for the same id. SQL:
SELECT code FROM sales AS cif WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.id = cif.id );
{ "outer_table": "sales", "inner_table": "categories", "outer_alias": "cif", "inner_alias": "egiv", "proj_col": "code", "filter_col": "type", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07492
train
v1
Schema: requests (alias: ejof)(type, date, value, amount) tasks(status, code, value, salary) Task: Retrieve name from requests whose type is found in tasks rows where code matches the outer record. SQL:
SELECT name FROM requests AS ejof WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07493
train
v2
Schema: orders (alias: kab)(value, level, code, amount) regions(amount, status, code, type) Task: Retrieve amount from orders that have at least one corresponding entry in regions sharing the same level. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = kab.level );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "kab", "inner_alias": "okiv", "proj_col": "amount", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07494
train
v3
Schema: employees (alias: bev)(value, type, date, level) transactions(amount, id, value, type) Task: Find code from employees where amount exceeds the count of amount from transactions for the same type. SQL:
SELECT code FROM employees AS bev WHERE amount > ( SELECT COUNT(amount) FROM transactions AS gev WHERE gev.type = bev.type );
{ "outer_table": "employees", "inner_table": "transactions", "outer_alias": "bev", "inner_alias": "gev", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07495
train
v1
Schema: invoices (alias: fal)(name, type, status, value) categories(value, name, type, date) Task: Select value from invoices where id exists in categories for the same code. SQL:
SELECT value FROM invoices AS fal WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.code = fal.code );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "value", "filter_col": "id", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07496
train
v1
Schema: schedules (alias: vmob)(type, name, value, salary) requests(amount, date, level, code) Task: Retrieve id from schedules whose status is found in requests rows where code matches the outer record. SQL:
SELECT id FROM schedules AS vmob WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "requests", "outer_alias": "vmob", "inner_alias": "ejof", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07497
train
v3
Schema: shipments (alias: vnob)(value, status, code, name) tasks(amount, salary, name, date) Task: Find salary from shipments where value exceeds the maximum amount from tasks for the same code. SQL:
SELECT salary FROM shipments AS vnob WHERE value > ( SELECT MAX(amount) FROM tasks AS znob WHERE znob.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "tasks", "outer_alias": "vnob", "inner_alias": "znob", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07498
train
v1
Schema: branches (alias: agov)(salary, type, date, id) staff(level, value, amount, id) Task: Select amount from branches where level exists in staff for the same status. SQL:
SELECT amount FROM branches AS agov WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.status = agov.status );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07499
train