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: departments (alias: dov)(amount, date, value, name) customers(status, amount, code, name) Task: Find code from departments where a matching record exists in customers with the same id. SQL:
SELECT code FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.id = dov.id );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "code", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04900
train
v3
Schema: regions (alias: okiv)(date, salary, id, code) managers(name, type, salary, date) Task: Find value from regions where salary exceeds the maximum salary from managers for the same status. SQL:
SELECT value FROM regions AS okiv WHERE salary > ( SELECT MAX(salary) FROM managers AS hac WHERE hac.status = okiv.status );
{ "outer_table": "regions", "inner_table": "managers", "outer_alias": "okiv", "inner_alias": "hac", "proj_col": "value", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04901
train
v3
Schema: products (alias: nad)(amount, name, level, code) tasks(level, date, id, amount) Task: Retrieve value from products with amount above the MAX(salary) of tasks rows sharing the same code. SQL:
SELECT value FROM products AS nad WHERE amount > ( SELECT MAX(salary) FROM tasks AS znob WHERE znob.code = nad.code );
{ "outer_table": "products", "inner_table": "tasks", "outer_alias": "nad", "inner_alias": "znob", "proj_col": "value", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04902
train
v1
Schema: projects (alias: uliv)(code, type, status, amount) schedules(date, status, salary, amount) Task: Select value from projects where status exists in schedules for the same status. SQL:
SELECT value FROM projects AS uliv WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.status = uliv.status );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "value", "filter_col": "status", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04903
train
v1
Schema: requests (alias: ejof)(amount, name, id, salary) tasks(amount, name, value, status) Task: Find amount from requests where code appears in tasks entries with matching code. SQL:
SELECT amount FROM requests AS ejof WHERE code IN ( SELECT code FROM tasks AS znob WHERE znob.code = ejof.code );
{ "outer_table": "requests", "inner_table": "tasks", "outer_alias": "ejof", "inner_alias": "znob", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_04904
train
v2
Schema: schedules (alias: vmob)(code, status, type, name) customers(name, value, amount, status) Task: Retrieve salary from schedules that have at least one corresponding entry in customers sharing the same code. SQL:
SELECT salary FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = vmob.code );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "vmob", "inner_alias": "lex", "proj_col": "salary", "join_col": "code", "correlated_ref": "vmob.code", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04905
train
v3
Schema: transactions (alias: gev)(name, salary, id, code) shipments(status, date, level, amount) Task: Retrieve amount from transactions with value above the COUNT(amount) of shipments rows sharing the same code. SQL:
SELECT amount FROM transactions AS gev WHERE value > ( SELECT COUNT(amount) FROM shipments AS vnob WHERE vnob.code = gev.code );
{ "outer_table": "transactions", "inner_table": "shipments", "outer_alias": "gev", "inner_alias": "vnob", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "gev.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04906
train
v2
Schema: employees (alias: bev)(level, name, value, id) projects(amount, salary, level, code) Task: Find amount from employees where a matching record exists in projects with the same status. SQL:
SELECT amount FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.status = bev.status );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "amount", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04907
train
v2
Schema: products (alias: nad)(value, status, salary, type) branches(date, value, name, salary) Task: Retrieve amount from products that have at least one corresponding entry in branches sharing the same type. SQL:
SELECT amount FROM products AS nad WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.type = nad.type );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "amount", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04908
train
v2
Schema: accounts (alias: jac)(name, salary, level, code) categories(level, status, salary, name) Task: Retrieve value from accounts that have at least one corresponding entry in categories sharing the same type. SQL:
SELECT value FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = jac.type );
{ "outer_table": "accounts", "inner_table": "categories", "outer_alias": "jac", "inner_alias": "egiv", "proj_col": "value", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04909
train
v3
Schema: managers (alias: hac)(amount, type, value, code) products(type, id, level, code) Task: Retrieve value from managers with salary above the SUM(amount) of products rows sharing the same code. SQL:
SELECT value FROM managers AS hac WHERE salary > ( SELECT SUM(amount) FROM products AS nad WHERE nad.code = hac.code );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "hac", "inner_alias": "nad", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04910
train
v2
Schema: customers (alias: lex)(id, code, date, type) schedules(date, value, salary, status) Task: Retrieve name from customers that have at least one corresponding entry in schedules sharing the same status. SQL:
SELECT name FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM schedules AS vmob WHERE vmob.status = lex.status );
{ "outer_table": "customers", "inner_table": "schedules", "outer_alias": "lex", "inner_alias": "vmob", "proj_col": "name", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04911
train
v3
Schema: customers (alias: lex)(type, level, id, salary) staff(status, amount, id, salary) Task: Retrieve name from customers with amount above the COUNT(amount) of staff rows sharing the same id. SQL:
SELECT name FROM customers AS lex WHERE amount > ( SELECT COUNT(amount) FROM staff AS xnob WHERE xnob.id = lex.id );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04912
train
v3
Schema: products (alias: nad)(salary, value, status, amount) transactions(type, amount, value, name) Task: Retrieve amount from products with salary above the AVG(value) of transactions rows sharing the same id. SQL:
SELECT amount FROM products AS nad WHERE salary > ( SELECT AVG(value) FROM transactions AS gev WHERE gev.id = nad.id );
{ "outer_table": "products", "inner_table": "transactions", "outer_alias": "nad", "inner_alias": "gev", "proj_col": "amount", "filter_col": "salary", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "nad.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04913
train
v3
Schema: projects (alias: uliv)(status, value, level, id) accounts(name, amount, type, value) Task: Retrieve id from projects with salary above the AVG(amount) of accounts rows sharing the same level. SQL:
SELECT id FROM projects AS uliv WHERE salary > ( SELECT AVG(amount) FROM accounts AS jac WHERE jac.level = uliv.level );
{ "outer_table": "projects", "inner_table": "accounts", "outer_alias": "uliv", "inner_alias": "jac", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04914
train
v1
Schema: customers (alias: lex)(level, value, salary, amount) managers(value, amount, status, name) Task: Find salary from customers where code appears in managers entries with matching id. SQL:
SELECT salary FROM customers AS lex WHERE code IN ( SELECT code 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": "code", "join_col": "id", "correlated_ref": "lex.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04915
train
v2
Schema: orders (alias: kab)(type, date, level, id) branches(salary, amount, status, value) Task: Retrieve code from orders that have at least one corresponding entry in branches sharing the same level. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.level = kab.level );
{ "outer_table": "orders", "inner_table": "branches", "outer_alias": "kab", "inner_alias": "agov", "proj_col": "code", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04916
train
v2
Schema: managers (alias: hac)(date, status, type, code) sales(amount, level, id, salary) Task: Retrieve code from managers that have at least one corresponding entry in sales sharing the same type. SQL:
SELECT code FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.type = hac.type );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "code", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04917
train
v3
Schema: shipments (alias: vnob)(name, status, date, amount) managers(code, salary, name, value) Task: Find code from shipments where salary exceeds the minimum salary from managers for the same status. SQL:
SELECT code FROM shipments AS vnob WHERE salary > ( SELECT MIN(salary) FROM managers AS hac WHERE hac.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "managers", "outer_alias": "vnob", "inner_alias": "hac", "proj_col": "code", "filter_col": "salary", "agg_col": "salary", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_04918
train
v2
Schema: managers (alias: hac)(code, date, id, value) requests(id, value, status, name) Task: Retrieve amount from managers that have at least one corresponding entry in requests sharing the same status. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = hac.status );
{ "outer_table": "managers", "inner_table": "requests", "outer_alias": "hac", "inner_alias": "ejof", "proj_col": "amount", "join_col": "status", "correlated_ref": "hac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04919
train
v1
Schema: projects (alias: uliv)(salary, level, type, code) categories(value, status, name, id) Task: Select code from projects where level exists in categories for the same status. SQL:
SELECT code FROM projects AS uliv WHERE level IN ( SELECT level FROM categories AS egiv WHERE egiv.status = uliv.status );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "code", "filter_col": "level", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04920
train
v2
Schema: categories (alias: egiv)(status, code, id, date) products(code, id, type, name) Task: Retrieve value from categories that have at least one corresponding entry in products sharing the same type. SQL:
SELECT value FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = egiv.type );
{ "outer_table": "categories", "inner_table": "products", "outer_alias": "egiv", "inner_alias": "nad", "proj_col": "value", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_04921
train
v3
Schema: items (alias: ikob)(level, name, id, status) regions(name, date, type, id) Task: Retrieve salary from items with salary above the MIN(amount) of regions rows sharing the same status. SQL:
SELECT salary FROM items AS ikob WHERE salary > ( SELECT MIN(amount) FROM regions AS okiv WHERE okiv.status = ikob.status );
{ "outer_table": "items", "inner_table": "regions", "outer_alias": "ikob", "inner_alias": "okiv", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04922
train
v1
Schema: managers (alias: hac)(code, date, level, name) sales(value, date, salary, type) Task: Find name from managers where type appears in sales entries with matching level. SQL:
SELECT name FROM managers AS hac WHERE type IN ( SELECT type FROM sales AS cif WHERE cif.level = hac.level );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "name", "filter_col": "type", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04923
train
v1
Schema: employees (alias: bev)(status, amount, code, salary) branches(level, amount, status, code) Task: Retrieve amount from employees whose code is found in branches rows where id matches the outer record. SQL:
SELECT amount FROM employees AS bev WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.id = bev.id );
{ "outer_table": "employees", "inner_table": "branches", "outer_alias": "bev", "inner_alias": "agov", "proj_col": "amount", "filter_col": "code", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04924
train
v1
Schema: sales (alias: cif)(salary, name, date, level) departments(level, id, salary, date) Task: Select salary from sales where type exists in departments for the same type. SQL:
SELECT salary FROM sales AS cif WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.type = cif.type );
{ "outer_table": "sales", "inner_table": "departments", "outer_alias": "cif", "inner_alias": "dov", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04925
train
v3
Schema: employees (alias: bev)(date, value, id, code) projects(amount, value, date, code) Task: Retrieve salary from employees with salary above the AVG(amount) of projects rows sharing the same level. SQL:
SELECT salary FROM employees AS bev WHERE salary > ( SELECT AVG(amount) FROM projects AS uliv WHERE uliv.level = bev.level );
{ "outer_table": "employees", "inner_table": "projects", "outer_alias": "bev", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04926
train
v3
Schema: staff (alias: xnob)(date, id, level, name) managers(status, name, code, type) Task: Find name from staff where amount exceeds the count of salary from managers for the same level. SQL:
SELECT name FROM staff AS xnob WHERE amount > ( SELECT COUNT(salary) FROM managers AS hac WHERE hac.level = xnob.level );
{ "outer_table": "staff", "inner_table": "managers", "outer_alias": "xnob", "inner_alias": "hac", "proj_col": "name", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_04927
train
v1
Schema: managers (alias: hac)(code, date, salary, level) employees(code, id, name, salary) Task: Retrieve id from managers whose type is found in employees rows where level matches the outer record. SQL:
SELECT id FROM managers AS hac WHERE type IN ( SELECT type FROM employees AS bev WHERE bev.level = hac.level );
{ "outer_table": "managers", "inner_table": "employees", "outer_alias": "hac", "inner_alias": "bev", "proj_col": "id", "filter_col": "type", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04928
train
v3
Schema: managers (alias: hac)(id, code, date, value) categories(code, level, date, amount) Task: Find salary from managers where salary exceeds the count of value from categories for the same code. SQL:
SELECT salary FROM managers AS hac WHERE salary > ( SELECT COUNT(value) FROM categories AS egiv WHERE egiv.code = hac.code );
{ "outer_table": "managers", "inner_table": "categories", "outer_alias": "hac", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "salary", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04929
train
v3
Schema: schedules (alias: vmob)(salary, id, status, value) shipments(type, status, level, id) Task: Retrieve value from schedules with salary above the MAX(amount) of shipments rows sharing the same id. SQL:
SELECT value FROM schedules AS vmob WHERE salary > ( SELECT MAX(amount) FROM shipments AS vnob WHERE vnob.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "shipments", "outer_alias": "vmob", "inner_alias": "vnob", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04930
train
v1
Schema: products (alias: nad)(id, salary, status, type) managers(level, type, salary, id) Task: Retrieve amount from products whose code is found in managers rows where type matches the outer record. SQL:
SELECT amount FROM products AS nad WHERE code IN ( SELECT code FROM managers AS hac WHERE hac.type = nad.type );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "nad", "inner_alias": "hac", "proj_col": "amount", "filter_col": "code", "join_col": "type", "correlated_ref": "nad.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04931
train
v3
Schema: staff (alias: xnob)(date, value, amount, salary) branches(value, type, level, date) Task: Retrieve code from staff with value above the MAX(salary) of branches rows sharing the same level. SQL:
SELECT code FROM staff AS xnob WHERE value > ( SELECT MAX(salary) FROM branches AS agov WHERE agov.level = xnob.level );
{ "outer_table": "staff", "inner_table": "branches", "outer_alias": "xnob", "inner_alias": "agov", "proj_col": "code", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_04932
train
v1
Schema: staff (alias: xnob)(date, code, level, status) shipments(date, status, salary, value) Task: Select name from staff where level exists in shipments for the same status. SQL:
SELECT name FROM staff AS xnob WHERE level IN ( SELECT level FROM shipments AS vnob WHERE vnob.status = xnob.status );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "name", "filter_col": "level", "join_col": "status", "correlated_ref": "xnob.status", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_04933
train
v3
Schema: invoices (alias: fal)(salary, value, code, level) tasks(date, amount, value, code) Task: Find code from invoices where amount exceeds the maximum amount from tasks for the same level. SQL:
SELECT code FROM invoices AS fal WHERE amount > ( SELECT MAX(amount) 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": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04934
train
v2
Schema: shipments (alias: vnob)(salary, code, type, name) requests(salary, type, name, code) Task: Retrieve value from shipments that have at least one corresponding entry in requests sharing the same code. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "requests", "outer_alias": "vnob", "inner_alias": "ejof", "proj_col": "value", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_04935
train
v2
Schema: schedules (alias: vmob)(level, value, code, name) managers(code, status, date, salary) Task: Retrieve name from schedules that have at least one corresponding entry in managers sharing the same status. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = vmob.status );
{ "outer_table": "schedules", "inner_table": "managers", "outer_alias": "vmob", "inner_alias": "hac", "proj_col": "name", "join_col": "status", "correlated_ref": "vmob.status", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04936
train
v2
Schema: schedules (alias: vmob)(id, code, level, value) employees(amount, code, value, id) Task: Find amount from schedules where a matching record exists in employees with the same level. SQL:
SELECT amount FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "employees", "outer_alias": "vmob", "inner_alias": "bev", "proj_col": "amount", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04937
train
v2
Schema: projects (alias: uliv)(date, id, salary, type) requests(salary, name, date, value) Task: Retrieve id from projects that have at least one corresponding entry in requests sharing the same status. SQL:
SELECT id FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.status = uliv.status );
{ "outer_table": "projects", "inner_table": "requests", "outer_alias": "uliv", "inner_alias": "ejof", "proj_col": "id", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04938
train
v3
Schema: tasks (alias: znob)(level, date, status, amount) invoices(code, amount, level, id) Task: Find salary from tasks where value exceeds the maximum value from invoices for the same id. SQL:
SELECT salary FROM tasks AS znob WHERE value > ( SELECT MAX(value) FROM invoices AS fal WHERE fal.id = znob.id );
{ "outer_table": "tasks", "inner_table": "invoices", "outer_alias": "znob", "inner_alias": "fal", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04939
train
v3
Schema: employees (alias: bev)(amount, id, name, date) departments(id, level, name, type) Task: Retrieve salary from employees with amount above the AVG(value) of departments rows sharing the same id. SQL:
SELECT salary FROM employees AS bev WHERE amount > ( SELECT AVG(value) FROM departments AS dov WHERE dov.id = bev.id );
{ "outer_table": "employees", "inner_table": "departments", "outer_alias": "bev", "inner_alias": "dov", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04940
train
v1
Schema: branches (alias: agov)(date, amount, type, id) orders(type, status, date, salary) Task: Select value from branches where id exists in orders for the same code. SQL:
SELECT value FROM branches AS agov WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.code = agov.code );
{ "outer_table": "branches", "inner_table": "orders", "outer_alias": "agov", "inner_alias": "kab", "proj_col": "value", "filter_col": "id", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04941
train
v2
Schema: projects (alias: uliv)(salary, type, status, level) items(level, id, code, type) Task: Retrieve code from projects that have at least one corresponding entry in items sharing the same level. SQL:
SELECT code FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.level = uliv.level );
{ "outer_table": "projects", "inner_table": "items", "outer_alias": "uliv", "inner_alias": "ikob", "proj_col": "code", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04942
train
v3
Schema: customers (alias: lex)(id, type, level, salary) categories(value, type, status, level) Task: Retrieve salary from customers with amount above the AVG(value) of categories rows sharing the same code. SQL:
SELECT salary FROM customers AS lex WHERE amount > ( SELECT AVG(value) FROM categories AS egiv WHERE egiv.code = lex.code );
{ "outer_table": "customers", "inner_table": "categories", "outer_alias": "lex", "inner_alias": "egiv", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04943
train
v3
Schema: orders (alias: kab)(id, date, name, salary) requests(name, type, amount, value) Task: Find code from orders where amount exceeds the count of salary from requests for the same level. SQL:
SELECT code FROM orders AS kab WHERE amount > ( SELECT COUNT(salary) FROM requests AS ejof WHERE ejof.level = kab.level );
{ "outer_table": "orders", "inner_table": "requests", "outer_alias": "kab", "inner_alias": "ejof", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04944
train
v3
Schema: managers (alias: hac)(status, level, type, date) products(value, name, code, amount) Task: Retrieve code from managers with salary above the SUM(amount) of products rows sharing the same level. SQL:
SELECT code FROM managers AS hac WHERE salary > ( SELECT SUM(amount) FROM products AS nad WHERE nad.level = hac.level );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "hac", "inner_alias": "nad", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "hac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04945
train
v3
Schema: categories (alias: egiv)(salary, code, status, name) sales(level, value, date, code) Task: Find salary from categories where salary exceeds the minimum amount from sales for the same type. SQL:
SELECT salary FROM categories AS egiv WHERE salary > ( SELECT MIN(amount) FROM sales AS cif WHERE cif.type = egiv.type );
{ "outer_table": "categories", "inner_table": "sales", "outer_alias": "egiv", "inner_alias": "cif", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_04946
train
v1
Schema: products (alias: nad)(name, type, date, code) employees(id, salary, date, name) Task: Select id from products where level exists in employees for the same status. SQL:
SELECT id FROM products AS nad WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.status = nad.status );
{ "outer_table": "products", "inner_table": "employees", "outer_alias": "nad", "inner_alias": "bev", "proj_col": "id", "filter_col": "level", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04947
train
v2
Schema: invoices (alias: fal)(id, amount, name, level) projects(code, salary, level, value) Task: Find code from invoices where a matching record exists in projects with the same level. SQL:
SELECT code FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.level = fal.level );
{ "outer_table": "invoices", "inner_table": "projects", "outer_alias": "fal", "inner_alias": "uliv", "proj_col": "code", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04948
train
v2
Schema: orders (alias: kab)(name, amount, type, salary) shipments(type, level, status, value) Task: Find code from orders where a matching record exists in shipments with the same type. SQL:
SELECT code FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = kab.type );
{ "outer_table": "orders", "inner_table": "shipments", "outer_alias": "kab", "inner_alias": "vnob", "proj_col": "code", "join_col": "type", "correlated_ref": "kab.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04949
train
v1
Schema: invoices (alias: fal)(value, date, level, status) regions(amount, id, type, value) Task: Retrieve name from invoices whose status is found in regions rows where id matches the outer record. SQL:
SELECT name FROM invoices AS fal WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.id = fal.id );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "name", "filter_col": "status", "join_col": "id", "correlated_ref": "fal.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04950
train
v2
Schema: invoices (alias: fal)(id, name, value, level) staff(name, id, level, amount) Task: Retrieve code from invoices that have at least one corresponding entry in staff sharing the same status. SQL:
SELECT code FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = fal.status );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "code", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04951
train
v2
Schema: managers (alias: hac)(salary, code, date, id) sales(value, id, level, type) Task: Retrieve salary from managers that have at least one corresponding entry in sales sharing the same id. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.id = hac.id );
{ "outer_table": "managers", "inner_table": "sales", "outer_alias": "hac", "inner_alias": "cif", "proj_col": "salary", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04952
train
v3
Schema: categories (alias: egiv)(status, date, value, code) shipments(level, code, type, status) Task: Find salary from categories where amount exceeds the total value from shipments for the same type. SQL:
SELECT salary FROM categories AS egiv WHERE amount > ( SELECT SUM(value) FROM shipments AS vnob WHERE vnob.type = egiv.type );
{ "outer_table": "categories", "inner_table": "shipments", "outer_alias": "egiv", "inner_alias": "vnob", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_04953
train
v2
Schema: regions (alias: okiv)(name, status, date, amount) categories(name, status, level, value) Task: Find name from regions where a matching record exists in categories with the same type. SQL:
SELECT name FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.type = okiv.type );
{ "outer_table": "regions", "inner_table": "categories", "outer_alias": "okiv", "inner_alias": "egiv", "proj_col": "name", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04954
train
v2
Schema: requests (alias: ejof)(value, status, id, code) branches(date, code, name, status) Task: Retrieve salary from requests that have at least one corresponding entry in branches sharing the same code. SQL:
SELECT salary FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.code = ejof.code );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "salary", "join_col": "code", "correlated_ref": "ejof.code", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_04955
train
v1
Schema: regions (alias: okiv)(code, id, date, name) tasks(type, salary, date, name) Task: Select name from regions where type exists in tasks for the same type. SQL:
SELECT name FROM regions AS okiv WHERE type IN ( SELECT type FROM tasks AS znob WHERE znob.type = okiv.type );
{ "outer_table": "regions", "inner_table": "tasks", "outer_alias": "okiv", "inner_alias": "znob", "proj_col": "name", "filter_col": "type", "join_col": "type", "correlated_ref": "okiv.type", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04956
train
v3
Schema: orders (alias: kab)(salary, name, value, status) transactions(name, value, id, amount) Task: Find name from orders where value exceeds the count of amount from transactions for the same level. SQL:
SELECT name FROM orders AS kab WHERE value > ( SELECT COUNT(amount) FROM transactions AS gev WHERE gev.level = kab.level );
{ "outer_table": "orders", "inner_table": "transactions", "outer_alias": "kab", "inner_alias": "gev", "proj_col": "name", "filter_col": "value", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04957
train
v1
Schema: schedules (alias: vmob)(code, level, date, name) categories(amount, id, value, status) Task: Find code from schedules where status appears in categories entries with matching level. SQL:
SELECT code FROM schedules AS vmob WHERE status IN ( SELECT status FROM categories AS egiv WHERE egiv.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "categories", "outer_alias": "vmob", "inner_alias": "egiv", "proj_col": "code", "filter_col": "status", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04958
train
v2
Schema: managers (alias: hac)(type, salary, id, name) products(level, value, amount, name) Task: Find name from managers where a matching record exists in products with the same code. SQL:
SELECT name FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.code = hac.code );
{ "outer_table": "managers", "inner_table": "products", "outer_alias": "hac", "inner_alias": "nad", "proj_col": "name", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04959
train
v2
Schema: shipments (alias: vnob)(date, amount, type, salary) transactions(name, value, level, id) Task: Retrieve value from shipments that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT value FROM shipments AS vnob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "transactions", "outer_alias": "vnob", "inner_alias": "gev", "proj_col": "value", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_04960
train
v1
Schema: customers (alias: lex)(code, amount, value, salary) branches(amount, salary, date, status) Task: Find salary from customers where level appears in branches entries with matching level. SQL:
SELECT salary FROM customers AS lex WHERE level IN ( SELECT level FROM branches AS agov WHERE agov.level = lex.level );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "salary", "filter_col": "level", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04961
train
v1
Schema: accounts (alias: jac)(date, type, id, salary) regions(status, salary, name, level) Task: Select id from accounts where id exists in regions for the same type. SQL:
SELECT id FROM accounts AS jac WHERE id IN ( SELECT id FROM regions AS okiv WHERE okiv.type = jac.type );
{ "outer_table": "accounts", "inner_table": "regions", "outer_alias": "jac", "inner_alias": "okiv", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04962
train
v2
Schema: items (alias: ikob)(level, date, name, id) projects(type, amount, level, status) Task: Find value from items where a matching record exists in projects with the same code. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.code = ikob.code );
{ "outer_table": "items", "inner_table": "projects", "outer_alias": "ikob", "inner_alias": "uliv", "proj_col": "value", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_04963
train
v3
Schema: projects (alias: uliv)(value, date, code, id) shipments(date, type, code, level) Task: Retrieve code from projects with amount above the COUNT(value) of shipments rows sharing the same code. SQL:
SELECT code FROM projects AS uliv WHERE amount > ( SELECT COUNT(value) FROM shipments AS vnob WHERE vnob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "shipments", "outer_alias": "uliv", "inner_alias": "vnob", "proj_col": "code", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04964
train
v1
Schema: departments (alias: dov)(name, amount, id, type) employees(value, amount, level, name) Task: Select id from departments where code exists in employees for the same id. SQL:
SELECT id FROM departments AS dov WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.id = dov.id );
{ "outer_table": "departments", "inner_table": "employees", "outer_alias": "dov", "inner_alias": "bev", "proj_col": "id", "filter_col": "code", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04965
train
v2
Schema: products (alias: nad)(value, status, id, level) managers(amount, id, type, status) Task: Retrieve code from products that have at least one corresponding entry in managers sharing the same status. SQL:
SELECT code FROM products AS nad WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.status = nad.status );
{ "outer_table": "products", "inner_table": "managers", "outer_alias": "nad", "inner_alias": "hac", "proj_col": "code", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04966
train
v1
Schema: sales (alias: cif)(name, salary, level, code) regions(value, status, code, type) Task: Retrieve code from sales whose level is found in regions rows where type matches the outer record. SQL:
SELECT code FROM sales AS cif WHERE level IN ( SELECT level FROM regions AS okiv WHERE okiv.type = cif.type );
{ "outer_table": "sales", "inner_table": "regions", "outer_alias": "cif", "inner_alias": "okiv", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04967
train
v2
Schema: sales (alias: cif)(value, salary, id, status) items(name, level, date, salary) Task: Find amount from sales where a matching record exists in items with the same status. SQL:
SELECT amount FROM sales AS cif WHERE EXISTS ( SELECT 1 FROM items AS ikob WHERE ikob.status = cif.status );
{ "outer_table": "sales", "inner_table": "items", "outer_alias": "cif", "inner_alias": "ikob", "proj_col": "amount", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04968
train
v1
Schema: staff (alias: xnob)(salary, status, amount, name) accounts(amount, code, type, salary) Task: Retrieve salary from staff whose type is found in accounts rows where level matches the outer record. SQL:
SELECT salary FROM staff AS xnob WHERE type IN ( SELECT type 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": "type", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_04969
train
v2
Schema: customers (alias: lex)(date, amount, level, name) tasks(type, level, code, id) Task: Find code from customers where a matching record exists in tasks with the same level. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.level = lex.level );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "code", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04970
train
v1
Schema: categories (alias: egiv)(value, salary, level, status) items(type, amount, name, salary) Task: Retrieve id from categories whose level is found in items rows where code matches the outer record. SQL:
SELECT id FROM categories AS egiv WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.code = egiv.code );
{ "outer_table": "categories", "inner_table": "items", "outer_alias": "egiv", "inner_alias": "ikob", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_04971
train
v3
Schema: sales (alias: cif)(level, date, id, type) transactions(value, name, status, code) Task: Find value from sales where amount exceeds the count of amount from transactions for the same level. SQL:
SELECT value FROM sales AS cif WHERE amount > ( SELECT COUNT(amount) FROM transactions AS gev WHERE gev.level = cif.level );
{ "outer_table": "sales", "inner_table": "transactions", "outer_alias": "cif", "inner_alias": "gev", "proj_col": "value", "filter_col": "amount", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "cif.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04972
train
v3
Schema: requests (alias: ejof)(status, date, salary, level) sales(amount, status, name, date) Task: Retrieve name from requests with amount above the MIN(value) of sales rows sharing the same id. SQL:
SELECT name FROM requests AS ejof WHERE amount > ( SELECT MIN(value) FROM sales AS cif WHERE cif.id = ejof.id );
{ "outer_table": "requests", "inner_table": "sales", "outer_alias": "ejof", "inner_alias": "cif", "proj_col": "name", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_04973
train
v2
Schema: tasks (alias: znob)(salary, amount, id, code) employees(level, amount, id, status) Task: Find amount from tasks where a matching record exists in employees with the same id. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = znob.id );
{ "outer_table": "tasks", "inner_table": "employees", "outer_alias": "znob", "inner_alias": "bev", "proj_col": "amount", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04974
train
v2
Schema: regions (alias: okiv)(amount, id, status, salary) invoices(code, amount, date, id) Task: Retrieve value from regions that have at least one corresponding entry in invoices sharing the same level. SQL:
SELECT value FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.level = okiv.level );
{ "outer_table": "regions", "inner_table": "invoices", "outer_alias": "okiv", "inner_alias": "fal", "proj_col": "value", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04975
train
v1
Schema: tasks (alias: znob)(salary, status, type, value) staff(level, code, id, status) Task: Find id from tasks where id appears in staff entries with matching type. SQL:
SELECT id FROM tasks AS znob WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.type = znob.type );
{ "outer_table": "tasks", "inner_table": "staff", "outer_alias": "znob", "inner_alias": "xnob", "proj_col": "id", "filter_col": "id", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04976
train
v1
Schema: customers (alias: lex)(level, date, id, salary) projects(amount, code, status, level) Task: Find salary from customers where type appears in projects entries with matching level. SQL:
SELECT salary FROM customers AS lex WHERE type IN ( SELECT type FROM projects AS uliv WHERE uliv.level = lex.level );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "type", "join_col": "level", "correlated_ref": "lex.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04977
train
v1
Schema: staff (alias: xnob)(salary, id, code, name) shipments(name, value, type, salary) Task: Retrieve value from staff whose status is found in shipments rows where id matches the outer record. SQL:
SELECT value FROM staff AS xnob WHERE status IN ( SELECT status FROM shipments AS vnob WHERE vnob.id = xnob.id );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "value", "filter_col": "status", "join_col": "id", "correlated_ref": "xnob.id", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_04978
train
v2
Schema: tasks (alias: znob)(code, name, date, type) transactions(value, amount, date, code) Task: Retrieve amount from tasks that have at least one corresponding entry in transactions sharing the same code. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.code = znob.code );
{ "outer_table": "tasks", "inner_table": "transactions", "outer_alias": "znob", "inner_alias": "gev", "proj_col": "amount", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04979
train
v1
Schema: accounts (alias: jac)(id, level, salary, type) projects(status, level, date, value) Task: Find salary from accounts where level appears in projects entries with matching type. SQL:
SELECT salary FROM accounts AS jac WHERE level IN ( SELECT level FROM projects AS uliv WHERE uliv.type = jac.type );
{ "outer_table": "accounts", "inner_table": "projects", "outer_alias": "jac", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "level", "join_col": "type", "correlated_ref": "jac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04980
train
v2
Schema: projects (alias: uliv)(level, date, type, value) employees(type, code, name, date) Task: Find amount from projects where a matching record exists in employees with the same level. SQL:
SELECT amount FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.level = uliv.level );
{ "outer_table": "projects", "inner_table": "employees", "outer_alias": "uliv", "inner_alias": "bev", "proj_col": "amount", "join_col": "level", "correlated_ref": "uliv.level", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04981
train
v1
Schema: tasks (alias: znob)(type, id, salary, date) orders(name, level, type, amount) Task: Retrieve id from tasks whose id is found in orders rows where code matches the outer record. SQL:
SELECT id FROM tasks AS znob WHERE id IN ( SELECT id FROM orders AS kab WHERE kab.code = znob.code );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "id", "filter_col": "id", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_04982
train
v2
Schema: departments (alias: dov)(date, salary, status, name) customers(date, type, level, value) Task: Retrieve value from departments that have at least one corresponding entry in customers sharing the same type. SQL:
SELECT value FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.type = dov.type );
{ "outer_table": "departments", "inner_table": "customers", "outer_alias": "dov", "inner_alias": "lex", "proj_col": "value", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04983
train
v3
Schema: customers (alias: lex)(value, id, code, salary) staff(value, salary, amount, id) Task: Find code from customers where amount exceeds the minimum salary from staff for the same type. SQL:
SELECT code FROM customers AS lex WHERE amount > ( SELECT MIN(salary) FROM staff AS xnob WHERE xnob.type = lex.type );
{ "outer_table": "customers", "inner_table": "staff", "outer_alias": "lex", "inner_alias": "xnob", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "MIN", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04984
train
v2
Schema: staff (alias: xnob)(amount, value, type, status) shipments(value, level, status, date) Task: Retrieve id from staff that have at least one corresponding entry in shipments sharing the same type. SQL:
SELECT id FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.type = xnob.type );
{ "outer_table": "staff", "inner_table": "shipments", "outer_alias": "xnob", "inner_alias": "vnob", "proj_col": "id", "join_col": "type", "correlated_ref": "xnob.type", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_04985
train
v1
Schema: sales (alias: cif)(amount, value, type, name) items(status, amount, type, code) Task: Retrieve id from sales whose type is found in items rows where code matches the outer record. SQL:
SELECT id FROM sales AS cif WHERE type IN ( SELECT type FROM items AS ikob WHERE ikob.code = cif.code );
{ "outer_table": "sales", "inner_table": "items", "outer_alias": "cif", "inner_alias": "ikob", "proj_col": "id", "filter_col": "type", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04986
train
v1
Schema: products (alias: nad)(value, amount, id, type) departments(date, name, status, type) Task: Find amount from products where status appears in departments entries with matching status. SQL:
SELECT amount FROM products AS nad WHERE status IN ( SELECT status FROM departments AS dov WHERE dov.status = nad.status );
{ "outer_table": "products", "inner_table": "departments", "outer_alias": "nad", "inner_alias": "dov", "proj_col": "amount", "filter_col": "status", "join_col": "status", "correlated_ref": "nad.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04987
train
v2
Schema: schedules (alias: vmob)(salary, value, code, status) departments(salary, code, date, id) Task: Find id from schedules where a matching record exists in departments with the same level. SQL:
SELECT id FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "departments", "outer_alias": "vmob", "inner_alias": "dov", "proj_col": "id", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04988
train
v1
Schema: departments (alias: dov)(date, value, id, level) products(type, date, id, code) Task: Find value from departments where id appears in products entries with matching status. SQL:
SELECT value FROM departments AS dov WHERE id IN ( SELECT id FROM products AS nad WHERE nad.status = dov.status );
{ "outer_table": "departments", "inner_table": "products", "outer_alias": "dov", "inner_alias": "nad", "proj_col": "value", "filter_col": "id", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04989
train
v2
Schema: regions (alias: okiv)(date, status, name, salary) requests(status, type, salary, amount) Task: Find amount from regions where a matching record exists in requests with the same level. SQL:
SELECT amount FROM regions AS okiv WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.level = okiv.level );
{ "outer_table": "regions", "inner_table": "requests", "outer_alias": "okiv", "inner_alias": "ejof", "proj_col": "amount", "join_col": "level", "correlated_ref": "okiv.level", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_04990
train
v1
Schema: sales (alias: cif)(amount, value, date, name) customers(status, salary, name, amount) Task: Select value from sales where level exists in customers for the same code. SQL:
SELECT value FROM sales AS cif WHERE level IN ( SELECT level FROM customers AS lex WHERE lex.code = cif.code );
{ "outer_table": "sales", "inner_table": "customers", "outer_alias": "cif", "inner_alias": "lex", "proj_col": "value", "filter_col": "level", "join_col": "code", "correlated_ref": "cif.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04991
train
v3
Schema: shipments (alias: vnob)(value, amount, code, id) items(name, date, code, value) Task: Retrieve salary from shipments with value above the SUM(value) of items rows sharing the same type. SQL:
SELECT salary FROM shipments AS vnob WHERE value > ( SELECT SUM(value) FROM items AS ikob WHERE ikob.type = vnob.type );
{ "outer_table": "shipments", "inner_table": "items", "outer_alias": "vnob", "inner_alias": "ikob", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "vnob.type", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_04992
train
v3
Schema: sales (alias: cif)(salary, date, level, amount) accounts(value, salary, status, type) Task: Retrieve value from sales with amount above the MIN(value) of accounts rows sharing the same id. SQL:
SELECT value FROM sales AS cif WHERE amount > ( SELECT MIN(value) FROM accounts AS jac WHERE jac.id = cif.id );
{ "outer_table": "sales", "inner_table": "accounts", "outer_alias": "cif", "inner_alias": "jac", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "MIN", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_04993
train
v1
Schema: branches (alias: agov)(amount, type, date, salary) invoices(status, type, amount, value) Task: Retrieve salary from branches whose code is found in invoices rows where status matches the outer record. SQL:
SELECT salary FROM branches AS agov WHERE code IN ( SELECT code FROM invoices AS fal WHERE fal.status = agov.status );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "salary", "filter_col": "code", "join_col": "status", "correlated_ref": "agov.status", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_04994
train
v2
Schema: projects (alias: uliv)(name, date, level, status) managers(id, date, value, name) Task: Find value from projects where a matching record exists in managers with the same code. SQL:
SELECT value FROM projects AS uliv WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.code = uliv.code );
{ "outer_table": "projects", "inner_table": "managers", "outer_alias": "uliv", "inner_alias": "hac", "proj_col": "value", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04995
train
v2
Schema: schedules (alias: vmob)(name, amount, salary, id) requests(code, name, salary, id) Task: Retrieve id from schedules that have at least one corresponding entry in requests sharing the same level. SQL:
SELECT id FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "requests", "outer_alias": "vmob", "inner_alias": "ejof", "proj_col": "id", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_04996
train
v2
Schema: orders (alias: kab)(amount, level, salary, date) sales(salary, value, name, code) Task: Find amount from orders where a matching record exists in sales with 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_04997
train
v2
Schema: categories (alias: egiv)(amount, name, level, status) managers(date, value, salary, type) Task: Retrieve id from categories that have at least one corresponding entry in managers sharing the same type. SQL:
SELECT id 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": "id", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_04998
train
v3
Schema: projects (alias: uliv)(type, code, id, value) customers(level, salary, code, name) Task: Retrieve salary from projects with value above the MIN(amount) of customers rows sharing the same code. SQL:
SELECT salary FROM projects AS uliv WHERE value > ( SELECT MIN(amount) FROM customers AS lex WHERE lex.code = uliv.code );
{ "outer_table": "projects", "inner_table": "customers", "outer_alias": "uliv", "inner_alias": "lex", "proj_col": "salary", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_04999
train