variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v1
Schema: regions (alias: okiv)(id, code, type, value) schedules(amount, code, id, level) Task: Retrieve value from regions whose status is found in schedules rows where level matches the outer record. SQL:
SELECT value FROM regions AS okiv WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.level = okiv.level );
{ "outer_table": "regions", "inner_table": "schedules", "outer_alias": "okiv", "inner_alias": "vmob", "proj_col": "value", "filter_col": "status", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06300
train
v1
Schema: employees (alias: bev)(value, status, code, type) projects(id, value, salary, name) Task: Retrieve value from employees whose id is found in projects rows where status matches the outer record. SQL:
SELECT value FROM employees AS bev WHERE id IN ( SELECT id FROM projects AS uliv WHERE uliv.status = bev.status );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "value", "filter_col": "id", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06301
train
v3
Schema: shipments (alias: vnob)(date, name, status, salary) staff(salary, value, type, status) Task: Find id from shipments where salary exceeds the minimum salary from staff for the same status. SQL:
SELECT id FROM shipments AS vnob WHERE salary > ( SELECT MIN(salary) FROM staff AS xnob WHERE xnob.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "staff", "outer_alias": "vnob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06302
train
v1
Schema: employees (alias: bev)(code, salary, type, level) departments(amount, level, status, code) Task: Find name from employees where code appears in departments entries with matching id. SQL:
SELECT name FROM employees AS bev WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.id = bev.id );
{ "outer_table": "employees", "inner_table": "departments", "outer_alias": "bev", "inner_alias": "dov", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06303
train
v2
Schema: customers (alias: lex)(code, amount, date, id) products(code, id, salary, type) Task: Find amount from customers where a matching record exists in products with the same type. SQL:
SELECT amount FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = lex.type );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "amount", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06304
train
v2
Schema: sales (alias: cif)(type, name, salary, id) shipments(value, id, type, code) Task: Find amount from sales where a matching record exists in shipments with the same code. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.code = cif.code );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "amount", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06305
train
v1
Schema: sales (alias: cif)(salary, code, status, name) accounts(status, salary, name, code) Task: Select value from sales where status exists in accounts for the same id. SQL:
SELECT value FROM sales AS cif WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.id = cif.id );
{ "outer_table": "sales", "inner_table": "accounts", "outer_alias": "cif", "inner_alias": "jac", "proj_col": "value", "filter_col": "status", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06306
train
v2
Schema: items (alias: ikob)(date, salary, value, name) sales(status, value, date, level) Task: Find value from items where a matching record exists in sales with the same type. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = ikob.type );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "value", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06307
train
v1
Schema: regions (alias: okiv)(status, level, salary, amount) projects(amount, status, salary, type) Task: Select code from regions where id exists in projects for the same code. SQL:
SELECT code FROM regions AS okiv WHERE id IN ( SELECT id FROM projects AS uliv WHERE uliv.code = okiv.code );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "code", "filter_col": "id", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06308
train
v2
Schema: transactions (alias: gev)(salary, amount, level, type) schedules(date, level, name, code) Task: Find salary from transactions where a matching record exists in schedules with the same code. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = gev.code );
{ "outer_table": "transactions", "inner_table": "schedules", "outer_alias": "gev", "inner_alias": "vmob", "proj_col": "salary", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06309
train
v2
Schema: requests (alias: ejof)(name, amount, date, value) tasks(type, status, level, amount) Task: Retrieve amount from requests that have at least one corresponding entry in tasks sharing the same type. SQL:
SELECT amount FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = ejof.type );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "amount", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06310
train
v1
Schema: employees (alias: bev)(id, type, code, amount) branches(type, level, name, status) Task: Find code from employees where code appears in branches entries with matching type. SQL:
SELECT code FROM employees AS bev WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.type = bev.type );
{ "outer_table": "employees", "inner_table": "branches", "outer_alias": "bev", "inner_alias": "agov", "proj_col": "code", "filter_col": "code", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06311
train
v1
Schema: products (alias: nad)(code, date, id, value) customers(name, date, value, salary) Task: Retrieve name from products whose code is found in customers rows where type matches the outer record. SQL:
SELECT name FROM products AS nad WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.type = nad.type );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "name", "filter_col": "code", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06312
train
v3
Schema: items (alias: ikob)(id, name, status, date) orders(status, salary, date, type) Task: Find salary from items where amount exceeds the maximum value from orders for the same id. SQL:
SELECT salary FROM items AS ikob WHERE amount > ( SELECT MAX(value) FROM orders AS kab WHERE kab.id = ikob.id );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06313
train
v1
Schema: managers (alias: hac)(value, status, id, date) transactions(name, status, amount, value) Task: Find code from managers where type appears in transactions entries with matching type. SQL:
SELECT code FROM managers AS hac WHERE type IN ( SELECT type FROM transactions AS gev WHERE gev.type = hac.type );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "code", "filter_col": "type", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06314
train
v1
Schema: transactions (alias: gev)(salary, name, status, amount) orders(value, type, date, id) Task: Select name from transactions where status exists in orders for the same type. SQL:
SELECT name FROM transactions AS gev WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.type = gev.type );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "gev", "inner_alias": "kab", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06315
train
v1
Schema: shipments (alias: vnob)(name, date, salary, amount) items(id, name, status, date) Task: Retrieve code from shipments whose level is found in items rows where level matches the outer record. SQL:
SELECT code FROM shipments AS vnob WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "items", "outer_alias": "vnob", "inner_alias": "ikob", "proj_col": "code", "filter_col": "level", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06316
train
v1
Schema: products (alias: nad)(amount, date, id, code) tasks(type, status, date, code) Task: Select code from products where type exists in tasks for the same level. SQL:
SELECT code FROM products AS nad WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.level = nad.level );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06317
train
v3
Schema: customers (alias: lex)(date, id, amount, code) regions(type, name, salary, status) Task: Retrieve id from customers with amount above the SUM(amount) of regions rows sharing the same code. SQL:
SELECT id FROM customers AS lex WHERE amount > ( SELECT SUM(amount) FROM regions AS okiv WHERE okiv.code = lex.code );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06318
train
v1
Schema: requests (alias: ejof)(status, name, level, amount) staff(value, name, salary, id) Task: Retrieve code from requests whose code is found in staff rows where status matches the outer record. SQL:
SELECT code FROM requests AS ejof WHERE code IN ( SELECT code FROM staff AS xnob WHERE xnob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ejof", "inner_alias": "xnob", "proj_col": "code", "filter_col": "code", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06319
train
v1
Schema: managers (alias: hac)(type, date, id, value) requests(code, amount, status, value) Task: Find salary from managers where status appears in requests entries with matching code. SQL:
SELECT salary FROM managers AS hac WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.code = hac.code );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "status", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06320
train
v1
Schema: customers (alias: lex)(value, type, amount, salary) shipments(salary, value, date, status) Task: Find salary from customers where code appears in shipments entries with matching id. SQL:
SELECT salary FROM customers AS lex WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.id = lex.id );
{ "outer_table": "customers", "inner_table": "shipments", "outer_alias": "lex", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06321
train
v3
Schema: transactions (alias: gev)(salary, type, name, id) requests(value, level, date, salary) Task: Find id from transactions where salary exceeds the average value from requests for the same id. SQL:
SELECT id FROM transactions AS gev WHERE salary > ( SELECT AVG(value) FROM requests AS ejof WHERE ejof.id = gev.id );
{ "outer_table": "transactions", "inner_table": "requests", "outer_alias": "gev", "inner_alias": "ejof", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06322
train
v1
Schema: schedules (alias: vmob)(name, date, amount, id) accounts(level, id, code, status) Task: Find name from schedules where level appears in accounts entries with matching level. SQL:
SELECT name FROM schedules AS vmob WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "accounts", "outer_alias": "vmob", "inner_alias": "jac", "proj_col": "name", "filter_col": "level", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06323
train
v3
Schema: products (alias: nad)(date, value, type, code) departments(code, status, level, date) Task: Retrieve amount from products with amount above the MIN(value) of departments rows sharing the same id. SQL:
SELECT amount FROM products AS nad WHERE amount > ( SELECT MIN(value) FROM departments AS dov WHERE dov.id = nad.id );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06324
train
v2
Schema: projects (alias: uliv)(level, type, date, id) accounts(code, date, amount, id) Task: Retrieve value from projects that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT value FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = uliv.code );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "value", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06325
train
v2
Schema: departments (alias: dov)(id, value, name, date) invoices(type, amount, id, salary) Task: Retrieve value from departments that have at least one corresponding entry in invoices sharing the same id. SQL:
SELECT value FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = dov.id );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "value", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06326
train
v2
Schema: sales (alias: cif)(value, amount, id, level) departments(name, amount, salary, date) Task: Find salary from sales where a matching record exists in departments with the same id. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = cif.id );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "salary", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06327
train
v1
Schema: orders (alias: kab)(name, id, value, code) schedules(amount, value, salary, name) Task: Find value from orders where level appears in schedules entries with matching code. SQL:
SELECT value FROM orders AS kab WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.code = kab.code );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06328
train
v2
Schema: regions (alias: okiv)(amount, date, value, id) projects(status, salary, type, value) Task: Find amount from regions where a matching record exists in projects with the same type. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = okiv.type );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "amount", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06329
train
v2
Schema: managers (alias: hac)(amount, status, type, date) projects(type, status, salary, id) Task: Find amount from managers where a matching record exists in projects with the same id. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.id = hac.id );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "hac", "inner_alias": "uliv", "proj_col": "amount", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06330
train
v2
Schema: categories (alias: egiv)(date, level, type, salary) customers(type, code, status, id) Task: Find code from categories where a matching record exists in customers with the same id. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = egiv.id );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "code", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06331
train
v1
Schema: invoices (alias: fal)(type, salary, level, id) products(type, value, status, date) Task: Find value from invoices where code appears in products entries with matching status. SQL:
SELECT value FROM invoices AS fal WHERE code IN ( SELECT code FROM products AS nad WHERE nad.status = fal.status );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "value", "filter_col": "code", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06332
train
v2
Schema: invoices (alias: fal)(date, status, value, amount) accounts(status, type, code, name) Task: Retrieve amount from invoices that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT amount FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = fal.code );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "amount", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06333
train
v2
Schema: orders (alias: kab)(date, value, name, amount) departments(amount, id, code, salary) Task: Retrieve amount from orders that have at least one corresponding entry in departments sharing the same status. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = kab.status );
{ "outer_table": "orders", "inner_table": "departments", "outer_alias": "kab", "inner_alias": "dov", "proj_col": "amount", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06334
train
v3
Schema: sales (alias: cif)(salary, name, amount, value) staff(code, type, name, salary) Task: Find salary from sales where salary exceeds the count of amount from staff for the same id. SQL:
SELECT salary FROM sales AS cif WHERE salary > ( SELECT COUNT(amount) FROM staff AS xnob WHERE xnob.id = cif.id );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06335
train
v2
Schema: orders (alias: kab)(status, level, salary, code) transactions(name, type, level, salary) Task: Find name from orders where a matching record exists in transactions with the same id. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = kab.id );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "name", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06336
train
v2
Schema: managers (alias: hac)(date, level, code, amount) orders(code, date, level, amount) Task: Find salary from managers where a matching record exists in orders with the same id. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = hac.id );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "salary", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06337
train
v1
Schema: regions (alias: okiv)(id, status, salary, type) categories(value, status, id, type) Task: Select id from regions where level exists in categories for the same id. SQL:
SELECT id FROM regions AS okiv WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.id = okiv.id );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "id", "filter_col": "level", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06338
train
v2
Schema: products (alias: nad)(value, level, code, date) tasks(type, value, status, name) Task: Retrieve amount from products that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = nad.status );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "amount", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06339
train
v1
Schema: projects (alias: uliv)(name, date, level, amount) invoices(date, id, value, level) Task: Find salary from projects where type appears in invoices entries with matching id. SQL:
SELECT salary FROM projects AS uliv WHERE type IN ( SELECT type FROM invoices AS fal WHERE fal.id = uliv.id );
{ "outer_table": "projects", "inner_table": "invoices", "outer_alias": "uliv", "inner_alias": "fal", "proj_col": "salary", "filter_col": "type", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06340
train
v3
Schema: orders (alias: kab)(amount, id, level, code) products(value, name, level, amount) Task: Retrieve name from orders with salary above the MAX(salary) of products rows sharing the same type. SQL:
SELECT name FROM orders AS kab WHERE salary > ( SELECT MAX(salary) FROM products AS nad WHERE nad.type = kab.type );
{ "outer_table": "orders", "inner_table": "products", "outer_alias": "kab", "inner_alias": "nad", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06341
train
v1
Schema: transactions (alias: gev)(code, value, status, name) branches(status, type, salary, level) Task: Retrieve name from transactions whose status is found in branches rows where level matches the outer record. SQL:
SELECT name FROM transactions AS gev WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.level = gev.level );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "gev", "inner_alias": "agov", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06342
train
v2
Schema: shipments (alias: vnob)(salary, name, level, type) products(value, code, name, salary) Task: Retrieve name from shipments that have at least one corresponding entry in products sharing the same code. SQL:
SELECT name FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "name", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06343
train
v2
Schema: products (alias: nad)(value, level, status, id) transactions(type, id, salary, code) Task: Find value from products where a matching record exists in transactions with the same type. SQL:
SELECT value FROM products AS nad WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = nad.type );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "value", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06344
train
v3
Schema: schedules (alias: vmob)(type, status, salary, code) customers(date, level, code, status) Task: Find salary from schedules where value exceeds the total amount from customers for the same status. SQL:
SELECT salary FROM schedules AS vmob WHERE value > ( SELECT SUM(amount) FROM customers AS lex WHERE lex.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "vmob", "inner_alias": "lex", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06345
train
v3
Schema: orders (alias: kab)(salary, id, name, type) tasks(id, level, date, salary) Task: Retrieve value from orders with value above the COUNT(salary) of tasks rows sharing the same type. SQL:
SELECT value FROM orders AS kab WHERE value > ( SELECT COUNT(salary) FROM tasks AS znob WHERE znob.type = kab.type );
{ "outer_table": "orders", "inner_table": "tasks", "outer_alias": "kab", "inner_alias": "znob", "proj_col": "value", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06346
train
v1
Schema: projects (alias: uliv)(name, code, type, date) categories(name, type, amount, date) Task: Find value from projects where type appears in categories entries with matching code. SQL:
SELECT value FROM projects AS uliv WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.code = uliv.code );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "value", "filter_col": "type", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06347
train
v2
Schema: employees (alias: bev)(value, amount, type, salary) accounts(code, type, level, status) Task: Find salary from employees where a matching record exists in accounts with the same code. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = bev.code );
{ "outer_table": "employees", "inner_table": "accounts", "outer_alias": "bev", "inner_alias": "jac", "proj_col": "salary", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06348
train
v2
Schema: regions (alias: okiv)(salary, level, status, id) projects(date, type, level, value) Task: Find value from regions where a matching record exists in projects with the same status. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = okiv.status );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "value", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06349
train
v3
Schema: branches (alias: agov)(amount, code, level, name) projects(status, amount, salary, level) Task: Find amount from branches where salary exceeds the minimum amount from projects for the same code. SQL:
SELECT amount FROM branches AS agov WHERE salary > ( SELECT MIN(amount) FROM projects AS uliv WHERE uliv.code = agov.code );
{ "outer_table": "branches", "inner_table": "projects", "outer_alias": "agov", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06350
train
v1
Schema: departments (alias: dov)(status, date, id, type) staff(value, date, type, id) Task: Retrieve value from departments whose type is found in staff rows where status matches the outer record. SQL:
SELECT value FROM departments AS dov WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "staff", "outer_alias": "dov", "inner_alias": "xnob", "proj_col": "value", "filter_col": "type", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06351
train
v1
Schema: orders (alias: kab)(id, value, code, type) branches(amount, code, id, salary) Task: Select salary from orders where status exists in branches for the same status. SQL:
SELECT salary FROM orders AS kab WHERE status IN ( SELECT status FROM branches AS agov WHERE agov.status = kab.status );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "salary", "filter_col": "status", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06352
train
v3
Schema: accounts (alias: jac)(id, level, code, salary) schedules(code, salary, name, id) Task: Retrieve salary from accounts with amount above the MAX(value) of schedules rows sharing the same code. SQL:
SELECT salary FROM accounts AS jac WHERE amount > ( SELECT MAX(value) FROM schedules AS vmob WHERE vmob.code = jac.code );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06353
train
v1
Schema: categories (alias: egiv)(code, type, salary, id) projects(amount, name, id, level) Task: Select salary from categories where status exists in projects for the same level. SQL:
SELECT salary FROM categories AS egiv WHERE status IN ( SELECT status FROM projects AS uliv WHERE uliv.level = egiv.level );
{ "outer_table": "categories", "inner_table": "projects", "outer_alias": "egiv", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_06354
train
v1
Schema: sales (alias: cif)(value, status, salary, type) categories(status, level, date, name) Task: Select amount from sales where code exists in categories for the same type. SQL:
SELECT amount FROM sales AS cif WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.type = cif.type );
{ "outer_table": "sales", "inner_table": "categories", "outer_alias": "cif", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06355
train
v3
Schema: products (alias: nad)(id, date, status, name) transactions(level, salary, name, status) Task: Retrieve id from products with value above the MIN(salary) of transactions rows sharing the same level. SQL:
SELECT id FROM products AS nad WHERE value > ( SELECT MIN(salary) FROM transactions AS gev WHERE gev.level = nad.level );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06356
train
v3
Schema: invoices (alias: fal)(amount, level, salary, type) customers(amount, name, date, id) Task: Find value from invoices where amount exceeds the count of amount from customers for the same code. SQL:
SELECT value FROM invoices AS fal WHERE amount > ( SELECT COUNT(amount) FROM customers AS lex WHERE lex.code = fal.code );
{ "outer_table": "invoices", "inner_table": "customers", "outer_alias": "fal", "inner_alias": "lex", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06357
train
v3
Schema: schedules (alias: vmob)(level, date, value, status) employees(amount, level, code, salary) Task: Find code from schedules where salary exceeds the average amount from employees for the same code. SQL:
SELECT code FROM schedules AS vmob WHERE salary > ( SELECT AVG(amount) FROM employees AS bev WHERE bev.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "vmob", "inner_alias": "bev", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06358
train
v1
Schema: tasks (alias: znob)(type, salary, value, level) items(status, code, date, value) Task: Retrieve code from tasks whose level is found in items rows where level matches the outer record. SQL:
SELECT code FROM tasks AS znob WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.level = znob.level );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "code", "filter_col": "level", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06359
train
v3
Schema: transactions (alias: gev)(salary, amount, name, level) accounts(type, name, status, date) Task: Retrieve amount from transactions with salary above the COUNT(amount) of accounts rows sharing the same id. SQL:
SELECT amount FROM transactions AS gev WHERE salary > ( SELECT COUNT(amount) FROM accounts AS jac WHERE jac.id = gev.id );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "gev", "inner_alias": "jac", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06360
train
v1
Schema: branches (alias: agov)(type, id, status, level) tasks(status, salary, amount, type) Task: Select id from branches where status exists in tasks for the same status. SQL:
SELECT id FROM branches AS agov WHERE status IN ( SELECT status FROM tasks AS znob WHERE znob.status = agov.status );
{ "outer_table": "branches", "inner_table": "tasks", "outer_alias": "agov", "inner_alias": "znob", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06361
train
v1
Schema: employees (alias: bev)(date, value, id, amount) sales(level, salary, date, status) Task: Select amount from employees where level exists in sales for the same code. SQL:
SELECT amount FROM employees AS bev WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.code = bev.code );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06362
train
v1
Schema: shipments (alias: vnob)(salary, id, type, amount) tasks(id, status, type, date) Task: Find name from shipments where code appears in tasks entries with matching status. SQL:
SELECT name FROM shipments AS vnob WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "tasks", "outer_alias": "vnob", "inner_alias": "znob", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06363
train
v1
Schema: sales (alias: cif)(date, level, status, id) categories(date, level, status, name) Task: Retrieve code from sales whose status is found in categories rows where id matches the outer record. SQL:
SELECT code FROM sales AS cif WHERE status IN ( SELECT status 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": "status", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06364
train
v1
Schema: tasks (alias: znob)(status, level, type, name) transactions(value, id, date, name) Task: Find code from tasks where id appears in transactions entries with matching status. SQL:
SELECT code FROM tasks AS znob WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.status = znob.status );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_06365
train
v2
Schema: departments (alias: dov)(date, amount, value, code) customers(level, code, amount, type) Task: Find amount from departments where a matching record exists in customers with the same type. SQL:
SELECT amount FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = dov.type );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "amount", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06366
train
v3
Schema: orders (alias: kab)(value, date, name, type) invoices(value, id, salary, name) Task: Find value from orders where value exceeds the minimum value from invoices for the same level. SQL:
SELECT value FROM orders AS kab WHERE value > ( SELECT MIN(value) FROM invoices AS fal WHERE fal.level = kab.level );
{ "outer_table": "orders", "inner_table": "invoices", "outer_alias": "kab", "inner_alias": "fal", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06367
train
v2
Schema: managers (alias: hac)(salary, name, value, amount) shipments(salary, amount, status, value) Task: Find name from managers where a matching record exists in shipments with the same type. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = hac.type );
{ "outer_table": "managers", "inner_table": "shipments", "outer_alias": "hac", "inner_alias": "vnob", "proj_col": "name", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06368
train
v2
Schema: branches (alias: agov)(code, name, type, id) products(amount, date, value, salary) Task: Find amount from branches where a matching record exists in products with the same status. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = agov.status );
{ "outer_table": "branches", "inner_table": "products", "outer_alias": "agov", "inner_alias": "nad", "proj_col": "amount", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06369
train
v3
Schema: items (alias: ikob)(value, id, name, date) staff(value, salary, code, type) Task: Retrieve amount from items with value above the MIN(amount) of staff rows sharing the same id. SQL:
SELECT amount FROM items AS ikob WHERE value > ( SELECT MIN(amount) FROM staff AS xnob WHERE xnob.id = ikob.id );
{ "outer_table": "items", "inner_table": "staff", "outer_alias": "ikob", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_06370
train
v3
Schema: projects (alias: uliv)(salary, level, status, name) transactions(level, value, status, id) Task: Find value from projects where value exceeds the average value from transactions for the same status. SQL:
SELECT value FROM projects AS uliv WHERE value > ( SELECT AVG(value) FROM transactions AS gev WHERE gev.status = uliv.status );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06371
train
v2
Schema: orders (alias: kab)(amount, name, code, salary) accounts(id, name, type, salary) Task: Find salary from orders where a matching record exists in accounts with the same id. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = kab.id );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "kab", "inner_alias": "jac", "proj_col": "salary", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06372
train
v2
Schema: orders (alias: kab)(id, name, amount, status) tasks(code, type, status, level) Task: Find id from orders where a matching record exists in tasks with the same level. SQL:
SELECT id 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": "id", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06373
train
v1
Schema: branches (alias: agov)(level, salary, code, value) products(date, amount, salary, id) Task: Retrieve salary from branches whose type is found in products rows where type matches the outer record. SQL:
SELECT salary FROM branches AS agov WHERE type IN ( SELECT type FROM products AS nad WHERE nad.type = agov.type );
{ "outer_table": "branches", "inner_table": "products", "outer_alias": "agov", "inner_alias": "nad", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06374
train
v2
Schema: regions (alias: okiv)(level, id, status, value) accounts(type, date, name, level) Task: Find code from regions where a matching record exists in accounts with the same id. SQL:
SELECT code FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.id = okiv.id );
{ "outer_table": "regions", "inner_table": "accounts", "outer_alias": "okiv", "inner_alias": "jac", "proj_col": "code", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_06375
train
v1
Schema: shipments (alias: vnob)(status, level, value, salary) customers(value, name, id, level) Task: Find salary from shipments where code appears in customers entries with matching id. SQL:
SELECT salary FROM shipments AS vnob WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "customers", "outer_alias": "vnob", "inner_alias": "lex", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06376
train
v3
Schema: orders (alias: kab)(date, name, code, salary) projects(type, name, status, id) Task: Retrieve salary from orders with amount above the MIN(amount) of projects rows sharing the same status. SQL:
SELECT salary FROM orders AS kab WHERE amount > ( SELECT MIN(amount) FROM projects AS uliv WHERE uliv.status = kab.status );
{ "outer_table": "orders", "inner_table": "projects", "outer_alias": "kab", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06377
train
v3
Schema: schedules (alias: vmob)(amount, status, level, name) tasks(name, salary, amount, code) Task: Retrieve name from schedules with value above the MIN(value) of tasks rows sharing the same type. SQL:
SELECT name FROM schedules AS vmob WHERE value > ( SELECT MIN(value) FROM tasks AS znob WHERE znob.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06378
train
v3
Schema: projects (alias: uliv)(name, amount, level, code) branches(status, date, salary, amount) Task: Retrieve id from projects with amount above the MAX(value) of branches rows sharing the same code. SQL:
SELECT id FROM projects AS uliv WHERE amount > ( SELECT MAX(value) FROM branches AS agov WHERE agov.code = uliv.code );
{ "outer_table": "projects", "inner_table": "branches", "outer_alias": "uliv", "inner_alias": "agov", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06379
train
v2
Schema: sales (alias: cif)(salary, id, code, name) orders(name, amount, salary, value) Task: Find value from sales where a matching record exists in orders with the same status. SQL:
SELECT value FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.status = cif.status );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "value", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06380
train
v2
Schema: customers (alias: lex)(id, code, salary, name) employees(date, name, status, level) Task: Find code from customers where a matching record exists in employees with the same id. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = lex.id );
{ "outer_table": "customers", "inner_table": "employees", "outer_alias": "lex", "inner_alias": "bev", "proj_col": "code", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06381
train
v2
Schema: accounts (alias: jac)(value, level, date, amount) orders(level, code, salary, type) Task: Retrieve amount from accounts that have at least one corresponding entry in orders sharing the same level. SQL:
SELECT amount FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = jac.level );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "amount", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06382
train
v2
Schema: managers (alias: hac)(type, date, code, name) regions(id, date, code, salary) Task: Retrieve id from managers that have at least one corresponding entry in regions sharing the same status. SQL:
SELECT id FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = hac.status );
{ "outer_table": "managers", "inner_table": "regions", "outer_alias": "hac", "inner_alias": "okiv", "proj_col": "id", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06383
train
v3
Schema: orders (alias: kab)(date, code, type, level) projects(level, salary, type, amount) Task: Find id from orders where value exceeds the minimum amount from projects for the same level. SQL:
SELECT id FROM orders AS kab WHERE value > ( SELECT MIN(amount) FROM projects AS uliv WHERE uliv.level = kab.level );
{ "outer_table": "orders", "inner_table": "projects", "outer_alias": "kab", "inner_alias": "uliv", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06384
train
v3
Schema: invoices (alias: fal)(value, type, amount, id) branches(level, value, type, salary) Task: Find code from invoices where value exceeds the minimum value from branches for the same code. SQL:
SELECT code FROM invoices AS fal WHERE value > ( SELECT MIN(value) FROM branches AS agov WHERE agov.code = fal.code );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06385
train
v2
Schema: projects (alias: uliv)(date, id, type, status) categories(status, date, type, salary) Task: Find value from projects where a matching record exists in categories with the same code. SQL:
SELECT value FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = uliv.code );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "value", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06386
train
v1
Schema: projects (alias: uliv)(name, level, salary, id) tasks(id, name, salary, amount) Task: Retrieve name from projects whose status is found in tasks rows where code matches the outer record. SQL:
SELECT name FROM projects AS uliv WHERE status IN ( SELECT status FROM tasks AS znob WHERE znob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "uliv", "inner_alias": "znob", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06387
train
v1
Schema: projects (alias: uliv)(salary, amount, type, level) accounts(status, amount, level, code) Task: Retrieve value from projects whose level is found in accounts rows where status matches the outer record. SQL:
SELECT value FROM projects AS uliv WHERE level IN ( SELECT level FROM accounts AS jac WHERE jac.status = uliv.status );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_06388
train
v3
Schema: schedules (alias: vmob)(name, status, date, value) categories(date, value, status, code) Task: Retrieve id from schedules with value above the SUM(amount) of categories rows sharing the same id. SQL:
SELECT id FROM schedules AS vmob WHERE value > ( SELECT SUM(amount) FROM categories AS egiv WHERE egiv.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06389
train
v1
Schema: invoices (alias: fal)(value, amount, name, id) transactions(code, amount, status, type) Task: Find id from invoices where code appears in transactions entries with matching id. SQL:
SELECT id FROM invoices AS fal WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.id = fal.id );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "id", "filter_col": "code", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06390
train
v3
Schema: requests (alias: ejof)(salary, date, value, code) categories(type, level, value, name) Task: Retrieve code from requests with value above the MAX(salary) of categories rows sharing the same level. SQL:
SELECT code FROM requests AS ejof WHERE value > ( SELECT MAX(salary) FROM categories AS egiv WHERE egiv.level = ejof.level );
{ "outer_table": "requests", "inner_table": "categories", "outer_alias": "ejof", "inner_alias": "egiv", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_06391
train
v3
Schema: customers (alias: lex)(amount, code, type, id) employees(value, status, amount, name) Task: Find salary from customers where value exceeds the total salary from employees for the same code. SQL:
SELECT salary FROM customers AS lex WHERE value > ( SELECT SUM(salary) FROM employees AS bev WHERE bev.code = lex.code );
{ "outer_table": "customers", "inner_table": "employees", "outer_alias": "lex", "inner_alias": "bev", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06392
train
v1
Schema: shipments (alias: vnob)(status, id, date, amount) projects(salary, code, date, amount) Task: Find code from shipments where type appears in projects entries with matching status. SQL:
SELECT code FROM shipments AS vnob WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "projects", "outer_alias": "vnob", "inner_alias": "uliv", "proj_col": "code", "filter_col": "type", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_06393
train
v1
Schema: accounts (alias: jac)(name, date, value, code) sales(date, salary, amount, id) Task: Retrieve name from accounts whose code is found in sales rows where status matches the outer record. SQL:
SELECT name FROM accounts AS jac WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.status = jac.status );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06394
train
v3
Schema: schedules (alias: vmob)(amount, value, date, code) regions(salary, amount, level, value) Task: Retrieve code from schedules with salary above the COUNT(amount) of regions rows sharing the same id. SQL:
SELECT code FROM schedules AS vmob WHERE salary > ( SELECT COUNT(amount) FROM regions AS okiv WHERE okiv.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_06395
train
v1
Schema: branches (alias: agov)(code, value, name, salary) projects(value, status, level, name) Task: Find amount from branches where id appears in projects entries with matching level. SQL:
SELECT amount FROM branches AS agov WHERE id IN ( SELECT id FROM projects AS uliv WHERE uliv.level = agov.level );
{ "outer_table": "branches", "inner_table": "projects", "outer_alias": "agov", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "id", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_06396
train
v1
Schema: products (alias: nad)(code, value, name, type) accounts(code, level, date, name) Task: Select name from products where status exists in accounts for the same level. SQL:
SELECT name FROM products AS nad WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.level = nad.level );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "name", "filter_col": "status", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06397
train
v3
Schema: staff (alias: xnob)(name, type, level, salary) employees(id, type, status, date) Task: Find id from staff where amount exceeds the average salary from employees for the same id. SQL:
SELECT id FROM staff AS xnob WHERE amount > ( SELECT AVG(salary) FROM employees AS bev WHERE bev.id = xnob.id );
{ "outer_table": "staff", "inner_table": "employees", "outer_alias": "xnob", "inner_alias": "bev", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_06398
train
v2
Schema: orders (alias: kab)(level, name, id, date) transactions(type, status, amount, id) Task: Retrieve name from orders that have at least one corresponding entry in transactions sharing the same type. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = kab.type );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "name", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_06399
train