variant
stringclasses
3 values
prompt
stringlengths
163
234
sql
stringlengths
104
140
metadata
unknown
token_group
stringclasses
2 values
id
stringlengths
24
24
split
stringclasses
1 value
v3
Schema: sales (alias: cif)(id, status, value, level) customers(status, name, type, value) Task: Find salary from sales where amount exceeds the total value from customers for the same code. SQL:
SELECT salary FROM sales AS cif WHERE amount > ( SELECT SUM(value) FROM customers AS lex WHERE lex.code = cif.code );
{ "outer_table": "sales", "inner_table": "customers", "outer_alias": "cif", "inner_alias": "lex", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00400
train
v1
Schema: shipments (alias: vnob)(level, id, value, code) departments(date, salary, level, status) Task: Select id from shipments where id exists in departments for the same type. SQL:
SELECT id FROM shipments AS vnob WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00401
train
v3
Schema: regions (alias: okiv)(id, level, value, date) transactions(value, amount, date, level) Task: Find amount from regions where salary exceeds the average salary from transactions for the same level. SQL:
SELECT amount FROM regions AS okiv WHERE salary > ( SELECT AVG(salary) FROM transactions AS gev WHERE gev.level = okiv.level );
{ "outer_table": "regions", "inner_table": "transactions", "outer_alias": "okiv", "inner_alias": "gev", "proj_col": "amount", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00402
train
v1
Schema: schedules (alias: vmob)(value, name, date, salary) staff(status, id, value, code) Task: Retrieve id from schedules whose id is found in staff rows where id matches the outer record. SQL:
SELECT id FROM schedules AS vmob WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "id", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00403
train
v2
Schema: transactions (alias: gev)(type, name, status, code) branches(code, amount, salary, date) Task: Find salary from transactions where a matching record exists in branches with the same status. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = gev.status );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "gev", "inner_alias": "agov", "proj_col": "salary", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00404
train
v3
Schema: shipments (alias: vnob)(name, value, code, level) schedules(date, amount, type, status) Task: Retrieve value from shipments with amount above the AVG(amount) of schedules rows sharing the same status. SQL:
SELECT value FROM shipments AS vnob WHERE amount > ( SELECT AVG(amount) FROM schedules AS vmob WHERE vmob.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00405
train
v1
Schema: products (alias: nad)(salary, type, code, level) staff(salary, date, level, type) Task: Retrieve id from products whose status is found in staff rows where level matches the outer record. SQL:
SELECT id FROM products AS nad WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.level = nad.level );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "id", "filter_col": "status", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00406
train
v1
Schema: schedules (alias: vmob)(id, code, level, value) categories(type, id, amount, value) Task: Select code from schedules where code exists in categories for the same status. SQL:
SELECT code FROM schedules AS vmob WHERE code IN ( SELECT code FROM categories AS egiv WHERE egiv.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "code", "filter_col": "code", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00407
train
v3
Schema: branches (alias: agov)(salary, amount, name, code) managers(value, level, type, name) Task: Find amount from branches where value exceeds the count of value from managers for the same code. SQL:
SELECT amount FROM branches AS agov WHERE value > ( SELECT COUNT(value) FROM managers AS hac WHERE hac.code = agov.code );
{ "outer_table": "branches", "inner_table": "managers", "outer_alias": "agov", "inner_alias": "hac", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_00408
train
v1
Schema: customers (alias: lex)(date, code, status, amount) categories(type, level, id, code) Task: Select code from customers where type exists in categories for the same code. SQL:
SELECT code FROM customers AS lex WHERE type IN ( SELECT type FROM categories AS egiv WHERE egiv.code = lex.code );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00409
train
v1
Schema: accounts (alias: jac)(value, status, amount, date) employees(name, level, amount, code) Task: Select salary from accounts where type exists in employees for the same status. SQL:
SELECT salary FROM accounts AS jac WHERE type IN ( SELECT type FROM employees AS bev WHERE bev.status = jac.status );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "salary", "filter_col": "type", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00410
train
v2
Schema: products (alias: nad)(type, status, value, level) staff(date, type, name, salary) Task: Retrieve amount from products that have at least one corresponding entry in staff sharing the same type. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.type = nad.type );
{ "outer_table": "products", "inner_table": "staff", "outer_alias": "nad", "inner_alias": "xnob", "proj_col": "amount", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00411
train
v2
Schema: customers (alias: lex)(value, level, id, date) tasks(code, type, name, date) Task: Find code from customers where a matching record exists in tasks with the same status. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = lex.status );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "code", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00412
train
v1
Schema: transactions (alias: gev)(amount, date, salary, value) products(value, amount, name, date) Task: Find salary from transactions where status appears in products entries with matching status. SQL:
SELECT salary FROM transactions AS gev WHERE status IN ( SELECT status FROM products AS nad WHERE nad.status = gev.status );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "salary", "filter_col": "status", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00413
train
v3
Schema: items (alias: ikob)(code, id, type, level) accounts(type, level, status, name) Task: Find name from items where value exceeds the count of salary from accounts for the same status. SQL:
SELECT name FROM items AS ikob WHERE value > ( SELECT COUNT(salary) FROM accounts AS jac WHERE jac.status = ikob.status );
{ "outer_table": "items", "inner_table": "accounts", "outer_alias": "ikob", "inner_alias": "jac", "proj_col": "name", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00414
train
v1
Schema: transactions (alias: gev)(level, salary, code, value) managers(amount, name, salary, level) Task: Select value from transactions where type exists in managers for the same level. SQL:
SELECT value FROM transactions AS gev WHERE type IN ( SELECT type FROM managers AS hac WHERE hac.level = gev.level );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "gev", "inner_alias": "hac", "proj_col": "value", "filter_col": "type", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00415
train
v1
Schema: products (alias: nad)(date, code, level, amount) managers(id, status, salary, level) Task: Select value from products where id exists in managers for the same status. SQL:
SELECT value FROM products AS nad WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.status = nad.status );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "nad", "inner_alias": "hac", "proj_col": "value", "filter_col": "id", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00416
train
v3
Schema: branches (alias: agov)(amount, date, salary, value) regions(amount, date, id, type) Task: Retrieve id from branches with amount above the AVG(value) of regions rows sharing the same status. SQL:
SELECT id FROM branches AS agov WHERE amount > ( SELECT AVG(value) FROM regions AS okiv WHERE okiv.status = agov.status );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_00417
train
v1
Schema: invoices (alias: fal)(name, type, value, status) accounts(value, date, amount, code) Task: Retrieve amount from invoices whose code is found in accounts rows where level matches the outer record. SQL:
SELECT amount FROM invoices AS fal WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.level = fal.level );
{ "outer_table": "invoices", "inner_table": "accounts", "outer_alias": "fal", "inner_alias": "jac", "proj_col": "amount", "filter_col": "code", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00418
train
v2
Schema: requests (alias: ejof)(salary, type, code, value) projects(date, name, amount, code) Task: Find amount from requests where a matching record exists in projects with the same status. SQL:
SELECT amount FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = ejof.status );
{ "outer_table": "requests", "inner_table": "projects", "outer_alias": "ejof", "inner_alias": "uliv", "proj_col": "amount", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_00419
train
v3
Schema: orders (alias: kab)(name, amount, id, code) regions(name, type, date, salary) Task: Retrieve id from orders with amount above the COUNT(value) of regions rows sharing the same type. SQL:
SELECT id FROM orders AS kab WHERE amount > ( SELECT COUNT(value) FROM regions AS okiv WHERE okiv.type = kab.type );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "kab", "inner_alias": "okiv", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00420
train
v1
Schema: items (alias: ikob)(value, amount, status, date) shipments(id, code, date, level) Task: Retrieve salary from items whose id is found in shipments rows where code matches the outer record. SQL:
SELECT salary FROM items AS ikob WHERE id IN ( SELECT id FROM shipments AS vnob WHERE vnob.code = ikob.code );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "id", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00421
train
v1
Schema: items (alias: ikob)(type, date, level, value) projects(level, type, date, name) Task: Retrieve code from items whose type is found in projects rows where code matches the outer record. SQL:
SELECT code FROM items AS ikob WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.code = ikob.code );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00422
train
v3
Schema: orders (alias: kab)(id, date, status, level) customers(name, status, salary, id) Task: Retrieve amount from orders with value above the AVG(salary) of customers rows sharing the same type. SQL:
SELECT amount FROM orders AS kab WHERE value > ( SELECT AVG(salary) FROM customers AS lex WHERE lex.type = kab.type );
{ "outer_table": "orders", "inner_table": "customers", "outer_alias": "kab", "inner_alias": "lex", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00423
train
v3
Schema: staff (alias: xnob)(status, name, id, salary) sales(level, value, salary, type) Task: Retrieve value from staff with value above the MIN(value) of sales rows sharing the same status. SQL:
SELECT value FROM staff AS xnob WHERE value > ( SELECT MIN(value) FROM sales AS cif WHERE cif.status = xnob.status );
{ "outer_table": "staff", "inner_table": "sales", "outer_alias": "xnob", "inner_alias": "cif", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00424
train
v1
Schema: invoices (alias: fal)(name, value, id, status) requests(code, id, status, name) Task: Select amount from invoices where id exists in requests for the same level. SQL:
SELECT amount FROM invoices AS fal WHERE id IN ( SELECT id FROM requests AS ejof WHERE ejof.level = fal.level );
{ "outer_table": "invoices", "inner_table": "requests", "outer_alias": "fal", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "id", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00425
train
v2
Schema: schedules (alias: vmob)(name, amount, id, salary) customers(amount, level, date, name) Task: Retrieve amount from schedules that have at least one corresponding entry in customers sharing the same status. SQL:
SELECT amount 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": "amount", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00426
train
v2
Schema: categories (alias: egiv)(amount, code, value, type) tasks(name, value, amount, id) Task: Find amount from categories where a matching record exists in tasks with the same status. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "tasks", "outer_alias": "egiv", "inner_alias": "znob", "proj_col": "amount", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_00427
train
v1
Schema: items (alias: ikob)(value, name, type, date) departments(name, value, status, id) Task: Select value from items where id exists in departments for the same level. SQL:
SELECT value FROM items AS ikob WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.level = ikob.level );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "ikob", "inner_alias": "dov", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00428
train
v3
Schema: staff (alias: xnob)(id, date, amount, level) schedules(id, level, amount, name) Task: Find salary from staff where value exceeds the maximum value from schedules for the same status. SQL:
SELECT salary FROM staff AS xnob WHERE value > ( SELECT MAX(value) FROM schedules AS vmob WHERE vmob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "schedules", "outer_alias": "xnob", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00429
train
v3
Schema: categories (alias: egiv)(amount, value, name, type) branches(amount, id, salary, value) Task: Retrieve salary from categories with salary above the AVG(value) of branches rows sharing the same id. SQL:
SELECT salary FROM categories AS egiv WHERE salary > ( SELECT AVG(value) FROM branches AS agov WHERE agov.id = egiv.id );
{ "outer_table": "categories", "inner_table": "branches", "outer_alias": "egiv", "inner_alias": "agov", "proj_col": "salary", "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_00430
train
v1
Schema: managers (alias: hac)(name, status, amount, date) accounts(salary, type, id, code) Task: Select salary from managers where id exists in accounts for the same code. SQL:
SELECT salary FROM managers AS hac WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.code = hac.code );
{ "outer_table": "managers", "inner_table": "accounts", "outer_alias": "hac", "inner_alias": "jac", "proj_col": "salary", "filter_col": "id", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00431
train
v1
Schema: schedules (alias: vmob)(type, id, value, amount) tasks(value, status, salary, amount) Task: Retrieve code from schedules whose id is found in tasks rows where type matches the outer record. SQL:
SELECT code FROM schedules AS vmob WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "code", "filter_col": "id", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00432
train
v3
Schema: sales (alias: cif)(id, code, amount, salary) shipments(status, amount, value, type) Task: Find value from sales where salary exceeds the count of salary from shipments for the same status. SQL:
SELECT value FROM sales AS cif WHERE salary > ( SELECT COUNT(salary) FROM shipments AS vnob WHERE vnob.status = cif.status );
{ "outer_table": "sales", "inner_table": "shipments", "outer_alias": "cif", "inner_alias": "vnob", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00433
train
v1
Schema: shipments (alias: vnob)(id, salary, code, level) items(salary, type, code, name) Task: Find code from shipments where level appears in items entries with matching status. SQL:
SELECT code FROM shipments AS vnob WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "items", "outer_alias": "vnob", "inner_alias": "ikob", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00434
train
v2
Schema: products (alias: nad)(value, status, level, code) regions(type, name, id, status) Task: Find code from products where a matching record exists in regions with the same status. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = nad.status );
{ "outer_table": "products", "inner_table": "regions", "outer_alias": "nad", "inner_alias": "okiv", "proj_col": "code", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00435
train
v1
Schema: departments (alias: dov)(code, value, salary, level) tasks(value, salary, code, name) Task: Select value from departments where code exists in tasks for the same type. SQL:
SELECT value FROM departments AS dov WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.type = dov.type );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dov", "inner_alias": "znob", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00436
train
v1
Schema: accounts (alias: jac)(status, value, code, level) departments(value, status, date, id) Task: Select value from accounts where id exists in departments for the same level. SQL:
SELECT value FROM accounts AS jac WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.level = jac.level );
{ "outer_table": "accounts", "inner_table": "departments", "outer_alias": "jac", "inner_alias": "dov", "proj_col": "value", "filter_col": "id", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00437
train
v1
Schema: items (alias: ikob)(status, name, type, salary) sales(code, id, date, value) Task: Retrieve name from items whose id is found in sales rows where id matches the outer record. SQL:
SELECT name FROM items AS ikob WHERE id IN ( SELECT id FROM sales AS cif WHERE cif.id = ikob.id );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "name", "filter_col": "id", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00438
train
v3
Schema: items (alias: ikob)(id, amount, status, type) projects(code, status, date, level) Task: Retrieve salary from items with value above the AVG(amount) of projects rows sharing the same code. SQL:
SELECT salary FROM items AS ikob WHERE value > ( SELECT AVG(amount) FROM projects AS uliv WHERE uliv.code = ikob.code );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00439
train
v2
Schema: orders (alias: kab)(level, amount, salary, date) accounts(level, type, date, id) Task: Find amount from orders where a matching record exists in accounts with the same code. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = kab.code );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "kab", "inner_alias": "jac", "proj_col": "amount", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00440
train
v2
Schema: tasks (alias: znob)(value, name, id, status) projects(type, date, name, salary) Task: Retrieve name from tasks that have at least one corresponding entry in projects sharing the same type. SQL:
SELECT name FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = znob.type );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "name", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00441
train
v3
Schema: tasks (alias: znob)(amount, status, salary, level) transactions(value, code, status, date) Task: Retrieve id from tasks with value above the MAX(value) of transactions rows sharing the same type. SQL:
SELECT id FROM tasks AS znob WHERE value > ( SELECT MAX(value) FROM transactions AS gev WHERE gev.type = znob.type );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00442
train
v2
Schema: sales (alias: cif)(type, name, id, amount) departments(code, value, level, type) Task: Find salary from sales where a matching record exists in departments with the same status. SQL:
SELECT salary FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.status = cif.status );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "salary", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00443
train
v2
Schema: orders (alias: kab)(code, value, amount, level) accounts(id, code, date, status) Task: Find code from orders where a matching record exists in accounts with the same type. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.type = kab.type );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "kab", "inner_alias": "jac", "proj_col": "code", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00444
train
v2
Schema: categories (alias: egiv)(date, salary, level, id) items(type, value, name, code) Task: Find id from categories where a matching record exists in items with the same code. SQL:
SELECT id FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = egiv.code );
{ "outer_table": "categories", "inner_table": "items", "outer_alias": "egiv", "inner_alias": "ikob", "proj_col": "id", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_00445
train
v2
Schema: orders (alias: kab)(id, level, salary, amount) sales(date, salary, status, level) Task: Retrieve salary from orders that have at least one corresponding entry in sales sharing the same id. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = kab.id );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "salary", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00446
train
v1
Schema: transactions (alias: gev)(status, amount, type, salary) departments(level, name, id, salary) Task: Select amount from transactions where type exists in departments for the same id. SQL:
SELECT amount FROM transactions AS gev WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.id = gev.id );
{ "outer_table": "transactions", "inner_table": "departments", "outer_alias": "gev", "inner_alias": "dov", "proj_col": "amount", "filter_col": "type", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00447
train
v2
Schema: products (alias: nad)(name, type, id, code) items(amount, date, status, salary) Task: Retrieve code from products that have at least one corresponding entry in items sharing the same code. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = nad.code );
{ "outer_table": "products", "inner_table": "items", "outer_alias": "nad", "inner_alias": "ikob", "proj_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00448
train
v1
Schema: departments (alias: dov)(date, type, salary, value) items(id, date, status, value) Task: Find name from departments where level appears in items entries with matching code. SQL:
SELECT name FROM departments AS dov WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.code = dov.code );
{ "outer_table": "departments", "inner_table": "items", "outer_alias": "dov", "inner_alias": "ikob", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00449
train
v1
Schema: requests (alias: ejof)(value, name, level, date) departments(salary, id, type, amount) Task: Retrieve amount from requests whose id is found in departments rows where type matches the outer record. SQL:
SELECT amount FROM requests AS ejof WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.type = ejof.type );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_00450
train
v3
Schema: schedules (alias: vmob)(date, amount, value, name) categories(level, value, status, id) Task: Find name from schedules where value exceeds the maximum amount from categories for the same code. SQL:
SELECT name FROM schedules AS vmob WHERE value > ( SELECT MAX(amount) FROM categories AS egiv WHERE egiv.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_00451
train
v2
Schema: staff (alias: xnob)(salary, date, level, status) customers(id, status, name, code) Task: Find value from staff where a matching record exists in customers with the same status. SQL:
SELECT value FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = xnob.status );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "value", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00452
train
v1
Schema: staff (alias: xnob)(status, salary, id, name) shipments(id, level, type, name) Task: Find id from staff where status appears in shipments entries with matching status. SQL:
SELECT id FROM staff AS xnob WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00453
train
v3
Schema: managers (alias: hac)(id, code, name, value) departments(name, status, level, date) Task: Retrieve salary from managers with value above the MAX(salary) of departments rows sharing the same code. SQL:
SELECT salary FROM managers AS hac WHERE value > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.code = hac.code );
{ "outer_table": "managers", "inner_table": "departments", "outer_alias": "hac", "inner_alias": "dov", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00454
train
v1
Schema: accounts (alias: jac)(status, value, date, code) tasks(id, salary, level, type) Task: Retrieve amount from accounts whose level is found in tasks rows where type matches the outer record. SQL:
SELECT amount FROM accounts AS jac WHERE level IN ( SELECT level FROM tasks AS znob WHERE znob.type = jac.type );
{ "outer_table": "accounts", "inner_table": "tasks", "outer_alias": "jac", "inner_alias": "znob", "proj_col": "amount", "filter_col": "level", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00455
train
v3
Schema: regions (alias: okiv)(code, date, salary, id) branches(type, name, level, code) Task: Find value from regions where salary exceeds the average salary from branches for the same status. SQL:
SELECT value FROM regions AS okiv WHERE salary > ( SELECT AVG(salary) FROM branches AS agov WHERE agov.status = okiv.status );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "okiv", "inner_alias": "agov", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00456
train
v2
Schema: invoices (alias: fal)(level, type, code, date) branches(date, type, id, name) Task: Find value from invoices where a matching record exists in branches with the same type. SQL:
SELECT value FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.type = fal.type );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "value", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00457
train
v1
Schema: orders (alias: kab)(status, amount, date, value) items(name, amount, level, id) Task: Retrieve name from orders whose status is found in items rows where code matches the outer record. SQL:
SELECT name FROM orders AS kab WHERE status IN ( SELECT status FROM items AS ikob WHERE ikob.code = kab.code );
{ "outer_table": "orders", "inner_table": "items", "outer_alias": "kab", "inner_alias": "ikob", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00458
train
v2
Schema: projects (alias: uliv)(value, code, name, salary) schedules(status, id, date, salary) Task: Find salary from projects where a matching record exists in schedules with the same code. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "salary", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_00459
train
v3
Schema: employees (alias: bev)(type, value, level, amount) customers(id, value, date, salary) Task: Retrieve amount from employees with amount above the MAX(value) of customers rows sharing the same type. SQL:
SELECT amount FROM employees AS bev WHERE amount > ( SELECT MAX(value) FROM customers AS lex WHERE lex.type = bev.type );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "bev", "inner_alias": "lex", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00460
train
v1
Schema: employees (alias: bev)(type, id, date, status) projects(amount, status, salary, level) Task: Find salary from employees where type appears in projects entries with matching level. SQL:
SELECT salary FROM employees AS bev WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.level = bev.level );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "type", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00461
train
v1
Schema: items (alias: ikob)(type, status, level, salary) categories(type, code, date, value) Task: Find amount from items where id appears in categories entries with matching type. SQL:
SELECT amount FROM items AS ikob WHERE id IN ( SELECT id FROM categories AS egiv WHERE egiv.type = ikob.type );
{ "outer_table": "items", "inner_table": "categories", "outer_alias": "ikob", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "id", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00462
train
v3
Schema: sales (alias: cif)(value, type, salary, level) staff(amount, status, code, salary) Task: Find id from sales where salary exceeds the average salary from staff for the same type. SQL:
SELECT id FROM sales AS cif WHERE salary > ( SELECT AVG(salary) FROM staff AS xnob WHERE xnob.type = cif.type );
{ "outer_table": "sales", "inner_table": "staff", "outer_alias": "cif", "inner_alias": "xnob", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00463
train
v2
Schema: items (alias: ikob)(name, code, salary, level) projects(code, amount, type, level) Task: Find value from items where a matching record exists in projects with the same type. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = ikob.type );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "value", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00464
train
v3
Schema: customers (alias: lex)(type, name, id, status) departments(date, status, level, type) Task: Retrieve code from customers with salary above the AVG(value) of departments rows sharing the same status. SQL:
SELECT code FROM customers AS lex WHERE salary > ( SELECT AVG(value) FROM departments AS dov WHERE dov.status = lex.status );
{ "outer_table": "customers", "inner_table": "departments", "outer_alias": "lex", "inner_alias": "dov", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00465
train
v2
Schema: orders (alias: kab)(date, value, type, salary) requests(date, type, amount, status) Task: Retrieve code from orders that have at least one corresponding entry in requests sharing the same status. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = kab.status );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "code", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00466
train
v3
Schema: transactions (alias: gev)(code, name, id, salary) invoices(status, level, type, value) Task: Retrieve code from transactions with salary above the SUM(value) of invoices rows sharing the same code. SQL:
SELECT code FROM transactions AS gev WHERE salary > ( SELECT SUM(value) FROM invoices AS fal WHERE fal.code = gev.code );
{ "outer_table": "transactions", "inner_table": "invoices", "outer_alias": "gev", "inner_alias": "fal", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00467
train
v1
Schema: orders (alias: kab)(name, status, salary, level) staff(salary, level, id, type) Task: Retrieve name from orders whose level is found in staff rows where level matches the outer record. SQL:
SELECT name FROM orders AS kab WHERE level IN ( SELECT level FROM staff AS xnob WHERE xnob.level = kab.level );
{ "outer_table": "orders", "inner_table": "staff", "outer_alias": "kab", "inner_alias": "xnob", "proj_col": "name", "filter_col": "level", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00468
train
v3
Schema: tasks (alias: znob)(status, code, date, level) managers(code, amount, value, name) Task: Find code from tasks where amount exceeds the count of salary from managers for the same code. SQL:
SELECT code FROM tasks AS znob WHERE amount > ( SELECT COUNT(salary) FROM managers AS hac WHERE hac.code = znob.code );
{ "outer_table": "tasks", "inner_table": "managers", "outer_alias": "znob", "inner_alias": "hac", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00469
train
v2
Schema: accounts (alias: jac)(salary, date, level, value) transactions(level, type, date, name) Task: Retrieve code from accounts that have at least one corresponding entry in transactions sharing the same level. SQL:
SELECT code 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": "code", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00470
train
v3
Schema: employees (alias: bev)(value, type, id, salary) products(value, name, id, level) Task: Find id from employees where value exceeds the count of salary from products for the same status. SQL:
SELECT id FROM employees AS bev WHERE value > ( SELECT COUNT(salary) FROM products AS nad WHERE nad.status = bev.status );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00471
train
v3
Schema: staff (alias: xnob)(name, type, level, code) tasks(value, salary, date, id) Task: Find salary from staff where salary exceeds the minimum salary from tasks for the same code. SQL:
SELECT salary FROM staff AS xnob WHERE salary > ( SELECT MIN(salary) FROM tasks AS znob WHERE znob.code = xnob.code );
{ "outer_table": "staff", "inner_table": "tasks", "outer_alias": "xnob", "inner_alias": "znob", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00472
train
v2
Schema: regions (alias: okiv)(status, name, salary, type) products(level, id, value, amount) Task: Retrieve name from regions that have at least one corresponding entry in products sharing the same status. SQL:
SELECT name FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = okiv.status );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "name", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00473
train
v2
Schema: accounts (alias: jac)(status, type, level, amount) shipments(type, id, level, name) Task: Find code from accounts where a matching record exists in shipments with the same status. SQL:
SELECT code FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "code", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00474
train
v2
Schema: accounts (alias: jac)(date, status, name, code) regions(status, value, amount, name) Task: Find name from accounts where a matching record exists in regions with the same code. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = jac.code );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "name", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00475
train
v2
Schema: employees (alias: bev)(salary, date, code, value) requests(type, amount, salary, value) Task: Retrieve code from employees that have at least one corresponding entry in requests sharing the same code. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = bev.code );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "code", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00476
train
v3
Schema: shipments (alias: vnob)(type, status, code, amount) departments(name, id, status, level) Task: Retrieve id from shipments with value above the MAX(salary) of departments rows sharing the same id. SQL:
SELECT id FROM shipments AS vnob WHERE value > ( SELECT MAX(salary) FROM departments AS dov WHERE dov.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00477
train
v1
Schema: shipments (alias: vnob)(name, salary, type, id) departments(code, amount, date, value) Task: Select code from shipments where level exists in departments for the same code. SQL:
SELECT code FROM shipments AS vnob WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00478
train
v2
Schema: regions (alias: okiv)(status, level, id, salary) staff(id, name, type, value) Task: Find code from regions where a matching record exists in staff with the same id. SQL:
SELECT code FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = okiv.id );
{ "outer_table": "regions", "inner_table": "staff", "outer_alias": "okiv", "inner_alias": "xnob", "proj_col": "code", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00479
train
v3
Schema: items (alias: ikob)(amount, id, status, value) regions(type, name, code, value) Task: Find code from items where salary exceeds the count of salary from regions for the same type. SQL:
SELECT code FROM items AS ikob WHERE salary > ( SELECT COUNT(salary) FROM regions AS okiv WHERE okiv.type = ikob.type );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_00480
train
v3
Schema: tasks (alias: znob)(salary, date, code, value) categories(id, name, status, type) Task: Find salary from tasks where value exceeds the minimum amount from categories for the same type. SQL:
SELECT salary FROM tasks AS znob WHERE value > ( SELECT MIN(amount) FROM categories AS egiv WHERE egiv.type = znob.type );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00481
train
v2
Schema: staff (alias: xnob)(level, status, id, value) regions(amount, code, salary, type) Task: Retrieve value from staff that have at least one corresponding entry in regions sharing the same status. SQL:
SELECT value FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = xnob.status );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "value", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00482
train
v2
Schema: staff (alias: xnob)(name, level, value, status) employees(salary, level, status, amount) Task: Find salary from staff where a matching record exists in employees with the same level. SQL:
SELECT salary FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = xnob.level );
{ "outer_table": "staff", "inner_table": "employees", "outer_alias": "xnob", "inner_alias": "bev", "proj_col": "salary", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_00483
train
v3
Schema: shipments (alias: vnob)(date, code, salary, amount) sales(type, salary, amount, level) Task: Retrieve value from shipments with value above the AVG(value) of sales rows sharing the same type. SQL:
SELECT value FROM shipments AS vnob WHERE value > ( SELECT AVG(value) FROM sales AS cif WHERE cif.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00484
train
v2
Schema: employees (alias: bev)(date, id, type, value) customers(value, id, level, type) Task: Find value from employees where a matching record exists in customers with the same status. SQL:
SELECT value FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.status = bev.status );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "bev", "inner_alias": "lex", "proj_col": "value", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00485
train
v2
Schema: tasks (alias: znob)(type, value, code, salary) employees(status, amount, salary, id) Task: Find value from tasks where a matching record exists in employees with the same id. SQL:
SELECT value FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = znob.id );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "value", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00486
train
v2
Schema: sales (alias: cif)(type, id, code, date) orders(status, salary, type, id) Task: Find amount from sales where a matching record exists in orders with the same level. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = cif.level );
{ "outer_table": "sales", "inner_table": "orders", "outer_alias": "cif", "inner_alias": "kab", "proj_col": "amount", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00487
train
v3
Schema: regions (alias: okiv)(level, id, status, salary) sales(level, amount, id, type) Task: Retrieve name from regions with value above the COUNT(amount) of sales rows sharing the same level. SQL:
SELECT name FROM regions AS okiv WHERE value > ( SELECT COUNT(amount) FROM sales AS cif WHERE cif.level = okiv.level );
{ "outer_table": "regions", "inner_table": "sales", "outer_alias": "okiv", "inner_alias": "cif", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_00488
train
v2
Schema: tasks (alias: znob)(date, amount, value, type) items(id, level, code, amount) Task: Retrieve id from tasks that have at least one corresponding entry in items sharing the same id. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.id = znob.id );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "id", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00489
train
v3
Schema: shipments (alias: vnob)(value, salary, name, amount) schedules(amount, name, salary, code) Task: Retrieve salary from shipments with salary above the AVG(amount) of schedules rows sharing the same code. SQL:
SELECT salary FROM shipments AS vnob WHERE salary > ( SELECT AVG(amount) FROM schedules AS vmob WHERE vmob.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "schedules", "outer_alias": "vnob", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_00490
train
v2
Schema: employees (alias: bev)(level, code, status, salary) requests(level, code, id, amount) Task: Find salary from employees where a matching record exists in requests with the same status. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = bev.status );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "salary", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00491
train
v3
Schema: orders (alias: kab)(salary, id, type, amount) schedules(salary, code, type, level) Task: Retrieve salary from orders with value above the COUNT(amount) of schedules rows sharing the same type. SQL:
SELECT salary FROM orders AS kab WHERE value > ( SELECT COUNT(amount) FROM schedules AS vmob WHERE vmob.type = kab.type );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "salary", "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_00492
train
v2
Schema: employees (alias: bev)(value, name, amount, code) customers(salary, value, code, type) Task: Retrieve salary from employees that have at least one corresponding entry in customers sharing the same level. SQL:
SELECT salary FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.level = bev.level );
{ "outer_table": "employees", "inner_table": "customers", "outer_alias": "bev", "inner_alias": "lex", "proj_col": "salary", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00493
train
v1
Schema: accounts (alias: jac)(name, value, status, level) employees(salary, amount, value, code) Task: Find name from accounts where status appears in employees entries with matching code. SQL:
SELECT name FROM accounts AS jac WHERE status IN ( SELECT status FROM employees AS bev WHERE bev.code = jac.code );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00494
train
v2
Schema: products (alias: nad)(salary, id, status, value) branches(date, status, type, code) Task: Find salary from products where a matching record exists in branches with the same id. SQL:
SELECT salary FROM products AS nad WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = nad.id );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "salary", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00495
train
v3
Schema: orders (alias: kab)(amount, level, salary, name) customers(salary, code, level, id) Task: Find salary from orders where value exceeds the average salary from customers for the same type. SQL:
SELECT salary FROM orders AS kab WHERE value > ( SELECT AVG(salary) FROM customers AS lex WHERE lex.type = kab.type );
{ "outer_table": "orders", "inner_table": "customers", "outer_alias": "kab", "inner_alias": "lex", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00496
train
v3
Schema: tasks (alias: znob)(status, name, salary, amount) items(type, code, amount, value) Task: Find value from tasks where salary exceeds the count of value from items for the same status. SQL:
SELECT value FROM tasks AS znob WHERE salary > ( SELECT COUNT(value) FROM items AS ikob WHERE ikob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "items", "outer_alias": "znob", "inner_alias": "ikob", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_00497
train
v1
Schema: requests (alias: ejof)(code, amount, date, salary) products(salary, level, value, amount) Task: Find salary from requests where level appears in products entries with matching level. SQL:
SELECT salary FROM requests AS ejof WHERE level IN ( SELECT level FROM products AS nad WHERE nad.level = ejof.level );
{ "outer_table": "requests", "inner_table": "products", "outer_alias": "ejof", "inner_alias": "nad", "proj_col": "salary", "filter_col": "level", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_00498
train
v3
Schema: managers (alias: hac)(name, code, level, amount) branches(level, id, status, salary) Task: Retrieve value from managers with value above the COUNT(amount) of branches rows sharing the same level. SQL:
SELECT value FROM managers AS hac WHERE value > ( SELECT COUNT(amount) FROM branches AS agov WHERE agov.level = hac.level );
{ "outer_table": "managers", "inner_table": "branches", "outer_alias": "hac", "inner_alias": "agov", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_00499
train