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: transactions (alias: gev)(salary, date, value, code) branches(level, salary, code, type) Task: Find name from transactions where a matching record exists in branches with the same type. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.type = gev.type );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "gev", "inner_alias": "agov", "proj_col": "name", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03300
train
v2
Schema: employees (alias: bev)(value, code, type, level) orders(date, code, id, salary) Task: Retrieve value from employees that have at least one corresponding entry in orders sharing the same type. SQL:
SELECT value FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.type = bev.type );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "value", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03301
train
v1
Schema: schedules (alias: vmob)(code, status, salary, id) tasks(value, amount, name, level) Task: Select amount from schedules where type exists in tasks for the same code. SQL:
SELECT amount FROM schedules AS vmob WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "amount", "filter_col": "type", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03302
train
v1
Schema: shipments (alias: vnob)(date, salary, id, name) staff(type, status, amount, level) Task: Find id from shipments where level appears in staff entries with matching status. SQL:
SELECT id FROM shipments AS vnob WHERE level IN ( SELECT level 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": "level", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03303
train
v1
Schema: departments (alias: dov)(id, type, name, date) invoices(salary, status, amount, level) Task: Select name from departments where level exists in invoices for the same code. SQL:
SELECT name FROM departments AS dov WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.code = dov.code );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03304
train
v3
Schema: customers (alias: lex)(code, status, amount, id) projects(type, amount, code, name) Task: Find salary from customers where amount exceeds the total amount from projects for the same type. SQL:
SELECT salary FROM customers AS lex WHERE amount > ( SELECT SUM(amount) FROM projects AS uliv WHERE uliv.type = lex.type );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03305
train
v3
Schema: regions (alias: okiv)(code, type, status, level) employees(salary, amount, name, type) Task: Find name from regions where amount exceeds the minimum salary from employees for the same level. SQL:
SELECT name FROM regions AS okiv WHERE amount > ( SELECT MIN(salary) FROM employees AS bev WHERE bev.level = okiv.level );
{ "outer_table": "regions", "inner_table": "employees", "outer_alias": "okiv", "inner_alias": "bev", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_03306
train
v1
Schema: products (alias: nad)(type, date, id, code) items(date, name, level, value) Task: Retrieve id from products whose status is found in items rows where id matches the outer record. SQL:
SELECT id FROM products AS nad WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.id = nad.id );
{ "outer_table": "products", "inner_table": "items", "outer_alias": "nad", "inner_alias": "ikob", "proj_col": "id", "filter_col": "status", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03307
train
v2
Schema: items (alias: ikob)(value, code, amount, id) regions(id, date, type, name) Task: Find salary from items where a matching record exists in regions with the same level. SQL:
SELECT salary FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = ikob.level );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "salary", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03308
train
v2
Schema: items (alias: ikob)(status, code, level, type) invoices(id, salary, name, level) Task: Find name from items where a matching record exists in invoices with the same id. SQL:
SELECT name 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": "name", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03309
train
v3
Schema: sales (alias: cif)(date, salary, name, id) departments(name, salary, level, amount) Task: Retrieve id from sales with salary above the MAX(salary) of departments rows sharing the same code. SQL:
SELECT id FROM sales AS cif WHERE salary > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.code = cif.code );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03310
train
v2
Schema: invoices (alias: fal)(amount, level, salary, name) transactions(status, id, value, code) Task: Find name from invoices where a matching record exists in transactions with the same id. SQL:
SELECT name FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = fal.id );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "name", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03311
train
v2
Schema: orders (alias: kab)(salary, date, level, amount) staff(id, date, code, value) Task: Retrieve name from orders that have at least one corresponding entry in staff sharing the same code. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.code = kab.code );
{ "outer_table": "orders", "inner_table": "staff", "outer_alias": "kab", "inner_alias": "xnob", "proj_col": "name", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03312
train
v3
Schema: items (alias: ikob)(status, level, value, date) customers(status, date, salary, amount) Task: Find amount from items where salary exceeds the count of amount from customers for the same level. SQL:
SELECT amount FROM items AS ikob WHERE salary > ( SELECT COUNT(amount) FROM customers AS lex WHERE lex.level = ikob.level );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03313
train
v1
Schema: departments (alias: dov)(level, type, date, id) projects(amount, level, value, date) Task: Retrieve code from departments whose type is found in projects rows where level matches the outer record. SQL:
SELECT code FROM departments AS dov WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.level = dov.level );
{ "outer_table": "departments", "inner_table": "projects", "outer_alias": "dov", "inner_alias": "uliv", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03314
train
v2
Schema: transactions (alias: gev)(name, salary, amount, type) sales(status, date, amount, type) Task: Find id from transactions where a matching record exists in sales with the same level. SQL:
SELECT id FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = gev.level );
{ "outer_table": "transactions", "inner_table": "sales", "outer_alias": "gev", "inner_alias": "cif", "proj_col": "id", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03315
train
v1
Schema: schedules (alias: vmob)(code, level, name, value) sales(amount, code, id, salary) Task: Find code from schedules where code appears in sales entries with matching id. SQL:
SELECT code FROM schedules AS vmob WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "sales", "outer_alias": "vmob", "inner_alias": "cif", "proj_col": "code", "filter_col": "code", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03316
train
v3
Schema: requests (alias: ejof)(code, name, value, id) projects(type, name, date, id) Task: Retrieve salary from requests with salary above the MAX(value) of projects rows sharing the same status. SQL:
SELECT salary FROM requests AS ejof WHERE salary > ( SELECT MAX(value) FROM projects AS uliv WHERE uliv.status = ejof.status );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_03317
train
v2
Schema: schedules (alias: vmob)(code, amount, salary, type) regions(code, type, status, date) Task: Find id from schedules where a matching record exists in regions with the same status. SQL:
SELECT id FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "id", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03318
train
v2
Schema: managers (alias: hac)(date, name, status, type) sales(date, level, salary, status) Task: Find name from managers where a matching record exists in sales with the same status. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = hac.status );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "name", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03319
train
v2
Schema: items (alias: ikob)(name, id, salary, level) invoices(amount, date, type, id) Task: Retrieve amount from items that have at least one corresponding entry in invoices sharing the same status. SQL:
SELECT amount FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.status = ikob.status );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "amount", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03320
train
v2
Schema: orders (alias: kab)(status, type, value, amount) shipments(salary, level, code, amount) Task: Retrieve value from orders that have at least one corresponding entry in shipments sharing the same type. SQL:
SELECT value FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = kab.type );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "value", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03321
train
v2
Schema: products (alias: nad)(code, level, date, id) departments(type, status, code, value) 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_03322
train
v1
Schema: transactions (alias: gev)(level, id, value, name) items(value, status, type, amount) Task: Find amount from transactions where level appears in items entries with matching type. SQL:
SELECT amount FROM transactions AS gev WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.type = gev.type );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "gev", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "level", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03323
train
v2
Schema: invoices (alias: fal)(name, level, salary, amount) staff(code, level, id, value) Task: Retrieve amount from invoices that have at least one corresponding entry in staff sharing the same status. SQL:
SELECT amount FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = fal.status );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "amount", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03324
train
v1
Schema: managers (alias: hac)(level, salary, amount, code) orders(status, level, type, code) Task: Select amount from managers where id exists in orders for the same type. SQL:
SELECT amount FROM managers AS hac WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.type = hac.type );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03325
train
v1
Schema: regions (alias: okiv)(level, date, amount, salary) orders(amount, salary, name, date) Task: Find code from regions where type appears in orders entries with matching type. SQL:
SELECT code FROM regions AS okiv WHERE type IN ( SELECT type FROM orders AS kab WHERE kab.type = okiv.type );
{ "outer_table": "regions", "inner_table": "orders", "outer_alias": "okiv", "inner_alias": "kab", "proj_col": "code", "filter_col": "type", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_03326
train
v1
Schema: staff (alias: xnob)(id, salary, code, value) shipments(code, salary, id, value) Task: Select code from staff where level exists in shipments for the same status. SQL:
SELECT code FROM staff AS xnob WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03327
train
v1
Schema: managers (alias: hac)(salary, amount, type, level) orders(id, value, date, type) Task: Find id from managers where status appears in orders entries with matching level. SQL:
SELECT id FROM managers AS hac WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.level = hac.level );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "id", "filter_col": "status", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03328
train
v2
Schema: schedules (alias: vmob)(amount, name, salary, status) projects(status, date, amount, id) Task: Find id from schedules where a matching record exists in projects with the same type. SQL:
SELECT id FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "id", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03329
train
v3
Schema: customers (alias: lex)(type, amount, date, status) projects(status, level, date, name) Task: Retrieve name from customers with salary above the MIN(amount) of projects rows sharing the same level. SQL:
SELECT name FROM customers AS lex WHERE salary > ( SELECT MIN(amount) FROM projects AS uliv WHERE uliv.level = lex.level );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03330
train
v2
Schema: accounts (alias: jac)(name, amount, value, code) managers(type, name, level, id) Task: Retrieve salary from accounts that have at least one corresponding entry in managers sharing the same level. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = jac.level );
{ "outer_table": "accounts", "inner_table": "managers", "outer_alias": "jac", "inner_alias": "hac", "proj_col": "salary", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03331
train
v2
Schema: shipments (alias: vnob)(level, type, id, amount) transactions(value, salary, code, date) Task: Retrieve code from shipments that have at least one corresponding entry in transactions sharing the same id. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "transactions", "outer_alias": "vnob", "inner_alias": "gev", "proj_col": "code", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03332
train
v1
Schema: managers (alias: hac)(salary, value, name, status) requests(status, value, id, salary) Task: Select salary from managers where status exists in requests for the same level. SQL:
SELECT salary FROM managers AS hac WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.level = hac.level );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03333
train
v2
Schema: categories (alias: egiv)(date, level, id, type) departments(level, code, type, id) Task: Find code from categories where a matching record exists in departments with the same type. SQL:
SELECT code FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = egiv.type );
{ "outer_table": "categories", "inner_table": "departments", "outer_alias": "egiv", "inner_alias": "dov", "proj_col": "code", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03334
train
v1
Schema: staff (alias: xnob)(date, name, level, status) projects(id, salary, name, level) Task: Find value from staff where code appears in projects entries with matching id. SQL:
SELECT value FROM staff AS xnob WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.id = xnob.id );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "xnob", "inner_alias": "uliv", "proj_col": "value", "filter_col": "code", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03335
train
v3
Schema: customers (alias: lex)(code, amount, type, name) sales(date, value, status, salary) Task: Find id from customers where value exceeds the minimum amount from sales for the same id. SQL:
SELECT id FROM customers AS lex WHERE value > ( SELECT MIN(amount) FROM sales AS cif WHERE cif.id = lex.id );
{ "outer_table": "customers", "inner_table": "sales", "outer_alias": "lex", "inner_alias": "cif", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03336
train
v1
Schema: departments (alias: dov)(value, salary, status, code) employees(type, name, amount, salary) Task: Select value from departments where status exists in employees for the same type. SQL:
SELECT value FROM departments AS dov WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.type = dov.type );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "value", "filter_col": "status", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03337
train
v2
Schema: orders (alias: kab)(status, amount, name, date) schedules(date, level, value, name) Task: Retrieve amount from orders that have at least one corresponding entry in schedules sharing the same level. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.level = kab.level );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "amount", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03338
train
v1
Schema: projects (alias: uliv)(id, salary, status, amount) departments(name, amount, level, salary) Task: Retrieve salary from projects whose status is found in departments rows where status matches the outer record. SQL:
SELECT salary FROM projects AS uliv WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.status = uliv.status );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "uliv", "inner_alias": "dov", "proj_col": "salary", "filter_col": "status", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_03339
train
v1
Schema: sales (alias: cif)(level, value, code, salary) departments(id, amount, value, level) Task: Select name from sales where status exists in departments for the same type. SQL:
SELECT name FROM sales AS cif WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.type = cif.type );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03340
train
v1
Schema: departments (alias: dov)(code, name, date, type) regions(code, type, salary, date) Task: Retrieve amount from departments whose code is found in regions rows where status matches the outer record. SQL:
SELECT amount FROM departments AS dov WHERE code IN ( SELECT code FROM regions AS okiv WHERE okiv.status = dov.status );
{ "outer_table": "departments", "inner_table": "regions", "outer_alias": "dov", "inner_alias": "okiv", "proj_col": "amount", "filter_col": "code", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03341
train
v3
Schema: orders (alias: kab)(id, name, status, amount) staff(status, code, value, amount) Task: Find value from orders where amount exceeds the count of amount from staff for the same code. SQL:
SELECT value FROM orders AS kab WHERE amount > ( SELECT COUNT(amount) FROM staff AS xnob WHERE xnob.code = kab.code );
{ "outer_table": "orders", "inner_table": "staff", "outer_alias": "kab", "inner_alias": "xnob", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03342
train
v1
Schema: staff (alias: xnob)(date, amount, type, status) orders(salary, date, value, status) Task: Retrieve name from staff whose code is found in orders rows where level matches the outer record. SQL:
SELECT name FROM staff AS xnob WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.level = xnob.level );
{ "outer_table": "staff", "inner_table": "orders", "outer_alias": "xnob", "inner_alias": "kab", "proj_col": "name", "filter_col": "code", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03343
train
v1
Schema: shipments (alias: vnob)(code, id, status, date) managers(status, type, level, name) Task: Retrieve code from shipments whose code is found in managers rows where level matches the outer record. SQL:
SELECT code FROM shipments AS vnob WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03344
train
v3
Schema: customers (alias: lex)(level, id, date, code) items(value, date, status, name) Task: Retrieve amount from customers with amount above the MIN(amount) of items rows sharing the same status. SQL:
SELECT amount FROM customers AS lex WHERE amount > ( SELECT MIN(amount) FROM items AS ikob WHERE ikob.status = lex.status );
{ "outer_table": "customers", "inner_table": "items", "outer_alias": "lex", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03345
train
v3
Schema: managers (alias: hac)(name, type, code, date) accounts(id, value, name, status) Task: Retrieve code from managers with salary above the MAX(salary) of accounts rows sharing the same status. SQL:
SELECT code FROM managers AS hac WHERE salary > ( SELECT MAX(salary) FROM accounts AS jac WHERE jac.status = hac.status );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03346
train
v1
Schema: invoices (alias: fal)(code, name, id, date) items(type, id, status, salary) Task: Retrieve code from invoices whose id is found in items rows where status matches the outer record. SQL:
SELECT code FROM invoices AS fal WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.status = fal.status );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "fal", "inner_alias": "ikob", "proj_col": "code", "filter_col": "id", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03347
train
v3
Schema: employees (alias: bev)(salary, amount, date, status) managers(type, id, status, salary) Task: Retrieve value from employees with salary above the SUM(amount) of managers rows sharing the same type. SQL:
SELECT value FROM employees AS bev WHERE salary > ( SELECT SUM(amount) FROM managers AS hac WHERE hac.type = bev.type );
{ "outer_table": "employees", "inner_table": "managers", "outer_alias": "bev", "inner_alias": "hac", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03348
train
v3
Schema: categories (alias: egiv)(salary, date, value, level) regions(status, date, id, type) Task: Find value from categories where salary exceeds the total value from regions for the same id. SQL:
SELECT value FROM categories AS egiv WHERE salary > ( SELECT SUM(value) FROM regions AS okiv WHERE okiv.id = egiv.id );
{ "outer_table": "categories", "inner_table": "regions", "outer_alias": "egiv", "inner_alias": "okiv", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03349
train
v3
Schema: branches (alias: agov)(value, type, level, code) customers(id, level, name, type) Task: Find code from branches where value exceeds the maximum salary from customers for the same status. SQL:
SELECT code FROM branches AS agov WHERE value > ( SELECT MAX(salary) FROM customers AS lex WHERE lex.status = agov.status );
{ "outer_table": "branches", "inner_table": "customers", "outer_alias": "agov", "inner_alias": "lex", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03350
train
v1
Schema: staff (alias: xnob)(amount, name, id, level) orders(type, status, salary, value) Task: Select value from staff where code exists in orders for the same id. SQL:
SELECT value FROM staff AS xnob WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.id = xnob.id );
{ "outer_table": "staff", "inner_table": "orders", "outer_alias": "xnob", "inner_alias": "kab", "proj_col": "value", "filter_col": "code", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03351
train
v1
Schema: orders (alias: kab)(name, level, status, amount) transactions(amount, code, level, status) Task: Find value from orders where code appears in transactions entries with matching level. SQL:
SELECT value FROM orders AS kab WHERE code IN ( SELECT code FROM transactions AS gev WHERE gev.level = kab.level );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "value", "filter_col": "code", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03352
train
v3
Schema: invoices (alias: fal)(date, level, status, id) staff(type, code, amount, id) Task: Find value from invoices where salary exceeds the maximum amount from staff for the same status. SQL:
SELECT value FROM invoices AS fal WHERE salary > ( SELECT MAX(amount) FROM staff AS xnob WHERE xnob.status = fal.status );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03353
train
v2
Schema: branches (alias: agov)(amount, name, salary, level) transactions(status, id, name, amount) Task: Find value from branches where a matching record exists in transactions with the same id. SQL:
SELECT value FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = agov.id );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "value", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03354
train
v3
Schema: customers (alias: lex)(value, name, status, date) schedules(code, level, type, name) Task: Retrieve id from customers with salary above the COUNT(amount) of schedules rows sharing the same id. SQL:
SELECT id FROM customers AS lex WHERE salary > ( SELECT COUNT(amount) FROM schedules AS vmob WHERE vmob.id = lex.id );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03355
train
v1
Schema: items (alias: ikob)(value, type, level, code) employees(salary, date, code, id) Task: Select salary from items where code exists in employees for the same id. SQL:
SELECT salary FROM items AS ikob WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.id = ikob.id );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03356
train
v1
Schema: transactions (alias: gev)(id, salary, name, status) schedules(type, id, level, code) Task: Retrieve id from transactions whose status is found in schedules rows where level matches the outer record. SQL:
SELECT id FROM transactions AS gev WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "schedules", "outer_alias": "gev", "inner_alias": "vmob", "proj_col": "id", "filter_col": "status", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03357
train
v2
Schema: customers (alias: lex)(name, status, salary, value) items(amount, type, salary, code) Task: Retrieve id from customers that have at least one corresponding entry in items sharing the same level. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = lex.level );
{ "outer_table": "customers", "inner_table": "items", "outer_alias": "lex", "inner_alias": "ikob", "proj_col": "id", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03358
train
v1
Schema: invoices (alias: fal)(amount, level, type, name) sales(amount, status, id, date) Task: Select amount from invoices where id exists in sales for the same code. SQL:
SELECT amount FROM invoices AS fal WHERE id IN ( SELECT id FROM sales AS cif WHERE cif.code = fal.code );
{ "outer_table": "invoices", "inner_table": "sales", "outer_alias": "fal", "inner_alias": "cif", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03359
train
v3
Schema: categories (alias: egiv)(level, date, status, salary) invoices(status, salary, level, name) Task: Retrieve value from categories with salary above the AVG(value) of invoices rows sharing the same id. SQL:
SELECT value FROM categories AS egiv WHERE salary > ( SELECT AVG(value) FROM invoices AS fal WHERE fal.id = egiv.id );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_03360
train
v1
Schema: orders (alias: kab)(amount, type, level, date) managers(name, id, amount, code) Task: Retrieve code from orders whose status is found in managers rows where type matches the outer record. SQL:
SELECT code FROM orders AS kab WHERE status IN ( SELECT status FROM managers AS hac WHERE hac.type = kab.type );
{ "outer_table": "orders", "inner_table": "managers", "outer_alias": "kab", "inner_alias": "hac", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03361
train
v2
Schema: branches (alias: agov)(level, value, amount, status) sales(name, salary, status, level) Task: Find salary from branches where a matching record exists in sales with the same level. SQL:
SELECT salary FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = agov.level );
{ "outer_table": "branches", "inner_table": "sales", "outer_alias": "agov", "inner_alias": "cif", "proj_col": "salary", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03362
train
v1
Schema: departments (alias: dov)(status, code, name, type) customers(name, code, status, salary) Task: Retrieve amount from departments whose id is found in customers rows where type matches the outer record. SQL:
SELECT amount FROM departments AS dov WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.type = dov.type );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03363
train
v2
Schema: requests (alias: ejof)(code, name, type, amount) items(amount, id, salary, date) Task: Retrieve id from requests that have at least one corresponding entry in items sharing the same status. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "items", "outer_alias": "ejof", "inner_alias": "ikob", "proj_col": "id", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_03364
train
v3
Schema: tasks (alias: znob)(status, date, name, salary) customers(salary, value, type, status) Task: Retrieve id from tasks with amount above the MAX(value) of customers rows sharing the same status. SQL:
SELECT id FROM tasks AS znob WHERE amount > ( SELECT MAX(value) FROM customers AS lex WHERE lex.status = znob.status );
{ "outer_table": "tasks", "inner_table": "customers", "outer_alias": "znob", "inner_alias": "lex", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03365
train
v3
Schema: customers (alias: lex)(salary, date, amount, value) products(code, amount, date, id) Task: Find value from customers where salary exceeds the minimum salary from products for the same id. SQL:
SELECT value FROM customers AS lex WHERE salary > ( SELECT MIN(salary) FROM products AS nad WHERE nad.id = lex.id );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03366
train
v2
Schema: transactions (alias: gev)(type, name, code, amount) staff(type, salary, name, amount) Task: Find value from transactions where a matching record exists in staff with the same level. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = gev.level );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "value", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03367
train
v1
Schema: tasks (alias: znob)(type, date, code, level) items(code, status, type, id) Task: Retrieve salary from tasks whose level is found in items rows where id matches the outer record. SQL:
SELECT salary FROM tasks AS znob WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "level", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03368
train
v1
Schema: staff (alias: xnob)(type, id, name, code) categories(salary, date, status, amount) Task: Retrieve name from staff whose level is found in categories rows where code matches the outer record. SQL:
SELECT name FROM staff AS xnob WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03369
train
v2
Schema: requests (alias: ejof)(code, name, date, type) transactions(type, code, salary, id) Task: Retrieve value from requests that have at least one corresponding entry in transactions sharing the same level. SQL:
SELECT value FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = ejof.level );
{ "outer_table": "requests", "inner_table": "transactions", "outer_alias": "ejof", "inner_alias": "gev", "proj_col": "value", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_03370
train
v3
Schema: items (alias: ikob)(date, name, status, level) customers(name, code, status, type) Task: Find name from items where salary exceeds the count of value from customers for the same level. SQL:
SELECT name FROM items AS ikob WHERE salary > ( SELECT COUNT(value) FROM customers AS lex WHERE lex.level = ikob.level );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03371
train
v3
Schema: invoices (alias: fal)(date, name, id, status) accounts(type, value, name, id) Task: Retrieve id from invoices with salary above the COUNT(salary) of accounts rows sharing the same id. SQL:
SELECT id FROM invoices AS fal WHERE salary > ( SELECT COUNT(salary) FROM accounts AS jac WHERE jac.id = fal.id );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03372
train
v3
Schema: shipments (alias: vnob)(amount, name, date, status) orders(date, salary, status, amount) Task: Retrieve code from shipments with salary above the SUM(value) of orders rows sharing the same id. SQL:
SELECT code FROM shipments AS vnob WHERE salary > ( SELECT SUM(value) FROM orders AS kab WHERE kab.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "orders", "outer_alias": "vnob", "inner_alias": "kab", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03373
train
v1
Schema: items (alias: ikob)(id, level, type, code) accounts(salary, type, name, amount) Task: Retrieve amount from items whose id is found in accounts rows where level matches the outer record. SQL:
SELECT amount FROM items AS ikob WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.level = ikob.level );
{ "outer_table": "items", "inner_table": "accounts", "outer_alias": "ikob", "inner_alias": "jac", "proj_col": "amount", "filter_col": "id", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_03374
train
v1
Schema: departments (alias: dov)(id, name, type, code) schedules(date, code, name, id) Task: Select code from departments where code exists in schedules for the same type. SQL:
SELECT code FROM departments AS dov WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.type = dov.type );
{ "outer_table": "departments", "inner_table": "schedules", "outer_alias": "dov", "inner_alias": "vmob", "proj_col": "code", "filter_col": "code", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03375
train
v1
Schema: accounts (alias: jac)(salary, name, level, value) items(type, date, code, salary) Task: Retrieve amount from accounts whose level is found in items rows where code matches the outer record. SQL:
SELECT amount FROM accounts AS jac WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.code = jac.code );
{ "outer_table": "accounts", "inner_table": "items", "outer_alias": "jac", "inner_alias": "ikob", "proj_col": "amount", "filter_col": "level", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03376
train
v1
Schema: regions (alias: okiv)(type, level, status, salary) transactions(level, salary, name, amount) Task: Retrieve amount from regions whose id is found in transactions rows where status matches the outer record. SQL:
SELECT amount FROM regions AS okiv WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.status = okiv.status );
{ "outer_table": "regions", "inner_table": "transactions", "outer_alias": "okiv", "inner_alias": "gev", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_03377
train
v2
Schema: tasks (alias: znob)(code, name, type, value) invoices(level, name, id, amount) Task: Retrieve id from tasks that have at least one corresponding entry in invoices sharing the same level. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = znob.level );
{ "outer_table": "tasks", "inner_table": "invoices", "outer_alias": "znob", "inner_alias": "fal", "proj_col": "id", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03378
train
v1
Schema: shipments (alias: vnob)(type, amount, date, salary) invoices(code, amount, id, name) Task: Retrieve code from shipments whose status is found in invoices rows where code matches the outer record. SQL:
SELECT code FROM shipments AS vnob WHERE status IN ( SELECT status FROM invoices AS fal WHERE fal.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "invoices", "outer_alias": "vnob", "inner_alias": "fal", "proj_col": "code", "filter_col": "status", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03379
train
v2
Schema: staff (alias: xnob)(level, code, id, salary) managers(status, code, date, value) Task: Find amount from staff where a matching record exists in managers with the same status. SQL:
SELECT amount FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = xnob.status );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "xnob", "inner_alias": "hac", "proj_col": "amount", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_03380
train
v1
Schema: departments (alias: dov)(amount, code, type, value) shipments(value, date, type, status) Task: Select amount from departments where type exists in shipments for the same status. SQL:
SELECT amount FROM departments AS dov WHERE type IN ( SELECT type FROM shipments AS vnob WHERE vnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "type", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03381
train
v2
Schema: orders (alias: kab)(type, level, date, salary) regions(id, salary, date, name) Task: Retrieve salary from orders that have at least one corresponding entry in regions sharing the same level. SQL:
SELECT salary 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": "salary", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03382
train
v3
Schema: shipments (alias: vnob)(code, id, name, salary) categories(salary, code, type, date) Task: Retrieve code from shipments with salary above the AVG(amount) of categories rows sharing the same level. SQL:
SELECT code FROM shipments AS vnob WHERE salary > ( SELECT AVG(amount) FROM categories AS egiv WHERE egiv.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "categories", "outer_alias": "vnob", "inner_alias": "egiv", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_03383
train
v2
Schema: accounts (alias: jac)(amount, value, level, name) transactions(value, salary, amount, level) Task: Retrieve salary from accounts that have at least one corresponding entry in transactions sharing the same level. SQL:
SELECT salary FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = jac.level );
{ "outer_table": "accounts", "inner_table": "transactions", "outer_alias": "jac", "inner_alias": "gev", "proj_col": "salary", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03384
train
v2
Schema: requests (alias: ejof)(amount, type, value, name) departments(type, id, level, code) Task: Retrieve amount from requests that have at least one corresponding entry in departments sharing the same status. SQL:
SELECT amount FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = ejof.status );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "amount", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_03385
train
v1
Schema: departments (alias: dov)(level, code, id, name) sales(status, code, id, level) Task: Find id from departments where id appears in sales entries with matching id. SQL:
SELECT id FROM departments AS dov WHERE id IN ( SELECT id FROM sales AS cif WHERE cif.id = dov.id );
{ "outer_table": "departments", "inner_table": "sales", "outer_alias": "dov", "inner_alias": "cif", "proj_col": "id", "filter_col": "id", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03386
train
v1
Schema: products (alias: nad)(value, id, level, name) branches(value, salary, date, level) Task: Retrieve value from products whose level is found in branches rows where code matches the outer record. SQL:
SELECT value FROM products AS nad WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.code = nad.code );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03387
train
v1
Schema: requests (alias: ejof)(amount, id, name, date) shipments(value, level, type, id) Task: Select value from requests where status exists in shipments for the same status. SQL:
SELECT value FROM requests AS ejof WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "shipments", "outer_alias": "ejof", "inner_alias": "vnob", "proj_col": "value", "filter_col": "status", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_03388
train
v1
Schema: transactions (alias: gev)(type, id, status, salary) customers(value, code, name, level) Task: Select salary from transactions where level exists in customers for the same type. SQL:
SELECT salary FROM transactions AS gev WHERE level IN ( SELECT level FROM customers AS lex WHERE lex.type = gev.type );
{ "outer_table": "transactions", "inner_table": "customers", "outer_alias": "gev", "inner_alias": "lex", "proj_col": "salary", "filter_col": "level", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03389
train
v2
Schema: branches (alias: agov)(level, code, salary, amount) employees(level, salary, amount, date) Task: Retrieve amount from branches that have at least one corresponding entry in employees sharing the same code. SQL:
SELECT amount FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.code = agov.code );
{ "outer_table": "branches", "inner_table": "employees", "outer_alias": "agov", "inner_alias": "bev", "proj_col": "amount", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_03390
train
v2
Schema: tasks (alias: znob)(type, name, amount, salary) sales(amount, level, name, salary) Task: Find salary from tasks where a matching record exists in sales with the same type. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = znob.type );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "znob", "inner_alias": "cif", "proj_col": "salary", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03391
train
v3
Schema: projects (alias: uliv)(date, value, status, name) transactions(type, level, id, name) Task: Retrieve code from projects with amount above the COUNT(salary) of transactions rows sharing the same level. SQL:
SELECT code FROM projects AS uliv WHERE amount > ( SELECT COUNT(salary) FROM transactions AS gev WHERE gev.level = uliv.level );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_03392
train
v2
Schema: tasks (alias: znob)(status, type, level, salary) requests(amount, value, code, level) Task: Retrieve salary from tasks that have at least one corresponding entry in requests sharing the same code. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = znob.code );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "salary", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_03393
train
v3
Schema: invoices (alias: fal)(type, level, salary, value) regions(id, level, amount, salary) Task: Retrieve name from invoices with value above the MIN(salary) of regions rows sharing the same status. SQL:
SELECT name FROM invoices AS fal WHERE value > ( SELECT MIN(salary) FROM regions AS okiv WHERE okiv.status = fal.status );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03394
train
v2
Schema: schedules (alias: vmob)(date, amount, type, id) customers(status, name, type, level) Task: Retrieve salary from schedules that have at least one corresponding entry in customers sharing the same status. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "vmob", "inner_alias": "lex", "proj_col": "salary", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_03395
train
v3
Schema: orders (alias: kab)(code, value, level, type) requests(level, status, amount, id) Task: Retrieve code from orders with value above the COUNT(amount) of requests rows sharing the same type. SQL:
SELECT code FROM orders AS kab WHERE value > ( SELECT COUNT(amount) FROM requests AS ejof WHERE ejof.type = kab.type );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03396
train
v3
Schema: managers (alias: hac)(status, code, level, id) schedules(salary, status, type, value) Task: Find code from managers where value exceeds the minimum salary from schedules for the same id. SQL:
SELECT code FROM managers AS hac WHERE value > ( SELECT MIN(salary) FROM schedules AS vmob WHERE vmob.id = hac.id );
{ "outer_table": "managers", "inner_table": "schedules", "outer_alias": "hac", "inner_alias": "vmob", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03397
train
v1
Schema: requests (alias: ejof)(code, date, level, name) invoices(value, name, code, id) Task: Retrieve code from requests whose level is found in invoices rows where status matches the outer record. SQL:
SELECT code FROM requests AS ejof WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.status = ejof.status );
{ "outer_table": "requests", "inner_table": "invoices", "outer_alias": "ejof", "inner_alias": "fal", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_03398
train
v3
Schema: managers (alias: hac)(amount, status, date, code) employees(id, date, type, code) Task: Retrieve name from managers with salary above the MIN(value) of employees rows sharing the same type. SQL:
SELECT name FROM managers AS hac WHERE salary > ( SELECT MIN(value) FROM employees AS bev WHERE bev.type = hac.type );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_03399
train