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: requests (alias: ejof)(name, date, code, status) customers(name, code, date, value) Task: Retrieve code from requests with amount above the COUNT(value) of customers rows sharing the same code. SQL:
SELECT code FROM requests AS ejof WHERE amount > ( SELECT COUNT(value) FROM customers AS lex WHERE lex.code = ejof.code );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07700
train
v2
Schema: managers (alias: hac)(code, date, status, type) customers(date, amount, id, name) Task: Find id from managers where a matching record exists in customers with the same type. SQL:
SELECT id FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = hac.type );
{ "outer_table": "managers", "inner_table": "customers", "outer_alias": "hac", "inner_alias": "lex", "proj_col": "id", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07701
train
v3
Schema: categories (alias: egiv)(value, id, name, amount) employees(name, status, amount, id) Task: Find amount from categories where amount exceeds the average salary from employees for the same id. SQL:
SELECT amount FROM categories AS egiv WHERE amount > ( SELECT AVG(salary) FROM employees AS bev WHERE bev.id = egiv.id );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "egiv", "inner_alias": "bev", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "egiv.id", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07702
train
v3
Schema: categories (alias: egiv)(date, id, amount, code) requests(code, value, level, type) Task: Retrieve amount from categories with amount above the MIN(salary) of requests rows sharing the same level. SQL:
SELECT amount FROM categories AS egiv WHERE amount > ( SELECT MIN(salary) FROM requests AS ejof WHERE ejof.level = egiv.level );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "egiv", "inner_alias": "ejof", "proj_col": "amount", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07703
train
v2
Schema: staff (alias: xnob)(amount, date, id, type) projects(amount, id, name, code) Task: Retrieve value from staff that have at least one corresponding entry in projects sharing the same status. SQL:
SELECT value FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = xnob.status );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "xnob", "inner_alias": "uliv", "proj_col": "value", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07704
train
v1
Schema: staff (alias: xnob)(amount, type, date, salary) tasks(value, id, amount, status) Task: Select salary from staff where code exists in tasks for the same level. SQL:
SELECT salary FROM staff AS xnob WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.level = xnob.level );
{ "outer_table": "staff", "inner_table": "tasks", "outer_alias": "xnob", "inner_alias": "znob", "proj_col": "salary", "filter_col": "code", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07705
train
v2
Schema: customers (alias: lex)(amount, code, type, name) regions(type, status, level, id) Task: Find value from customers where a matching record exists in regions with the same id. SQL:
SELECT value FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.id = lex.id );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "value", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07706
train
v2
Schema: shipments (alias: vnob)(name, id, value, code) categories(date, type, code, id) Task: Find code from shipments where a matching record exists in categories with the same code. SQL:
SELECT code FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "categories", "outer_alias": "vnob", "inner_alias": "egiv", "proj_col": "code", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_07707
train
v3
Schema: projects (alias: uliv)(id, date, level, type) staff(id, type, code, date) Task: Retrieve code from projects with value above the SUM(salary) of staff rows sharing the same level. SQL:
SELECT code FROM projects AS uliv WHERE value > ( SELECT SUM(salary) FROM staff AS xnob WHERE xnob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07708
train
v2
Schema: invoices (alias: fal)(name, amount, status, type) transactions(status, amount, value, level) Task: Retrieve value from invoices that have at least one corresponding entry in transactions sharing the same type. SQL:
SELECT value FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = fal.type );
{ "outer_table": "invoices", "inner_table": "transactions", "outer_alias": "fal", "inner_alias": "gev", "proj_col": "value", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07709
train
v1
Schema: branches (alias: agov)(code, level, value, salary) staff(date, code, value, salary) Task: Select amount from branches where type exists in staff for the same level. SQL:
SELECT amount FROM branches AS agov WHERE type IN ( SELECT type FROM staff AS xnob WHERE xnob.level = agov.level );
{ "outer_table": "branches", "inner_table": "staff", "outer_alias": "agov", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "type", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07710
train
v2
Schema: schedules (alias: vmob)(code, date, value, salary) accounts(code, status, type, id) Task: Retrieve salary from schedules that have at least one corresponding entry in accounts sharing the same status. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "accounts", "outer_alias": "vmob", "inner_alias": "jac", "proj_col": "salary", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07711
train
v2
Schema: items (alias: ikob)(code, id, status, date) orders(type, id, code, name) Task: Find salary from items where a matching record exists in orders with the same id. SQL:
SELECT salary FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = ikob.id );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "salary", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07712
train
v2
Schema: invoices (alias: fal)(code, date, level, value) regions(level, amount, type, status) Task: Find amount from invoices where a matching record exists in regions with the same type. SQL:
SELECT amount FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.type = fal.type );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "amount", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07713
train
v3
Schema: categories (alias: egiv)(amount, status, code, id) products(salary, type, value, level) Task: Retrieve code from categories with salary above the MIN(value) of products rows sharing the same code. SQL:
SELECT code FROM categories AS egiv WHERE salary > ( SELECT MIN(value) FROM products AS nad WHERE nad.code = egiv.code );
{ "outer_table": "categories", "inner_table": "products", "outer_alias": "egiv", "inner_alias": "nad", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07714
train
v2
Schema: projects (alias: uliv)(amount, name, id, salary) products(status, value, name, amount) Task: Retrieve amount from projects that have at least one corresponding entry in products sharing the same id. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.id = uliv.id );
{ "outer_table": "projects", "inner_table": "products", "outer_alias": "uliv", "inner_alias": "nad", "proj_col": "amount", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07715
train
v2
Schema: schedules (alias: vmob)(code, level, date, id) categories(id, level, value, type) Task: Retrieve salary from schedules that have at least one corresponding entry in categories sharing the same level. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "salary", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07716
train
v2
Schema: staff (alias: xnob)(date, amount, code, salary) orders(code, salary, amount, id) Task: Find name from staff where a matching record exists in orders with the same id. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = xnob.id );
{ "outer_table": "staff", "inner_table": "orders", "outer_alias": "xnob", "inner_alias": "kab", "proj_col": "name", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07717
train
v1
Schema: requests (alias: ejof)(status, name, type, level) employees(status, amount, code, type) Task: Find id from requests where id appears in employees entries with matching id. SQL:
SELECT id FROM requests AS ejof WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.id = ejof.id );
{ "outer_table": "requests", "inner_table": "employees", "outer_alias": "ejof", "inner_alias": "bev", "proj_col": "id", "filter_col": "id", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07718
train
v2
Schema: schedules (alias: vmob)(code, type, name, salary) shipments(date, value, id, status) Task: Find amount from schedules where a matching record exists in shipments with the same level. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "shipments", "outer_alias": "vmob", "inner_alias": "vnob", "proj_col": "amount", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07719
train
v1
Schema: employees (alias: bev)(id, amount, name, code) orders(status, name, amount, id) Task: Retrieve salary from employees whose type is found in orders rows where type matches the outer record. SQL:
SELECT salary FROM employees AS bev WHERE type IN ( SELECT type FROM orders AS kab WHERE kab.type = bev.type );
{ "outer_table": "employees", "inner_table": "orders", "outer_alias": "bev", "inner_alias": "kab", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07720
train
v2
Schema: requests (alias: ejof)(type, date, amount, name) accounts(id, type, amount, value) Task: Find value from requests where a matching record exists in accounts with the same status. SQL:
SELECT value FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.status = ejof.status );
{ "outer_table": "requests", "inner_table": "accounts", "outer_alias": "ejof", "inner_alias": "jac", "proj_col": "value", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07721
train
v3
Schema: items (alias: ikob)(level, amount, code, status) shipments(status, value, type, salary) Task: Retrieve id from items with value above the AVG(salary) of shipments rows sharing the same level. SQL:
SELECT id FROM items AS ikob WHERE value > ( SELECT AVG(salary) FROM shipments AS vnob WHERE vnob.level = ikob.level );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07722
train
v1
Schema: sales (alias: cif)(salary, value, name, date) schedules(date, amount, code, id) Task: Find id from sales where type appears in schedules entries with matching status. SQL:
SELECT id FROM sales AS cif WHERE type IN ( SELECT type FROM schedules AS vmob WHERE vmob.status = cif.status );
{ "outer_table": "sales", "inner_table": "schedules", "outer_alias": "cif", "inner_alias": "vmob", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07723
train
v2
Schema: invoices (alias: fal)(type, level, salary, date) categories(name, date, code, salary) Task: Retrieve code from invoices that have at least one corresponding entry in categories sharing the same id. SQL:
SELECT code FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.id = fal.id );
{ "outer_table": "invoices", "inner_table": "categories", "outer_alias": "fal", "inner_alias": "egiv", "proj_col": "code", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07724
train
v3
Schema: schedules (alias: vmob)(date, id, amount, type) customers(level, id, code, salary) Task: Retrieve value from schedules with amount above the MAX(value) of customers rows sharing the same level. SQL:
SELECT value FROM schedules AS vmob WHERE amount > ( SELECT MAX(value) FROM customers AS lex WHERE lex.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "vmob", "inner_alias": "lex", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07725
train
v3
Schema: orders (alias: kab)(salary, amount, value, name) departments(value, level, id, salary) Task: Find code from orders where value exceeds the minimum amount from departments for the same level. SQL:
SELECT code FROM orders AS kab WHERE value > ( SELECT MIN(amount) FROM departments AS dov WHERE dov.level = kab.level );
{ "outer_table": "orders", "inner_table": "departments", "outer_alias": "kab", "inner_alias": "dov", "proj_col": "code", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07726
train
v3
Schema: staff (alias: xnob)(status, date, salary, code) categories(level, code, value, salary) Task: Find id from staff where value exceeds the minimum value from categories for the same id. SQL:
SELECT id FROM staff AS xnob WHERE value > ( SELECT MIN(value) FROM categories AS egiv WHERE egiv.id = xnob.id );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07727
train
v2
Schema: transactions (alias: gev)(salary, date, type, id) orders(level, name, value, amount) Task: Find value from transactions where a matching record exists in orders with the same level. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = gev.level );
{ "outer_table": "transactions", "inner_table": "orders", "outer_alias": "gev", "inner_alias": "kab", "proj_col": "value", "join_col": "level", "correlated_ref": "gev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07728
train
v2
Schema: projects (alias: uliv)(date, level, name, amount) products(code, name, level, date) Task: Retrieve id from projects that have at least one corresponding entry in products sharing the same status. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.status = uliv.status );
{ "outer_table": "projects", "inner_table": "products", "outer_alias": "uliv", "inner_alias": "nad", "proj_col": "id", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07729
train
v3
Schema: sales (alias: cif)(value, amount, name, level) employees(value, date, code, id) Task: Retrieve value from sales with salary above the COUNT(value) of employees rows sharing the same type. SQL:
SELECT value FROM sales AS cif WHERE salary > ( SELECT COUNT(value) FROM employees AS bev WHERE bev.type = cif.type );
{ "outer_table": "sales", "inner_table": "employees", "outer_alias": "cif", "inner_alias": "bev", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07730
train
v1
Schema: transactions (alias: gev)(name, value, status, code) employees(salary, id, amount, status) Task: Find value from transactions where code appears in employees entries with matching code. SQL:
SELECT value FROM transactions AS gev WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.code = gev.code );
{ "outer_table": "transactions", "inner_table": "employees", "outer_alias": "gev", "inner_alias": "bev", "proj_col": "value", "filter_col": "code", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07731
train
v3
Schema: invoices (alias: fal)(value, name, salary, status) projects(date, status, amount, salary) Task: Find value from invoices where salary exceeds the count of value from projects for the same id. SQL:
SELECT value FROM invoices AS fal WHERE salary > ( SELECT COUNT(value) FROM projects AS uliv WHERE uliv.id = fal.id );
{ "outer_table": "invoices", "inner_table": "projects", "outer_alias": "fal", "inner_alias": "uliv", "proj_col": "value", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07732
train
v3
Schema: employees (alias: bev)(salary, id, date, level) requests(date, code, amount, value) Task: Find name from employees where amount exceeds the average amount from requests for the same type. SQL:
SELECT name FROM employees AS bev WHERE amount > ( SELECT AVG(amount) FROM requests AS ejof WHERE ejof.type = bev.type );
{ "outer_table": "employees", "inner_table": "requests", "outer_alias": "bev", "inner_alias": "ejof", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "AVG", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07733
train
v1
Schema: employees (alias: bev)(code, amount, name, level) items(code, level, amount, value) Task: Retrieve id from employees whose id is found in items rows where status matches the outer record. SQL:
SELECT id FROM employees AS bev WHERE id IN ( SELECT id FROM items AS ikob WHERE ikob.status = bev.status );
{ "outer_table": "employees", "inner_table": "items", "outer_alias": "bev", "inner_alias": "ikob", "proj_col": "id", "filter_col": "id", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07734
train
v1
Schema: invoices (alias: fal)(salary, level, amount, status) tasks(status, amount, name, level) Task: Retrieve code from invoices whose code is found in tasks rows where level matches the outer record. SQL:
SELECT code FROM invoices AS fal WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.level = fal.level );
{ "outer_table": "invoices", "inner_table": "tasks", "outer_alias": "fal", "inner_alias": "znob", "proj_col": "code", "filter_col": "code", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07735
train
v3
Schema: staff (alias: xnob)(id, value, type, name) customers(value, id, amount, salary) Task: Find code from staff where amount exceeds the maximum salary from customers for the same code. SQL:
SELECT code FROM staff AS xnob WHERE amount > ( SELECT MAX(salary) FROM customers AS lex WHERE lex.code = xnob.code );
{ "outer_table": "staff", "inner_table": "customers", "outer_alias": "xnob", "inner_alias": "lex", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07736
train
v3
Schema: projects (alias: uliv)(salary, amount, date, id) sales(date, level, code, name) Task: Find id from projects where salary exceeds the total amount from sales for the same status. SQL:
SELECT id FROM projects AS uliv WHERE salary > ( SELECT SUM(amount) FROM sales AS cif WHERE cif.status = uliv.status );
{ "outer_table": "projects", "inner_table": "sales", "outer_alias": "uliv", "inner_alias": "cif", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07737
train
v1
Schema: products (alias: nad)(date, name, level, salary) orders(type, level, value, code) Task: Select name from products where status exists in orders for the same type. SQL:
SELECT name FROM products AS nad WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.type = nad.type );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "nad", "inner_alias": "kab", "proj_col": "name", "filter_col": "status", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07738
train
v2
Schema: customers (alias: lex)(code, id, date, name) employees(status, id, date, amount) Task: Find value from customers where a matching record exists in employees with the same id. SQL:
SELECT value FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = lex.id );
{ "outer_table": "customers", "inner_table": "employees", "outer_alias": "lex", "inner_alias": "bev", "proj_col": "value", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07739
train
v3
Schema: departments (alias: dov)(date, level, id, amount) categories(type, status, amount, code) Task: Find name from departments where salary exceeds the average salary from categories for the same code. SQL:
SELECT name FROM departments AS dov WHERE salary > ( SELECT AVG(salary) FROM categories AS egiv WHERE egiv.code = dov.code );
{ "outer_table": "departments", "inner_table": "categories", "outer_alias": "dov", "inner_alias": "egiv", "proj_col": "name", "filter_col": "salary", "agg_col": "salary", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07740
train
v3
Schema: schedules (alias: vmob)(date, salary, amount, name) tasks(code, name, id, amount) Task: Find code from schedules where value exceeds the average salary from tasks for the same status. SQL:
SELECT code FROM schedules AS vmob WHERE value > ( SELECT AVG(salary) FROM tasks AS znob WHERE znob.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07741
train
v1
Schema: schedules (alias: vmob)(status, type, amount, date) orders(salary, code, id, status) Task: Find value from schedules where status appears in orders entries with matching status. SQL:
SELECT value FROM schedules AS vmob WHERE status IN ( SELECT status FROM orders AS kab WHERE kab.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "orders", "outer_alias": "vmob", "inner_alias": "kab", "proj_col": "value", "filter_col": "status", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07742
train
v3
Schema: categories (alias: egiv)(id, name, type, value) invoices(amount, salary, status, date) Task: Find value from categories where value exceeds the total value from invoices for the same status. SQL:
SELECT value FROM categories AS egiv WHERE value > ( SELECT SUM(value) FROM invoices AS fal WHERE fal.status = egiv.status );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "value", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_07743
train
v3
Schema: staff (alias: xnob)(name, type, code, status) branches(level, value, salary, code) Task: Find salary from staff where salary exceeds the minimum salary from branches for the same code. SQL:
SELECT salary FROM staff AS xnob WHERE salary > ( SELECT MIN(salary) FROM branches AS agov WHERE agov.code = xnob.code );
{ "outer_table": "staff", "inner_table": "branches", "outer_alias": "xnob", "inner_alias": "agov", "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_07744
train
v3
Schema: departments (alias: dov)(code, value, salary, id) shipments(value, type, id, level) Task: Retrieve amount from departments with salary above the SUM(amount) of shipments rows sharing the same code. SQL:
SELECT amount FROM departments AS dov WHERE salary > ( SELECT SUM(amount) FROM shipments AS vnob WHERE vnob.code = dov.code );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "dov.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07745
train
v2
Schema: products (alias: nad)(level, value, salary, date) sales(level, value, type, amount) Task: Retrieve value from products that have at least one corresponding entry in sales sharing the same level. SQL:
SELECT value FROM products AS nad WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = nad.level );
{ "outer_table": "products", "inner_table": "sales", "outer_alias": "nad", "inner_alias": "cif", "proj_col": "value", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07746
train
v2
Schema: requests (alias: ejof)(code, amount, date, name) schedules(level, value, name, code) Task: Retrieve salary from requests that have at least one corresponding entry in schedules sharing the same status. SQL:
SELECT salary FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "schedules", "outer_alias": "ejof", "inner_alias": "vmob", "proj_col": "salary", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07747
train
v1
Schema: employees (alias: bev)(status, code, value, salary) accounts(code, amount, id, name) Task: Retrieve code from employees whose code is found in accounts rows where id matches the outer record. SQL:
SELECT code FROM employees AS bev WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.id = bev.id );
{ "outer_table": "employees", "inner_table": "accounts", "outer_alias": "bev", "inner_alias": "jac", "proj_col": "code", "filter_col": "code", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07748
train
v1
Schema: invoices (alias: fal)(name, type, level, code) shipments(name, level, value, status) Task: Retrieve code from invoices whose level is found in shipments rows where type matches the outer record. SQL:
SELECT code FROM invoices AS fal WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.type = fal.type );
{ "outer_table": "invoices", "inner_table": "shipments", "outer_alias": "fal", "inner_alias": "vnob", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "fal.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07749
train
v2
Schema: branches (alias: agov)(id, salary, amount, status) regions(name, salary, status, level) Task: Find id from branches where a matching record exists in regions with the same status. SQL:
SELECT id FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.status = agov.status );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "id", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07750
train
v1
Schema: transactions (alias: gev)(amount, name, value, id) managers(type, date, value, level) Task: Retrieve code from transactions whose type is found in managers rows where code matches the outer record. SQL:
SELECT code FROM transactions AS gev WHERE type IN ( SELECT type FROM managers AS hac WHERE hac.code = gev.code );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "gev", "inner_alias": "hac", "proj_col": "code", "filter_col": "type", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07751
train
v1
Schema: orders (alias: kab)(name, date, code, type) accounts(value, type, amount, name) Task: Find id from orders where id appears in accounts entries with matching status. SQL:
SELECT id FROM orders AS kab WHERE id IN ( SELECT id FROM accounts AS jac WHERE jac.status = kab.status );
{ "outer_table": "orders", "inner_table": "accounts", "outer_alias": "kab", "inner_alias": "jac", "proj_col": "id", "filter_col": "id", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07752
train
v3
Schema: schedules (alias: vmob)(name, id, level, type) tasks(value, code, amount, salary) Task: Find id from schedules where value exceeds the average value from tasks for the same code. SQL:
SELECT id FROM schedules AS vmob WHERE value > ( SELECT AVG(value) FROM tasks AS znob WHERE znob.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "tasks", "outer_alias": "vmob", "inner_alias": "znob", "proj_col": "id", "filter_col": "value", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07753
train
v3
Schema: customers (alias: lex)(code, level, name, type) employees(id, value, code, type) Task: Retrieve name from customers with salary above the AVG(value) of employees rows sharing the same id. SQL:
SELECT name FROM customers AS lex WHERE salary > ( SELECT AVG(value) FROM employees AS bev WHERE bev.id = lex.id );
{ "outer_table": "customers", "inner_table": "employees", "outer_alias": "lex", "inner_alias": "bev", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07754
train
v3
Schema: invoices (alias: fal)(status, value, name, level) customers(amount, name, salary, value) Task: Retrieve code from invoices with value above the MIN(value) of customers rows sharing the same code. SQL:
SELECT code FROM invoices AS fal WHERE value > ( SELECT MIN(value) FROM customers AS lex WHERE lex.code = fal.code );
{ "outer_table": "invoices", "inner_table": "customers", "outer_alias": "fal", "inner_alias": "lex", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07755
train
v3
Schema: orders (alias: kab)(type, amount, date, salary) schedules(type, date, name, salary) Task: Find amount from orders where value exceeds the total value from schedules for the same status. SQL:
SELECT amount FROM orders AS kab WHERE value > ( SELECT SUM(value) FROM schedules AS vmob WHERE vmob.status = kab.status );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07756
train
v1
Schema: employees (alias: bev)(amount, value, salary, type) departments(salary, type, value, date) Task: Find id from employees where status appears in departments entries with matching status. SQL:
SELECT id FROM employees AS bev WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.status = bev.status );
{ "outer_table": "employees", "inner_table": "departments", "outer_alias": "bev", "inner_alias": "dov", "proj_col": "id", "filter_col": "status", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07757
train
v2
Schema: orders (alias: kab)(name, level, type, amount) categories(id, value, code, date) Task: Find salary from orders where a matching record exists in categories with the same id. SQL:
SELECT salary FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.id = kab.id );
{ "outer_table": "orders", "inner_table": "categories", "outer_alias": "kab", "inner_alias": "egiv", "proj_col": "salary", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07758
train
v1
Schema: orders (alias: kab)(id, status, salary, date) regions(code, type, id, name) Task: Select name from orders where status exists in regions for the same code. SQL:
SELECT name FROM orders AS kab WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.code = kab.code );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "kab", "inner_alias": "okiv", "proj_col": "name", "filter_col": "status", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07759
train
v2
Schema: regions (alias: okiv)(amount, date, code, level) managers(amount, status, value, code) Task: Find amount from regions where a matching record exists in managers with the same level. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = okiv.level );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "okiv", "inner_alias": "hac", "proj_col": "amount", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_07760
train
v2
Schema: managers (alias: hac)(date, id, salary, amount) projects(status, name, amount, level) Task: Retrieve id from managers that have at least one corresponding entry in projects sharing the same status. SQL:
SELECT id FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = hac.status );
{ "outer_table": "managers", "inner_table": "projects", "outer_alias": "hac", "inner_alias": "uliv", "proj_col": "id", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07761
train
v2
Schema: products (alias: nad)(code, id, amount, type) orders(value, salary, level, amount) Task: Find name from products where a matching record exists in orders with the same level. SQL:
SELECT name FROM products AS nad WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = nad.level );
{ "outer_table": "products", "inner_table": "orders", "outer_alias": "nad", "inner_alias": "kab", "proj_col": "name", "join_col": "level", "correlated_ref": "nad.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07762
train
v3
Schema: orders (alias: kab)(date, id, name, code) regions(amount, date, code, value) Task: Find code from orders where amount exceeds the maximum salary from regions for the same type. SQL:
SELECT code FROM orders AS kab WHERE amount > ( SELECT MAX(salary) FROM regions AS okiv WHERE okiv.type = kab.type );
{ "outer_table": "orders", "inner_table": "regions", "outer_alias": "kab", "inner_alias": "okiv", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07763
train
v2
Schema: requests (alias: ejof)(type, salary, level, date) employees(salary, code, amount, type) Task: Find amount from requests where a matching record exists in employees with the same id. SQL:
SELECT amount 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": "amount", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07764
train
v3
Schema: orders (alias: kab)(salary, type, date, name) transactions(salary, date, amount, level) Task: Find code from orders where amount exceeds the count of salary from transactions for the same status. SQL:
SELECT code FROM orders AS kab WHERE amount > ( SELECT COUNT(salary) FROM transactions AS gev WHERE gev.status = kab.status );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07765
train
v3
Schema: requests (alias: ejof)(amount, code, name, status) regions(type, name, amount, status) Task: Find code from requests where amount exceeds the minimum amount from regions for the same code. SQL:
SELECT code FROM requests AS ejof WHERE amount > ( SELECT MIN(amount) FROM regions AS okiv WHERE okiv.code = ejof.code );
{ "outer_table": "requests", "inner_table": "regions", "outer_alias": "ejof", "inner_alias": "okiv", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07766
train
v3
Schema: tasks (alias: znob)(status, value, code, name) products(type, level, name, status) Task: Find id from tasks where amount exceeds the minimum value from products for the same code. SQL:
SELECT id FROM tasks AS znob WHERE amount > ( SELECT MIN(value) FROM products AS nad WHERE nad.code = znob.code );
{ "outer_table": "tasks", "inner_table": "products", "outer_alias": "znob", "inner_alias": "nad", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07767
train
v2
Schema: projects (alias: uliv)(code, id, level, amount) schedules(amount, name, type, level) Task: Find name from projects where a matching record exists in schedules with the same type. SQL:
SELECT name FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "name", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07768
train
v2
Schema: managers (alias: hac)(amount, name, date, level) tasks(name, id, level, type) Task: Retrieve salary from managers that have at least one corresponding entry in tasks sharing the same id. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.id = hac.id );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "salary", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07769
train
v1
Schema: products (alias: nad)(date, type, name, id) schedules(type, amount, salary, id) Task: Retrieve amount from products whose level is found in schedules rows where status matches the outer record. SQL:
SELECT amount FROM products AS nad WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.status = nad.status );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "level", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07770
train
v3
Schema: tasks (alias: znob)(value, code, id, name) employees(salary, type, value, id) Task: Find code from tasks where amount exceeds the maximum amount from employees for the same status. SQL:
SELECT code FROM tasks AS znob WHERE amount > ( SELECT MAX(amount) FROM employees AS bev WHERE bev.status = znob.status );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07771
train
v3
Schema: tasks (alias: znob)(type, status, amount, id) sales(date, value, salary, amount) Task: Retrieve id from tasks with value above the MAX(salary) of sales rows sharing the same type. SQL:
SELECT id FROM tasks AS znob WHERE value > ( SELECT MAX(salary) FROM sales AS cif WHERE cif.type = znob.type );
{ "outer_table": "tasks", "inner_table": "sales", "outer_alias": "znob", "inner_alias": "cif", "proj_col": "id", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07772
train
v3
Schema: tasks (alias: znob)(id, value, salary, status) categories(value, status, type, level) Task: Find name from tasks where salary exceeds the total value from categories for the same id. SQL:
SELECT name FROM tasks AS znob WHERE salary > ( SELECT SUM(value) FROM categories AS egiv WHERE egiv.id = znob.id );
{ "outer_table": "tasks", "inner_table": "categories", "outer_alias": "znob", "inner_alias": "egiv", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07773
train
v2
Schema: departments (alias: dov)(status, id, value, salary) products(code, status, name, date) Task: Find amount from departments where a matching record exists in products with the same id. SQL:
SELECT amount FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.id = dov.id );
{ "outer_table": "departments", "inner_table": "products", "outer_alias": "dov", "inner_alias": "nad", "proj_col": "amount", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07774
train
v1
Schema: transactions (alias: gev)(code, name, type, status) schedules(salary, name, level, date) Task: Find name from transactions where code appears in schedules entries with matching status. SQL:
SELECT name FROM transactions AS gev WHERE code IN ( SELECT code FROM schedules AS vmob WHERE vmob.status = gev.status );
{ "outer_table": "transactions", "inner_table": "schedules", "outer_alias": "gev", "inner_alias": "vmob", "proj_col": "name", "filter_col": "code", "join_col": "status", "correlated_ref": "gev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07775
train
v1
Schema: items (alias: ikob)(name, code, id, level) orders(id, amount, date, status) Task: Select name from items where level exists in orders for the same type. SQL:
SELECT name FROM items AS ikob WHERE level IN ( SELECT level FROM orders AS kab WHERE kab.type = ikob.type );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07776
train
v1
Schema: requests (alias: ejof)(salary, date, type, amount) accounts(salary, date, id, status) Task: Select value from requests where code exists in accounts for the same type. SQL:
SELECT value FROM requests AS ejof WHERE code IN ( SELECT code FROM accounts AS jac WHERE jac.type = ejof.type );
{ "outer_table": "requests", "inner_table": "accounts", "outer_alias": "ejof", "inner_alias": "jac", "proj_col": "value", "filter_col": "code", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07777
train
v2
Schema: tasks (alias: znob)(code, amount, salary, type) departments(type, value, salary, name) Task: Find id from tasks where a matching record exists in departments with the same type. SQL:
SELECT id FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.type = znob.type );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "id", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07778
train
v2
Schema: branches (alias: agov)(code, amount, salary, level) departments(amount, name, salary, code) Task: Find salary from branches where a matching record exists in departments with the same level. SQL:
SELECT salary FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = agov.level );
{ "outer_table": "branches", "inner_table": "departments", "outer_alias": "agov", "inner_alias": "dov", "proj_col": "salary", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_07779
train
v3
Schema: tasks (alias: znob)(name, type, level, date) staff(id, value, status, amount) Task: Find id from tasks where salary exceeds the count of amount from staff for the same status. SQL:
SELECT id FROM tasks AS znob WHERE salary > ( SELECT COUNT(amount) FROM staff AS xnob WHERE xnob.status = znob.status );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "znob.status", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07780
train
v1
Schema: orders (alias: kab)(value, code, date, status) products(level, id, code, type) Task: Retrieve value from orders whose status is found in products rows where code matches the outer record. SQL:
SELECT value FROM orders AS kab WHERE status IN ( SELECT status FROM products AS nad WHERE nad.code = kab.code );
{ "outer_table": "orders", "inner_table": "products", "outer_alias": "kab", "inner_alias": "nad", "proj_col": "value", "filter_col": "status", "join_col": "code", "correlated_ref": "kab.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07781
train
v2
Schema: transactions (alias: gev)(name, id, code, type) branches(code, status, type, date) Task: Find salary from transactions where a matching record exists in branches with the same code. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = gev.code );
{ "outer_table": "transactions", "inner_table": "branches", "outer_alias": "gev", "inner_alias": "agov", "proj_col": "salary", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07782
train
v1
Schema: requests (alias: ejof)(status, value, amount, level) tasks(amount, value, level, id) Task: Find code from requests where status appears in tasks entries with matching status. SQL:
SELECT code FROM requests AS ejof WHERE status IN ( SELECT status FROM tasks AS znob WHERE znob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_07783
train
v1
Schema: departments (alias: dov)(value, id, code, type) employees(id, status, value, amount) Task: Retrieve code from departments whose id is found in employees rows where id matches the outer record. SQL:
SELECT code FROM departments AS dov WHERE id IN ( SELECT id FROM employees AS bev WHERE bev.id = dov.id );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "code", "filter_col": "id", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07784
train
v3
Schema: managers (alias: hac)(level, name, status, salary) orders(id, amount, date, salary) Task: Find salary from managers where value exceeds the count of amount from orders for the same level. SQL:
SELECT salary FROM managers AS hac WHERE value > ( SELECT COUNT(amount) FROM orders AS kab WHERE kab.level = hac.level );
{ "outer_table": "managers", "inner_table": "orders", "outer_alias": "hac", "inner_alias": "kab", "proj_col": "salary", "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_07785
train
v3
Schema: staff (alias: xnob)(code, amount, date, status) regions(id, value, level, type) Task: Retrieve name from staff with amount above the AVG(value) of regions rows sharing the same code. SQL:
SELECT name FROM staff AS xnob WHERE amount > ( SELECT AVG(value) FROM regions AS okiv WHERE okiv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "regions", "outer_alias": "xnob", "inner_alias": "okiv", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07786
train
v2
Schema: projects (alias: uliv)(code, level, status, id) staff(amount, level, status, code) Task: Find salary from projects where a matching record exists in staff with the same type. SQL:
SELECT salary FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.type = uliv.type );
{ "outer_table": "projects", "inner_table": "staff", "outer_alias": "uliv", "inner_alias": "xnob", "proj_col": "salary", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07787
train
v1
Schema: projects (alias: uliv)(id, level, amount, name) tasks(level, name, date, value) Task: Retrieve id from projects whose id is found in tasks rows where id matches the outer record. SQL:
SELECT id FROM projects AS uliv WHERE id IN ( SELECT id FROM tasks AS znob WHERE znob.id = uliv.id );
{ "outer_table": "projects", "inner_table": "tasks", "outer_alias": "uliv", "inner_alias": "znob", "proj_col": "id", "filter_col": "id", "join_col": "id", "correlated_ref": "uliv.id", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_07788
train
v2
Schema: staff (alias: xnob)(id, status, date, level) employees(code, level, id, value) Task: Retrieve salary from staff that have at least one corresponding entry in employees sharing the same code. SQL:
SELECT salary FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.code = xnob.code );
{ "outer_table": "staff", "inner_table": "employees", "outer_alias": "xnob", "inner_alias": "bev", "proj_col": "salary", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07789
train
v3
Schema: items (alias: ikob)(value, type, level, amount) shipments(amount, status, level, name) Task: Find name from items where value exceeds the minimum value from shipments for the same type. SQL:
SELECT name FROM items AS ikob WHERE value > ( SELECT MIN(value) FROM shipments AS vnob WHERE vnob.type = ikob.type );
{ "outer_table": "items", "inner_table": "shipments", "outer_alias": "ikob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "value", "agg_col": "value", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07790
train
v3
Schema: tasks (alias: znob)(salary, value, level, code) regions(date, amount, level, value) Task: Retrieve code from tasks with salary above the AVG(value) of regions rows sharing the same id. SQL:
SELECT code FROM tasks AS znob WHERE salary > ( SELECT AVG(value) FROM regions AS okiv WHERE okiv.id = znob.id );
{ "outer_table": "tasks", "inner_table": "regions", "outer_alias": "znob", "inner_alias": "okiv", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_07791
train
v1
Schema: transactions (alias: gev)(status, id, code, date) managers(value, date, amount, level) Task: Find name from transactions where id appears in managers entries with matching code. SQL:
SELECT name FROM transactions AS gev WHERE id IN ( SELECT id FROM managers AS hac WHERE hac.code = gev.code );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "gev", "inner_alias": "hac", "proj_col": "name", "filter_col": "id", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07792
train
v2
Schema: invoices (alias: fal)(amount, status, salary, name) items(code, name, date, value) Task: Retrieve id from invoices that have at least one corresponding entry in items sharing the same code. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.code = fal.code );
{ "outer_table": "invoices", "inner_table": "items", "outer_alias": "fal", "inner_alias": "ikob", "proj_col": "id", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07793
train
v3
Schema: schedules (alias: vmob)(level, value, date, amount) projects(type, date, salary, status) Task: Find id from schedules where value exceeds the maximum amount from projects for the same id. SQL:
SELECT id FROM schedules AS vmob WHERE value > ( SELECT MAX(amount) FROM projects AS uliv WHERE uliv.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "id", "filter_col": "value", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_07794
train
v1
Schema: invoices (alias: fal)(date, status, type, code) staff(status, salary, code, name) Task: Retrieve code from invoices whose status is found in staff rows where status matches the outer record. SQL:
SELECT code FROM invoices AS fal WHERE status IN ( SELECT status FROM staff AS xnob WHERE xnob.status = fal.status );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "code", "filter_col": "status", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07795
train
v2
Schema: transactions (alias: gev)(level, type, code, value) items(date, id, value, level) Task: Retrieve amount from transactions that have at least one corresponding entry in items sharing the same type. SQL:
SELECT amount FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.type = gev.type );
{ "outer_table": "transactions", "inner_table": "items", "outer_alias": "gev", "inner_alias": "ikob", "proj_col": "amount", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07796
train
v2
Schema: items (alias: ikob)(id, salary, date, value) schedules(salary, amount, date, id) Task: Retrieve id from items that have at least one corresponding entry in schedules sharing the same type. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.type = ikob.type );
{ "outer_table": "items", "inner_table": "schedules", "outer_alias": "ikob", "inner_alias": "vmob", "proj_col": "id", "join_col": "type", "correlated_ref": "ikob.type", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_07797
train
v1
Schema: orders (alias: kab)(salary, value, status, amount) employees(value, salary, level, date) Task: Select value from orders where code exists in employees for the same status. SQL:
SELECT value FROM orders AS kab WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.status = kab.status );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "value", "filter_col": "code", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_07798
train
v3
Schema: staff (alias: xnob)(level, id, name, type) items(amount, level, id, salary) Task: Retrieve name from staff with salary above the AVG(amount) of items rows sharing the same status. SQL:
SELECT name FROM staff AS xnob WHERE salary > ( SELECT AVG(amount) FROM items AS ikob WHERE ikob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "items", "outer_alias": "xnob", "inner_alias": "ikob", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_07799
train