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: items (alias: ikob)(amount, code, date, level) customers(level, salary, amount, id) Task: Find id from items where a matching record exists in customers with the same type. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = ikob.type );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "id", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02500
train
v3
Schema: employees (alias: bev)(id, type, value, amount) sales(code, name, amount, status) Task: Retrieve salary from employees with amount above the SUM(salary) of sales rows sharing the same level. SQL:
SELECT salary FROM employees AS bev WHERE amount > ( SELECT SUM(salary) FROM sales AS cif WHERE cif.level = bev.level );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02501
train
v2
Schema: orders (alias: kab)(name, status, type, id) requests(id, level, code, type) Task: Retrieve amount from orders that have at least one corresponding entry in requests sharing the same id. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.id = kab.id );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "amount", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02502
train
v1
Schema: regions (alias: okiv)(name, level, value, amount) products(id, amount, code, name) Task: Select value from regions where level exists in products for the same id. SQL:
SELECT value FROM regions AS okiv WHERE level IN ( SELECT level FROM products AS nad WHERE nad.id = okiv.id );
{ "outer_table": "regions", "inner_table": "products", "outer_alias": "okiv", "inner_alias": "nad", "proj_col": "value", "filter_col": "level", "join_col": "id", "correlated_ref": "okiv.id", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02503
train
v3
Schema: customers (alias: lex)(id, value, salary, level) categories(amount, code, id, level) Task: Retrieve id from customers with amount above the MAX(salary) of categories rows sharing the same type. SQL:
SELECT id FROM customers AS lex WHERE amount > ( SELECT MAX(salary) FROM categories AS egiv WHERE egiv.type = lex.type );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02504
train
v1
Schema: staff (alias: xnob)(salary, type, name, level) sales(amount, value, level, code) Task: Find id from staff where code appears in sales entries with matching type. SQL:
SELECT id FROM staff AS xnob WHERE code IN ( SELECT code FROM sales AS cif WHERE cif.type = xnob.type );
{ "outer_table": "staff", "inner_table": "sales", "outer_alias": "xnob", "inner_alias": "cif", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02505
train
v2
Schema: departments (alias: dov)(level, type, code, name) invoices(id, name, value, level) Task: Retrieve value from departments that have at least one corresponding entry in invoices sharing the same code. SQL:
SELECT value FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = dov.code );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "value", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02506
train
v1
Schema: accounts (alias: jac)(date, value, amount, type) employees(level, amount, status, code) Task: Select salary from accounts where code exists in employees for the same code. SQL:
SELECT salary FROM accounts AS jac WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.code = jac.code );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02507
train
v3
Schema: departments (alias: dov)(name, salary, id, date) transactions(code, level, status, date) Task: Retrieve name from departments with amount above the AVG(amount) of transactions rows sharing the same status. SQL:
SELECT name FROM departments AS dov WHERE amount > ( SELECT AVG(amount) FROM transactions AS gev WHERE gev.status = dov.status );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dov", "inner_alias": "gev", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02508
train
v1
Schema: categories (alias: egiv)(date, amount, code, level) managers(type, status, amount, date) Task: Select name from categories where type exists in managers for the same id. SQL:
SELECT name FROM categories AS egiv WHERE type IN ( SELECT type FROM managers AS hac WHERE hac.id = egiv.id );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "name", "filter_col": "type", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02509
train
v3
Schema: departments (alias: dov)(level, amount, id, status) invoices(code, name, id, status) Task: Retrieve id from departments with salary above the AVG(salary) of invoices rows sharing the same id. SQL:
SELECT id FROM departments AS dov WHERE salary > ( SELECT AVG(salary) FROM invoices AS fal WHERE fal.id = dov.id );
{ "outer_table": "departments", "inner_table": "invoices", "outer_alias": "dov", "inner_alias": "fal", "proj_col": "id", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02510
train
v1
Schema: tasks (alias: znob)(salary, type, value, id) orders(salary, status, date, id) Task: Select amount from tasks where id exists in orders for the same status. SQL:
SELECT amount FROM tasks AS znob WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.status = znob.status );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "amount", "filter_col": "id", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02511
train
v2
Schema: customers (alias: lex)(level, status, type, name) tasks(code, amount, value, salary) Task: Retrieve name from customers that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT name 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": "name", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02512
train
v1
Schema: orders (alias: kab)(salary, code, value, level) branches(value, code, id, amount) Task: Retrieve value from orders whose level is found in branches rows where status matches the outer record. SQL:
SELECT value FROM orders AS kab WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.status = kab.status );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "value", "filter_col": "level", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02513
train
v2
Schema: departments (alias: dov)(code, id, status, amount) orders(id, level, date, salary) Task: Find salary from departments where a matching record exists in orders with the same level. SQL:
SELECT salary FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = dov.level );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dov", "inner_alias": "kab", "proj_col": "salary", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02514
train
v2
Schema: products (alias: nad)(status, amount, code, level) requests(type, date, status, level) Task: Retrieve amount from products that have at least one corresponding entry in requests sharing the same type. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.type = nad.type );
{ "outer_table": "products", "inner_table": "requests", "outer_alias": "nad", "inner_alias": "ejof", "proj_col": "amount", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02515
train
v3
Schema: requests (alias: ejof)(level, salary, code, id) orders(status, name, date, code) Task: Retrieve value from requests with amount above the SUM(salary) of orders rows sharing the same type. SQL:
SELECT value FROM requests AS ejof WHERE amount > ( SELECT SUM(salary) FROM orders AS kab WHERE kab.type = ejof.type );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02516
train
v3
Schema: branches (alias: agov)(name, date, type, salary) transactions(type, code, date, amount) Task: Retrieve code from branches with amount above the AVG(value) of transactions rows sharing the same status. SQL:
SELECT code FROM branches AS agov WHERE amount > ( SELECT AVG(value) FROM transactions AS gev WHERE gev.status = agov.status );
{ "outer_table": "branches", "inner_table": "transactions", "outer_alias": "agov", "inner_alias": "gev", "proj_col": "code", "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_02517
train
v2
Schema: employees (alias: bev)(amount, value, level, salary) requests(amount, name, level, date) Task: Retrieve id from employees that have at least one corresponding entry in requests sharing the same code. SQL:
SELECT id 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": "id", "join_col": "code", "correlated_ref": "bev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02518
train
v1
Schema: branches (alias: agov)(status, name, type, id) departments(level, salary, date, status) Task: Find amount from branches where id appears in departments entries with matching code. SQL:
SELECT amount FROM branches AS agov WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.code = agov.code );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "amount", "filter_col": "id", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02519
train
v3
Schema: categories (alias: egiv)(name, date, type, id) transactions(salary, amount, id, name) Task: Find code from categories where salary exceeds the average value from transactions for the same code. SQL:
SELECT code FROM categories AS egiv WHERE salary > ( SELECT AVG(value) FROM transactions AS gev WHERE gev.code = egiv.code );
{ "outer_table": "categories", "inner_table": "transactions", "outer_alias": "egiv", "inner_alias": "gev", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02520
train
v1
Schema: staff (alias: xnob)(value, name, salary, id) accounts(amount, code, value, type) Task: Select code from staff where id exists in accounts for the same type. SQL:
SELECT code FROM staff AS xnob WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.type = xnob.type );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "code", "filter_col": "id", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02521
train
v1
Schema: items (alias: ikob)(id, salary, name, status) shipments(amount, level, type, name) Task: Select amount from items where code exists in shipments for the same id. SQL:
SELECT amount FROM items AS ikob WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.id = ikob.id );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "code", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02522
train
v1
Schema: requests (alias: ejof)(name, value, amount, level) tasks(value, salary, amount, date) Task: Select id from requests where status exists in tasks for the same code. SQL:
SELECT id FROM requests AS ejof WHERE status IN ( SELECT status FROM tasks AS znob WHERE znob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02523
train
v2
Schema: transactions (alias: gev)(name, id, salary, amount) products(name, type, id, value) Task: Retrieve code from transactions that have at least one corresponding entry in products sharing the same code. SQL:
SELECT code FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = gev.code );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "code", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02524
train
v2
Schema: orders (alias: kab)(name, id, date, type) sales(date, name, id, salary) Task: Retrieve amount from orders that have at least one corresponding entry in sales sharing the same id. SQL:
SELECT amount 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": "amount", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02525
train
v2
Schema: departments (alias: dov)(amount, status, date, name) tasks(id, level, status, date) Task: Retrieve value from departments that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT value FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = dov.id );
{ "outer_table": "departments", "inner_table": "tasks", "outer_alias": "dov", "inner_alias": "znob", "proj_col": "value", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02526
train
v3
Schema: accounts (alias: jac)(code, date, id, status) sales(level, salary, date, status) Task: Retrieve name from accounts with amount above the SUM(value) of sales rows sharing the same code. SQL:
SELECT name FROM accounts AS jac WHERE amount > ( SELECT SUM(value) FROM sales AS cif WHERE cif.code = jac.code );
{ "outer_table": "accounts", "inner_table": "sales", "outer_alias": "jac", "inner_alias": "cif", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02527
train
v2
Schema: employees (alias: bev)(code, type, date, salary) orders(id, value, amount, type) Task: Find amount from employees where a matching record exists in orders with the same type. SQL:
SELECT amount 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": "amount", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02528
train
v3
Schema: orders (alias: kab)(status, code, level, amount) accounts(type, id, code, amount) Task: Find id from orders where salary exceeds the count of amount from accounts for the same id. SQL:
SELECT id FROM orders AS kab WHERE salary > ( SELECT COUNT(amount) FROM accounts AS jac WHERE jac.id = kab.id );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "kab", "inner_alias": "jac", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02529
train
v1
Schema: branches (alias: agov)(value, date, code, status) orders(date, type, value, salary) Task: Find name from branches where code appears in orders entries with matching level. SQL:
SELECT name FROM branches AS agov WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.level = agov.level );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "name", "filter_col": "code", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02530
train
v2
Schema: items (alias: ikob)(id, status, name, type) invoices(amount, salary, status, value) Task: Retrieve salary from items that have at least one corresponding entry in invoices sharing the same id. SQL:
SELECT salary 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": "salary", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02531
train
v1
Schema: customers (alias: lex)(date, name, code, salary) shipments(type, level, name, salary) Task: Select amount from customers where level exists in shipments for the same status. SQL:
SELECT amount FROM customers AS lex WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.status = lex.status );
{ "outer_table": "customers", "inner_table": "shipments", "outer_alias": "lex", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02532
train
v1
Schema: staff (alias: xnob)(date, status, id, level) accounts(value, date, name, status) Task: Retrieve salary from staff whose status is found in accounts rows where level matches the outer record. SQL:
SELECT salary FROM staff AS xnob WHERE status IN ( SELECT status FROM accounts AS jac WHERE jac.level = xnob.level );
{ "outer_table": "staff", "inner_table": "accounts", "outer_alias": "xnob", "inner_alias": "jac", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02533
train
v1
Schema: branches (alias: agov)(type, status, salary, amount) invoices(id, salary, date, level) Task: Find name from branches where code appears in invoices entries with matching level. SQL:
SELECT name FROM branches AS agov WHERE code IN ( SELECT code FROM invoices AS fal WHERE fal.level = agov.level );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "name", "filter_col": "code", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02534
train
v2
Schema: items (alias: ikob)(salary, type, code, value) shipments(status, date, id, amount) Task: Retrieve id from items that have at least one corresponding entry in shipments sharing the same type. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = ikob.type );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "id", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02535
train
v3
Schema: orders (alias: kab)(status, salary, type, level) employees(status, amount, value, code) Task: Retrieve amount from orders with value above the MAX(amount) of employees rows sharing the same type. SQL:
SELECT amount FROM orders AS kab WHERE value > ( SELECT MAX(amount) FROM employees AS bev WHERE bev.type = kab.type );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02536
train
v2
Schema: projects (alias: uliv)(date, status, level, type) transactions(code, type, level, value) Task: Find name from projects where a matching record exists in transactions with the same level. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = uliv.level );
{ "outer_table": "projects", "inner_table": "transactions", "outer_alias": "uliv", "inner_alias": "gev", "proj_col": "name", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02537
train
v2
Schema: products (alias: nad)(amount, level, date, salary) accounts(status, type, name, code) Task: Retrieve code from products that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = nad.code );
{ "outer_table": "products", "inner_table": "accounts", "outer_alias": "nad", "inner_alias": "jac", "proj_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02538
train
v2
Schema: categories (alias: egiv)(value, salary, level, type) customers(status, id, salary, value) Task: Retrieve id from categories that have at least one corresponding entry in customers sharing the same code. SQL:
SELECT id FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = egiv.code );
{ "outer_table": "categories", "inner_table": "customers", "outer_alias": "egiv", "inner_alias": "lex", "proj_col": "id", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02539
train
v3
Schema: employees (alias: bev)(code, value, level, date) projects(name, amount, id, code) Task: Find salary from employees where salary exceeds the maximum salary from projects for the same type. SQL:
SELECT salary FROM employees AS bev WHERE salary > ( SELECT MAX(salary) FROM projects AS uliv WHERE uliv.type = bev.type );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02540
train
v1
Schema: tasks (alias: znob)(value, salary, date, type) products(value, date, salary, code) Task: Find salary from tasks where code appears in products entries with matching status. SQL:
SELECT salary FROM tasks AS znob WHERE code IN ( SELECT code FROM products AS nad WHERE nad.status = znob.status );
{ "outer_table": "tasks", "inner_table": "products", "outer_alias": "znob", "inner_alias": "nad", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02541
train
v3
Schema: products (alias: nad)(value, date, salary, status) orders(salary, value, amount, level) Task: Retrieve salary from products with value above the MIN(salary) of orders rows sharing the same type. SQL:
SELECT salary FROM products AS nad WHERE value > ( SELECT MIN(salary) FROM orders AS kab WHERE kab.type = nad.type );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "nad", "inner_alias": "kab", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02542
train
v2
Schema: customers (alias: lex)(value, id, amount, type) transactions(level, amount, id, code) Task: Retrieve code from customers that have at least one corresponding entry in transactions sharing the same level. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.level = lex.level );
{ "outer_table": "customers", "inner_table": "transactions", "outer_alias": "lex", "inner_alias": "gev", "proj_col": "code", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02543
train
v3
Schema: employees (alias: bev)(code, id, type, level) accounts(status, level, name, code) Task: Find code from employees where value exceeds the average amount from accounts for the same status. SQL:
SELECT code FROM employees AS bev WHERE value > ( SELECT AVG(amount) FROM accounts AS jac WHERE jac.status = bev.status );
{ "outer_table": "employees", "inner_table": "accounts", "outer_alias": "bev", "inner_alias": "jac", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02544
train
v3
Schema: branches (alias: agov)(id, code, date, status) departments(name, code, status, value) Task: Find name from branches where amount exceeds the average value from departments for the same id. SQL:
SELECT name FROM branches AS agov WHERE amount > ( SELECT AVG(value) FROM departments AS dov WHERE dov.id = agov.id );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "agov.id", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02545
train
v3
Schema: shipments (alias: vnob)(level, status, date, code) accounts(status, amount, level, type) Task: Retrieve salary from shipments with amount above the SUM(amount) of accounts rows sharing the same type. SQL:
SELECT salary FROM shipments AS vnob WHERE amount > ( SELECT SUM(amount) FROM accounts AS jac WHERE jac.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "accounts", "outer_alias": "vnob", "inner_alias": "jac", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02546
train
v3
Schema: transactions (alias: gev)(amount, salary, id, value) regions(level, name, date, salary) Task: Retrieve salary from transactions with amount above the AVG(amount) of regions rows sharing the same status. SQL:
SELECT salary FROM transactions AS gev WHERE amount > ( SELECT AVG(amount) FROM regions AS okiv WHERE okiv.status = gev.status );
{ "outer_table": "transactions", "inner_table": "regions", "outer_alias": "gev", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02547
train
v1
Schema: customers (alias: lex)(id, salary, date, value) managers(salary, level, value, code) Task: Select salary from customers where id exists in managers for the same id. SQL:
SELECT salary FROM customers AS lex WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.id = lex.id );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "salary", "filter_col": "id", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02548
train
v3
Schema: categories (alias: egiv)(status, salary, type, date) orders(id, code, status, level) Task: Retrieve salary from categories with value above the AVG(value) of orders rows sharing the same id. SQL:
SELECT salary FROM categories AS egiv WHERE value > ( SELECT AVG(value) FROM orders AS kab WHERE kab.id = egiv.id );
{ "outer_table": "categories", "inner_table": "orders", "outer_alias": "egiv", "inner_alias": "kab", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02549
train
v3
Schema: managers (alias: hac)(level, date, type, salary) projects(status, level, salary, code) Task: Find amount from managers where amount exceeds the count of salary from projects for the same type. SQL:
SELECT amount FROM managers AS hac WHERE amount > ( SELECT COUNT(salary) FROM projects AS uliv WHERE uliv.type = hac.type );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "hac", "inner_alias": "uliv", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02550
train
v2
Schema: customers (alias: lex)(salary, id, amount, name) accounts(id, name, status, type) Task: Find name from customers where a matching record exists in accounts with the same status. SQL:
SELECT name FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = lex.status );
{ "outer_table": "customers", "inner_table": "accounts", "outer_alias": "lex", "inner_alias": "jac", "proj_col": "name", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02551
train
v2
Schema: tasks (alias: znob)(name, id, level, salary) sales(salary, value, id, date) Task: Find code from tasks where a matching record exists in sales with the same status. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.status = znob.status );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "znob", "inner_alias": "cif", "proj_col": "code", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02552
train
v3
Schema: customers (alias: lex)(id, name, amount, salary) branches(date, value, code, status) Task: Retrieve value from customers with salary above the SUM(salary) of branches rows sharing the same code. SQL:
SELECT value FROM customers AS lex WHERE salary > ( SELECT SUM(salary) FROM branches AS agov WHERE agov.code = lex.code );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02553
train
v3
Schema: transactions (alias: gev)(date, id, type, value) projects(code, id, date, type) Task: Find value from transactions where value exceeds the minimum amount from projects for the same level. SQL:
SELECT value FROM transactions AS gev WHERE value > ( SELECT MIN(amount) FROM projects AS uliv WHERE uliv.level = gev.level );
{ "outer_table": "transactions", "inner_table": "projects", "outer_alias": "gev", "inner_alias": "uliv", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02554
train
v1
Schema: departments (alias: dov)(code, value, level, salary) employees(amount, salary, code, level) Task: Retrieve amount from departments whose level is found in employees rows where status matches the outer record. SQL:
SELECT amount FROM departments AS dov WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.status = dov.status );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02555
train
v1
Schema: tasks (alias: znob)(level, type, code, name) departments(salary, date, status, id) Task: Select value from tasks where id exists in departments for the same id. SQL:
SELECT value FROM tasks AS znob WHERE id IN ( SELECT id FROM departments AS dov WHERE dov.id = znob.id );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "value", "filter_col": "id", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02556
train
v2
Schema: staff (alias: xnob)(type, status, id, code) regions(level, salary, code, status) Task: Retrieve value from staff that have at least one corresponding entry in regions sharing the same code. SQL:
SELECT value FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "value", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02557
train
v2
Schema: projects (alias: uliv)(level, date, value, status) schedules(id, amount, type, status) Task: Find salary from projects where a matching record exists in schedules with the same id. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.id = uliv.id );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "salary", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02558
train
v1
Schema: staff (alias: xnob)(amount, status, salary, code) products(name, type, amount, date) Task: Select code from staff where type exists in products for the same id. SQL:
SELECT code FROM staff AS xnob WHERE type IN ( SELECT type FROM products AS nad WHERE nad.id = xnob.id );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "code", "filter_col": "type", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02559
train
v3
Schema: departments (alias: dov)(salary, level, code, amount) employees(name, id, status, amount) Task: Find salary from departments where amount exceeds the minimum salary from employees for the same code. SQL:
SELECT salary FROM departments AS dov WHERE amount > ( SELECT MIN(salary) FROM employees AS bev WHERE bev.code = dov.code );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "salary", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02560
train
v2
Schema: regions (alias: okiv)(name, level, id, code) projects(level, salary, amount, status) Task: Find value from regions where a matching record exists in projects with the same code. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = okiv.code );
{ "outer_table": "regions", "inner_table": "projects", "outer_alias": "okiv", "inner_alias": "uliv", "proj_col": "value", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02561
train
v2
Schema: items (alias: ikob)(code, type, level, salary) sales(code, level, type, salary) Task: Find name from items where a matching record exists in sales with the same id. SQL:
SELECT name FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = ikob.id );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "name", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02562
train
v2
Schema: products (alias: nad)(date, type, salary, name) employees(type, name, date, id) Task: Retrieve salary from products that have at least one corresponding entry in employees sharing the same type. SQL:
SELECT salary FROM products AS nad WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.type = nad.type );
{ "outer_table": "products", "inner_table": "employees", "outer_alias": "nad", "inner_alias": "bev", "proj_col": "salary", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02563
train
v3
Schema: requests (alias: ejof)(status, type, value, name) managers(level, amount, value, code) Task: Retrieve id from requests with value above the MAX(value) of managers rows sharing the same level. SQL:
SELECT id FROM requests AS ejof WHERE value > ( SELECT MAX(value) FROM managers AS hac WHERE hac.level = ejof.level );
{ "outer_table": "requests", "inner_table": "managers", "outer_alias": "ejof", "inner_alias": "hac", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02564
train
v2
Schema: requests (alias: ejof)(salary, value, amount, type) employees(amount, type, code, name) Task: Retrieve code from requests that have at least one corresponding entry in employees sharing the same id. SQL:
SELECT code FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = ejof.id );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ejof", "inner_alias": "bev", "proj_col": "code", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02565
train
v3
Schema: shipments (alias: vnob)(type, level, salary, name) products(status, type, code, salary) Task: Find amount from shipments where salary exceeds the total amount from products for the same level. SQL:
SELECT amount FROM shipments AS vnob WHERE salary > ( SELECT SUM(amount) FROM products AS nad WHERE nad.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "products", "outer_alias": "vnob", "inner_alias": "nad", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02566
train
v1
Schema: transactions (alias: gev)(salary, value, date, name) shipments(code, salary, name, status) Task: Select name from transactions where code exists in shipments for the same code. SQL:
SELECT name FROM transactions AS gev WHERE code IN ( SELECT code FROM shipments AS vnob WHERE vnob.code = gev.code );
{ "outer_table": "transactions", "inner_table": "shipments", "outer_alias": "gev", "inner_alias": "vnob", "proj_col": "name", "filter_col": "code", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02567
train
v2
Schema: transactions (alias: gev)(code, type, salary, status) accounts(value, date, id, salary) Task: Retrieve value from transactions that have at least one corresponding entry in accounts sharing the same status. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = gev.status );
{ "outer_table": "transactions", "inner_table": "accounts", "outer_alias": "gev", "inner_alias": "jac", "proj_col": "value", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02568
train
v1
Schema: regions (alias: okiv)(level, status, name, amount) requests(value, date, code, level) Task: Select value from regions where level exists in requests for the same code. SQL:
SELECT value FROM regions AS okiv WHERE level IN ( SELECT level FROM requests AS ejof WHERE ejof.code = okiv.code );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02569
train
v2
Schema: schedules (alias: vmob)(code, salary, name, date) items(code, name, level, date) Task: Retrieve code from schedules that have at least one corresponding entry in items sharing the same status. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "items", "outer_alias": "vmob", "inner_alias": "ikob", "proj_col": "code", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02570
train
v1
Schema: products (alias: nad)(type, date, status, amount) tasks(id, value, salary, date) Task: Select name from products where status exists in tasks for the same code. SQL:
SELECT name FROM products AS nad WHERE status IN ( SELECT status FROM tasks AS znob WHERE znob.code = nad.code );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02571
train
v3
Schema: tasks (alias: znob)(amount, level, name, status) employees(level, code, type, amount) Task: Retrieve name from tasks with amount above the AVG(value) of employees rows sharing the same id. SQL:
SELECT name FROM tasks AS znob WHERE amount > ( SELECT AVG(value) FROM employees AS bev WHERE bev.id = znob.id );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02572
train
v2
Schema: managers (alias: hac)(name, date, level, code) branches(level, status, salary, date) Task: Retrieve salary from managers that have at least one corresponding entry in branches sharing the same id. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = hac.id );
{ "outer_table": "managers", "inner_table": "branches", "outer_alias": "hac", "inner_alias": "agov", "proj_col": "salary", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02573
train
v1
Schema: staff (alias: xnob)(level, name, amount, code) sales(code, level, amount, type) Task: Find amount from staff where level appears in sales entries with matching level. SQL:
SELECT amount FROM staff AS xnob WHERE level IN ( SELECT level FROM sales AS cif WHERE cif.level = xnob.level );
{ "outer_table": "staff", "inner_table": "sales", "outer_alias": "xnob", "inner_alias": "cif", "proj_col": "amount", "filter_col": "level", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02574
train
v1
Schema: tasks (alias: znob)(id, status, salary, value) projects(id, salary, name, date) Task: Find id from tasks where code appears in projects entries with matching type. SQL:
SELECT id FROM tasks AS znob WHERE code IN ( SELECT code FROM projects AS uliv WHERE uliv.type = znob.type );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "id", "filter_col": "code", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02575
train
v3
Schema: employees (alias: bev)(salary, name, status, amount) schedules(value, code, type, status) Task: Retrieve value from employees with salary above the COUNT(amount) of schedules rows sharing the same type. SQL:
SELECT value FROM employees AS bev WHERE salary > ( SELECT COUNT(amount) FROM schedules AS vmob WHERE vmob.type = bev.type );
{ "outer_table": "employees", "inner_table": "schedules", "outer_alias": "bev", "inner_alias": "vmob", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02576
train
v1
Schema: tasks (alias: znob)(value, level, type, name) schedules(amount, date, salary, id) Task: Retrieve salary from tasks whose status is found in schedules rows where status matches the outer record. SQL:
SELECT salary FROM tasks AS znob WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "salary", "filter_col": "status", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02577
train
v3
Schema: projects (alias: uliv)(code, type, name, value) accounts(code, date, status, level) Task: Retrieve id from projects with amount above the COUNT(amount) of accounts rows sharing the same type. SQL:
SELECT id FROM projects AS uliv WHERE amount > ( SELECT COUNT(amount) FROM accounts AS jac WHERE jac.type = uliv.type );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "id", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02578
train
v2
Schema: shipments (alias: vnob)(name, value, amount, status) items(status, id, date, code) Task: Retrieve id from shipments that have at least one corresponding entry in items sharing the same type. SQL:
SELECT id FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "items", "outer_alias": "vnob", "inner_alias": "ikob", "proj_col": "id", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02579
train
v2
Schema: invoices (alias: fal)(salary, date, amount, value) branches(code, type, date, level) Task: Retrieve value from invoices that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT value FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = fal.code );
{ "outer_table": "invoices", "inner_table": "branches", "outer_alias": "fal", "inner_alias": "agov", "proj_col": "value", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02580
train
v1
Schema: requests (alias: ejof)(id, name, level, code) orders(amount, date, level, id) Task: Select amount from requests where code exists in orders for the same level. SQL:
SELECT amount FROM requests AS ejof WHERE code IN ( SELECT code FROM orders AS kab WHERE kab.level = ejof.level );
{ "outer_table": "requests", "inner_table": "orders", "outer_alias": "ejof", "inner_alias": "kab", "proj_col": "amount", "filter_col": "code", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02581
train
v1
Schema: customers (alias: lex)(date, status, name, salary) products(date, id, code, amount) Task: Select name from customers where level exists in products for the same code. SQL:
SELECT name FROM customers AS lex WHERE level IN ( SELECT level FROM products AS nad WHERE nad.code = lex.code );
{ "outer_table": "customers", "inner_table": "products", "outer_alias": "lex", "inner_alias": "nad", "proj_col": "name", "filter_col": "level", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02582
train
v1
Schema: orders (alias: kab)(value, code, type, salary) managers(type, salary, id, level) Task: Select value from orders where id exists in managers for the same type. SQL:
SELECT value FROM orders AS kab WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.type = kab.type );
{ "outer_table": "orders", "inner_table": "managers", "outer_alias": "kab", "inner_alias": "hac", "proj_col": "value", "filter_col": "id", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02583
train
v1
Schema: shipments (alias: vnob)(level, type, value, status) categories(code, date, amount, id) Task: Find amount from shipments where status appears in categories entries with matching id. SQL:
SELECT amount FROM shipments AS vnob WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "categories", "outer_alias": "vnob", "inner_alias": "egiv", "proj_col": "amount", "filter_col": "status", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02584
train
v3
Schema: products (alias: nad)(name, value, type, date) invoices(name, level, value, code) Task: Find id from products where amount exceeds the maximum salary from invoices for the same level. SQL:
SELECT id FROM products AS nad WHERE amount > ( SELECT MAX(salary) FROM invoices AS fal WHERE fal.level = nad.level );
{ "outer_table": "products", "inner_table": "invoices", "outer_alias": "nad", "inner_alias": "fal", "proj_col": "id", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02585
train
v3
Schema: invoices (alias: fal)(id, type, amount, value) tasks(name, code, date, type) Task: Find name from invoices where salary exceeds the maximum amount from tasks for the same type. SQL:
SELECT name FROM invoices AS fal WHERE salary > ( SELECT MAX(amount) FROM tasks AS znob WHERE znob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "tasks", "outer_alias": "fal", "inner_alias": "znob", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02586
train
v2
Schema: categories (alias: egiv)(level, date, id, value) managers(status, code, level, salary) Task: Retrieve salary from categories that have at least one corresponding entry in managers sharing the same type. SQL:
SELECT salary FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = egiv.type );
{ "outer_table": "categories", "inner_table": "managers", "outer_alias": "egiv", "inner_alias": "hac", "proj_col": "salary", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02587
train
v3
Schema: customers (alias: lex)(code, type, amount, value) items(id, level, status, code) Task: Find salary from customers where value exceeds the average value from items for the same status. SQL:
SELECT salary FROM customers AS lex WHERE value > ( SELECT AVG(value) FROM items AS ikob WHERE ikob.status = lex.status );
{ "outer_table": "customers", "inner_table": "items", "outer_alias": "lex", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02588
train
v3
Schema: staff (alias: xnob)(level, date, salary, status) products(value, id, code, date) Task: Retrieve id from staff with salary above the AVG(value) of products rows sharing the same level. SQL:
SELECT id FROM staff AS xnob WHERE salary > ( SELECT AVG(value) FROM products AS nad WHERE nad.level = xnob.level );
{ "outer_table": "staff", "inner_table": "products", "outer_alias": "xnob", "inner_alias": "nad", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02589
train
v3
Schema: regions (alias: okiv)(salary, type, date, code) branches(date, value, amount, id) Task: Find amount from regions where salary exceeds the total amount from branches for the same status. SQL:
SELECT amount FROM regions AS okiv WHERE salary > ( SELECT SUM(amount) FROM branches AS agov WHERE agov.status = okiv.status );
{ "outer_table": "regions", "inner_table": "branches", "outer_alias": "okiv", "inner_alias": "agov", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02590
train
v2
Schema: schedules (alias: vmob)(salary, name, code, level) transactions(salary, id, status, value) Task: Find code from schedules where a matching record exists in transactions with the same id. SQL:
SELECT code FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "transactions", "outer_alias": "vmob", "inner_alias": "gev", "proj_col": "code", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02591
train
v2
Schema: projects (alias: uliv)(code, value, level, salary) regions(status, code, name, date) Task: Find amount from projects where a matching record exists in regions with the same code. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.code = uliv.code );
{ "outer_table": "projects", "inner_table": "regions", "outer_alias": "uliv", "inner_alias": "okiv", "proj_col": "amount", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02592
train
v3
Schema: branches (alias: agov)(status, code, name, amount) accounts(code, id, level, name) Task: Retrieve amount from branches with value above the MIN(amount) of accounts rows sharing the same type. SQL:
SELECT amount FROM branches AS agov WHERE value > ( SELECT MIN(amount) FROM accounts AS jac WHERE jac.type = agov.type );
{ "outer_table": "branches", "inner_table": "accounts", "outer_alias": "agov", "inner_alias": "jac", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "agov.type", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02593
train
v3
Schema: shipments (alias: vnob)(value, status, date, name) departments(salary, type, amount, level) Task: Retrieve amount from shipments with amount above the MAX(value) of departments rows sharing the same status. SQL:
SELECT amount FROM shipments AS vnob WHERE amount > ( SELECT MAX(value) FROM departments AS dov WHERE dov.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "departments", "outer_alias": "vnob", "inner_alias": "dov", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02594
train
v3
Schema: schedules (alias: vmob)(date, amount, id, status) managers(code, salary, status, value) Task: Retrieve code from schedules with value above the MAX(amount) of managers rows sharing the same code. SQL:
SELECT code FROM schedules AS vmob WHERE value > ( SELECT MAX(amount) FROM managers AS hac WHERE hac.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "code", "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_02595
train
v3
Schema: shipments (alias: vnob)(level, type, name, id) sales(level, id, amount, status) Task: Find name from shipments where salary exceeds the maximum salary from sales for the same level. SQL:
SELECT name FROM shipments AS vnob WHERE salary > ( SELECT MAX(salary) FROM sales AS cif WHERE cif.level = vnob.level );
{ "outer_table": "shipments", "inner_table": "sales", "outer_alias": "vnob", "inner_alias": "cif", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "vnob.level", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02596
train
v3
Schema: items (alias: ikob)(status, value, date, name) managers(value, salary, type, code) Task: Find code from items where amount exceeds the average amount from managers for the same level. SQL:
SELECT code FROM items AS ikob WHERE amount > ( SELECT AVG(amount) FROM managers AS hac WHERE hac.level = ikob.level );
{ "outer_table": "items", "inner_table": "managers", "outer_alias": "ikob", "inner_alias": "hac", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02597
train
v2
Schema: departments (alias: dov)(amount, name, type, status) branches(salary, id, level, type) Task: Find name from departments where a matching record exists in branches with the same id. SQL:
SELECT name FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.id = dov.id );
{ "outer_table": "departments", "inner_table": "branches", "outer_alias": "dov", "inner_alias": "agov", "proj_col": "name", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02598
train
v1
Schema: products (alias: nad)(level, salary, status, id) managers(id, name, amount, level) Task: Find code from products where type appears in managers entries with matching level. SQL:
SELECT code FROM products AS nad WHERE type IN ( SELECT type FROM managers AS hac WHERE hac.level = nad.level );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "nad", "inner_alias": "hac", "proj_col": "code", "filter_col": "type", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02599
train