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
v1
Schema: accounts (alias: jac)(id, name, status, value) employees(code, name, id, date) Task: Retrieve code from accounts whose level is found in employees rows where code matches the outer record. SQL:
SELECT code FROM accounts AS jac WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.code = jac.code );
{ "outer_table": "accounts", "inner_table": "employees", "outer_alias": "jac", "inner_alias": "bev", "proj_col": "code", "filter_col": "level", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02700
train
v3
Schema: requests (alias: ejof)(value, salary, amount, type) departments(amount, code, level, type) Task: Find amount from requests where salary exceeds the count of amount from departments for the same level. SQL:
SELECT amount FROM requests AS ejof WHERE salary > ( SELECT COUNT(amount) FROM departments AS dov WHERE dov.level = ejof.level );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "amount", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02701
train
v2
Schema: employees (alias: bev)(id, type, status, date) shipments(name, amount, level, value) Task: Retrieve id from employees that have at least one corresponding entry in shipments sharing the same id. SQL:
SELECT id FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.id = bev.id );
{ "outer_table": "employees", "inner_table": "shipments", "outer_alias": "bev", "inner_alias": "vnob", "proj_col": "id", "join_col": "id", "correlated_ref": "bev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02702
train
v2
Schema: managers (alias: hac)(code, date, name, level) transactions(level, date, salary, id) Task: Find salary from managers where a matching record exists in transactions with the same type. SQL:
SELECT salary FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM transactions AS gev WHERE gev.type = hac.type );
{ "outer_table": "managers", "inner_table": "transactions", "outer_alias": "hac", "inner_alias": "gev", "proj_col": "salary", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02703
train
v3
Schema: projects (alias: uliv)(id, type, name, status) categories(salary, status, date, level) Task: Retrieve id from projects with salary above the MAX(value) of categories rows sharing the same status. SQL:
SELECT id FROM projects AS uliv WHERE salary > ( SELECT MAX(value) FROM categories AS egiv WHERE egiv.status = uliv.status );
{ "outer_table": "projects", "inner_table": "categories", "outer_alias": "uliv", "inner_alias": "egiv", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "uliv.status", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02704
train
v1
Schema: items (alias: ikob)(status, level, code, type) requests(salary, code, status, name) Task: Select salary from items where status exists in requests for the same level. SQL:
SELECT salary FROM items AS ikob WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.level = ikob.level );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "ikob", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "status", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02705
train
v1
Schema: projects (alias: uliv)(status, code, type, id) departments(date, salary, code, value) Task: Retrieve salary from projects whose code is found in departments rows where code matches the outer record. SQL:
SELECT salary FROM projects AS uliv WHERE code IN ( SELECT code FROM departments AS dov WHERE dov.code = uliv.code );
{ "outer_table": "projects", "inner_table": "departments", "outer_alias": "uliv", "inner_alias": "dov", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02706
train
v3
Schema: items (alias: ikob)(amount, name, salary, status) requests(date, id, salary, status) Task: Retrieve salary from items with amount above the AVG(value) of requests rows sharing the same status. SQL:
SELECT salary FROM items AS ikob WHERE amount > ( SELECT AVG(value) FROM requests AS ejof WHERE ejof.status = ikob.status );
{ "outer_table": "items", "inner_table": "requests", "outer_alias": "ikob", "inner_alias": "ejof", "proj_col": "salary", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02707
train
v3
Schema: items (alias: ikob)(code, status, id, date) employees(level, code, status, date) Task: Find amount from items where amount exceeds the count of value from employees for the same id. SQL:
SELECT amount FROM items AS ikob WHERE amount > ( SELECT COUNT(value) FROM employees AS bev WHERE bev.id = ikob.id );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "amount", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02708
train
v1
Schema: customers (alias: lex)(status, salary, code, value) regions(code, type, value, level) Task: Retrieve value from customers whose status is found in regions rows where code matches the outer record. SQL:
SELECT value FROM customers AS lex WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.code = lex.code );
{ "outer_table": "customers", "inner_table": "regions", "outer_alias": "lex", "inner_alias": "okiv", "proj_col": "value", "filter_col": "status", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02709
train
v2
Schema: transactions (alias: gev)(code, date, id, salary) products(id, code, value, amount) Task: Find salary from transactions where a matching record exists in products with the same type. SQL:
SELECT salary FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = gev.type );
{ "outer_table": "transactions", "inner_table": "products", "outer_alias": "gev", "inner_alias": "nad", "proj_col": "salary", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02710
train
v2
Schema: items (alias: ikob)(name, value, code, level) sales(status, salary, code, amount) Task: Find value from items where a matching record exists in sales with the same level. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = ikob.level );
{ "outer_table": "items", "inner_table": "sales", "outer_alias": "ikob", "inner_alias": "cif", "proj_col": "value", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02711
train
v2
Schema: managers (alias: hac)(type, code, id, date) staff(salary, date, code, name) Task: Find amount from managers where a matching record exists in staff with the same id. SQL:
SELECT amount FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = hac.id );
{ "outer_table": "managers", "inner_table": "staff", "outer_alias": "hac", "inner_alias": "xnob", "proj_col": "amount", "join_col": "id", "correlated_ref": "hac.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02712
train
v1
Schema: branches (alias: agov)(salary, level, date, value) invoices(id, level, amount, name) Task: Select name from branches where level exists in invoices for the same level. SQL:
SELECT name FROM branches AS agov WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.level = agov.level );
{ "outer_table": "branches", "inner_table": "invoices", "outer_alias": "agov", "inner_alias": "fal", "proj_col": "name", "filter_col": "level", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02713
train
v2
Schema: managers (alias: hac)(salary, status, type, code) tasks(code, value, date, status) Task: Find value from managers where a matching record exists in tasks with the same code. SQL:
SELECT value FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.code = hac.code );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "value", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02714
train
v3
Schema: customers (alias: lex)(salary, date, id, status) managers(date, level, value, amount) Task: Retrieve salary from customers with value above the MAX(value) of managers rows sharing the same type. SQL:
SELECT salary FROM customers AS lex WHERE value > ( SELECT MAX(value) FROM managers AS hac WHERE hac.type = lex.type );
{ "outer_table": "customers", "inner_table": "managers", "outer_alias": "lex", "inner_alias": "hac", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02715
train
v2
Schema: products (alias: nad)(status, code, date, name) customers(id, date, level, salary) Task: Find name from products where a matching record exists in customers with the same code. SQL:
SELECT name FROM products AS nad WHERE EXISTS ( SELECT 1 FROM customers AS lex WHERE lex.code = nad.code );
{ "outer_table": "products", "inner_table": "customers", "outer_alias": "nad", "inner_alias": "lex", "proj_col": "name", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02716
train
v1
Schema: categories (alias: egiv)(name, amount, value, code) employees(amount, salary, level, name) Task: Select id from categories where level exists in employees for the same code. SQL:
SELECT id FROM categories AS egiv WHERE level IN ( SELECT level FROM employees AS bev WHERE bev.code = egiv.code );
{ "outer_table": "categories", "inner_table": "employees", "outer_alias": "egiv", "inner_alias": "bev", "proj_col": "id", "filter_col": "level", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02717
train
v3
Schema: sales (alias: cif)(value, level, code, id) schedules(name, date, amount, type) Task: Retrieve code from sales with amount above the MAX(amount) of schedules rows sharing the same type. SQL:
SELECT code FROM sales AS cif WHERE amount > ( SELECT MAX(amount) FROM schedules AS vmob WHERE vmob.type = cif.type );
{ "outer_table": "sales", "inner_table": "schedules", "outer_alias": "cif", "inner_alias": "vmob", "proj_col": "code", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02718
train
v2
Schema: orders (alias: kab)(id, amount, type, level) employees(date, salary, name, value) Task: Find name from orders where a matching record exists in employees with the same id. SQL:
SELECT name FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM employees AS bev WHERE bev.id = kab.id );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "name", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02719
train
v2
Schema: accounts (alias: jac)(name, salary, level, id) managers(salary, level, date, value) Task: Retrieve amount from accounts that have at least one corresponding entry in managers sharing the same level. SQL:
SELECT amount FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.level = jac.level );
{ "outer_table": "accounts", "inner_table": "managers", "outer_alias": "jac", "inner_alias": "hac", "proj_col": "amount", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02720
train
v1
Schema: orders (alias: kab)(id, type, status, amount) employees(amount, date, value, code) Task: Select amount from orders where code exists in employees for the same id. SQL:
SELECT amount FROM orders AS kab WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.id = kab.id );
{ "outer_table": "orders", "inner_table": "employees", "outer_alias": "kab", "inner_alias": "bev", "proj_col": "amount", "filter_col": "code", "join_col": "id", "correlated_ref": "kab.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02721
train
v2
Schema: accounts (alias: jac)(type, value, id, date) invoices(name, status, id, salary) Task: Retrieve name from accounts that have at least one corresponding entry in invoices sharing the same status. SQL:
SELECT name FROM accounts AS jac WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.status = jac.status );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "name", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02722
train
v2
Schema: categories (alias: egiv)(name, code, date, type) orders(name, date, code, id) Task: Find salary from categories where a matching record exists in orders with the same level. SQL:
SELECT salary FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = egiv.level );
{ "outer_table": "categories", "inner_table": "orders", "outer_alias": "egiv", "inner_alias": "kab", "proj_col": "salary", "join_col": "level", "correlated_ref": "egiv.level", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02723
train
v3
Schema: departments (alias: dov)(code, id, amount, type) requests(name, value, amount, salary) Task: Retrieve name from departments with salary above the SUM(amount) of requests rows sharing the same type. SQL:
SELECT name FROM departments AS dov WHERE salary > ( SELECT SUM(amount) FROM requests AS ejof WHERE ejof.type = dov.type );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02724
train
v2
Schema: employees (alias: bev)(amount, salary, status, date) categories(salary, value, name, id) Task: Retrieve code from employees that have at least one corresponding entry in categories sharing the same level. SQL:
SELECT code FROM employees AS bev WHERE EXISTS ( SELECT 1 FROM categories AS egiv WHERE egiv.level = bev.level );
{ "outer_table": "employees", "inner_table": "categories", "outer_alias": "bev", "inner_alias": "egiv", "proj_col": "code", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02725
train
v2
Schema: schedules (alias: vmob)(salary, code, amount, level) regions(name, type, status, code) Task: Retrieve name from schedules that have at least one corresponding entry in regions sharing the same level. SQL:
SELECT name FROM schedules AS vmob WHERE EXISTS ( SELECT 1 FROM regions AS okiv WHERE okiv.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "regions", "outer_alias": "vmob", "inner_alias": "okiv", "proj_col": "name", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02726
train
v1
Schema: items (alias: ikob)(id, amount, status, code) employees(value, name, salary, date) Task: Retrieve value from items whose type is found in employees rows where level matches the outer record. SQL:
SELECT value FROM items AS ikob WHERE type IN ( SELECT type FROM employees AS bev WHERE bev.level = ikob.level );
{ "outer_table": "items", "inner_table": "employees", "outer_alias": "ikob", "inner_alias": "bev", "proj_col": "value", "filter_col": "type", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02727
train
v2
Schema: requests (alias: ejof)(value, salary, id, level) branches(value, level, amount, status) Task: Retrieve id from requests that have at least one corresponding entry in branches sharing the same status. SQL:
SELECT id FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.status = ejof.status );
{ "outer_table": "requests", "inner_table": "branches", "outer_alias": "ejof", "inner_alias": "agov", "proj_col": "id", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02728
train
v1
Schema: shipments (alias: vnob)(code, type, status, value) accounts(value, date, level, status) Task: Find salary from shipments where type appears in accounts entries with matching status. SQL:
SELECT salary FROM shipments AS vnob WHERE type IN ( SELECT type FROM accounts AS jac WHERE jac.status = vnob.status );
{ "outer_table": "shipments", "inner_table": "accounts", "outer_alias": "vnob", "inner_alias": "jac", "proj_col": "salary", "filter_col": "type", "join_col": "status", "correlated_ref": "vnob.status", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02729
train
v1
Schema: tasks (alias: znob)(code, name, level, type) departments(type, id, value, code) Task: Select amount from tasks where type exists in departments for the same level. SQL:
SELECT amount FROM tasks AS znob WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.level = znob.level );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "amount", "filter_col": "type", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02730
train
v2
Schema: categories (alias: egiv)(name, type, date, id) tasks(amount, level, id, date) Task: Find id from categories where a matching record exists in tasks with the same status. SQL:
SELECT id FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = egiv.status );
{ "outer_table": "categories", "inner_table": "tasks", "outer_alias": "egiv", "inner_alias": "znob", "proj_col": "id", "join_col": "status", "correlated_ref": "egiv.status", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02731
train
v1
Schema: invoices (alias: fal)(code, date, type, status) regions(code, value, type, date) Task: Retrieve value from invoices whose status is found in regions rows where code matches the outer record. SQL:
SELECT value FROM invoices AS fal WHERE status IN ( SELECT status FROM regions AS okiv WHERE okiv.code = fal.code );
{ "outer_table": "invoices", "inner_table": "regions", "outer_alias": "fal", "inner_alias": "okiv", "proj_col": "value", "filter_col": "status", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02732
train
v2
Schema: requests (alias: ejof)(amount, salary, date, id) departments(status, salary, id, level) Task: Retrieve code from requests that have at least one corresponding entry in departments sharing the same id. SQL:
SELECT code FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.id = ejof.id );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "code", "join_col": "id", "correlated_ref": "ejof.id", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02733
train
v2
Schema: customers (alias: lex)(id, status, value, code) invoices(salary, type, code, amount) Task: Find id from customers where a matching record exists in invoices with the same status. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.status = lex.status );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "lex", "inner_alias": "fal", "proj_col": "id", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02734
train
v3
Schema: accounts (alias: jac)(type, status, code, value) invoices(type, code, status, value) Task: Retrieve salary from accounts with amount above the MIN(amount) of invoices rows sharing the same code. SQL:
SELECT salary FROM accounts AS jac WHERE amount > ( SELECT MIN(amount) FROM invoices AS fal WHERE fal.code = jac.code );
{ "outer_table": "accounts", "inner_table": "invoices", "outer_alias": "jac", "inner_alias": "fal", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02735
train
v2
Schema: tasks (alias: znob)(date, status, value, type) requests(value, id, name, code) Task: Find salary from tasks where a matching record exists in requests with the same type. SQL:
SELECT salary FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM requests AS ejof WHERE ejof.type = znob.type );
{ "outer_table": "tasks", "inner_table": "requests", "outer_alias": "znob", "inner_alias": "ejof", "proj_col": "salary", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02736
train
v3
Schema: schedules (alias: vmob)(value, status, salary, level) staff(salary, level, type, amount) Task: Find amount from schedules where value exceeds the maximum salary from staff for the same level. SQL:
SELECT amount FROM schedules AS vmob WHERE value > ( SELECT MAX(salary) FROM staff AS xnob WHERE xnob.level = vmob.level );
{ "outer_table": "schedules", "inner_table": "staff", "outer_alias": "vmob", "inner_alias": "xnob", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "level", "correlated_ref": "vmob.level", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02737
train
v2
Schema: requests (alias: ejof)(name, date, value, status) products(status, level, value, salary) Task: Retrieve value from requests that have at least one corresponding entry in products sharing the same type. SQL:
SELECT value FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM products AS nad WHERE nad.type = ejof.type );
{ "outer_table": "requests", "inner_table": "products", "outer_alias": "ejof", "inner_alias": "nad", "proj_col": "value", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02738
train
v1
Schema: requests (alias: ejof)(date, salary, code, value) customers(value, level, amount, salary) Task: Retrieve code from requests whose id is found in customers rows where type matches the outer record. SQL:
SELECT code FROM requests AS ejof WHERE id IN ( SELECT id FROM customers AS lex WHERE lex.type = ejof.type );
{ "outer_table": "requests", "inner_table": "customers", "outer_alias": "ejof", "inner_alias": "lex", "proj_col": "code", "filter_col": "id", "join_col": "type", "correlated_ref": "ejof.type", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02739
train
v2
Schema: invoices (alias: fal)(code, date, id, salary) shipments(type, code, value, date) Task: Retrieve id from invoices that have at least one corresponding entry in shipments sharing the same status. SQL:
SELECT id FROM invoices AS fal WHERE EXISTS ( SELECT 1 FROM shipments AS vnob WHERE vnob.status = fal.status );
{ "outer_table": "invoices", "inner_table": "shipments", "outer_alias": "fal", "inner_alias": "vnob", "proj_col": "id", "join_col": "status", "correlated_ref": "fal.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02740
train
v3
Schema: tasks (alias: znob)(level, value, name, amount) projects(name, level, amount, id) Task: Retrieve salary from tasks with amount above the SUM(amount) of projects rows sharing the same level. SQL:
SELECT salary FROM tasks AS znob WHERE amount > ( SELECT SUM(amount) FROM projects AS uliv WHERE uliv.level = znob.level );
{ "outer_table": "tasks", "inner_table": "projects", "outer_alias": "znob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02741
train
v2
Schema: managers (alias: hac)(value, date, amount, type) tasks(salary, status, code, type) Task: Find id from managers where a matching record exists in tasks with the same type. SQL:
SELECT id FROM managers AS hac WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.type = hac.type );
{ "outer_table": "managers", "inner_table": "tasks", "outer_alias": "hac", "inner_alias": "znob", "proj_col": "id", "join_col": "type", "correlated_ref": "hac.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02742
train
v2
Schema: staff (alias: xnob)(level, code, name, date) projects(date, name, level, code) Task: Retrieve name from staff that have at least one corresponding entry in projects sharing the same level. SQL:
SELECT name FROM staff AS xnob WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.level = xnob.level );
{ "outer_table": "staff", "inner_table": "projects", "outer_alias": "xnob", "inner_alias": "uliv", "proj_col": "name", "join_col": "level", "correlated_ref": "xnob.level", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02743
train
v3
Schema: accounts (alias: jac)(level, date, id, code) orders(name, type, value, date) Task: Find name from accounts where salary exceeds the minimum value from orders for the same level. SQL:
SELECT name FROM accounts AS jac WHERE salary > ( SELECT MIN(value) FROM orders AS kab WHERE kab.level = jac.level );
{ "outer_table": "accounts", "inner_table": "orders", "outer_alias": "jac", "inner_alias": "kab", "proj_col": "name", "filter_col": "salary", "agg_col": "value", "agg_fn": "MIN", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02744
train
v1
Schema: accounts (alias: jac)(status, value, code, name) customers(amount, status, salary, name) Task: Find amount from accounts where code appears in customers entries with matching code. SQL:
SELECT amount FROM accounts AS jac WHERE code IN ( SELECT code FROM customers AS lex WHERE lex.code = jac.code );
{ "outer_table": "accounts", "inner_table": "customers", "outer_alias": "jac", "inner_alias": "lex", "proj_col": "amount", "filter_col": "code", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02745
train
v1
Schema: sales (alias: cif)(date, id, salary, amount) items(code, salary, level, id) Task: Retrieve code from sales whose level is found in items rows where type matches the outer record. SQL:
SELECT code FROM sales AS cif WHERE level IN ( SELECT level FROM items AS ikob WHERE ikob.type = cif.type );
{ "outer_table": "sales", "inner_table": "items", "outer_alias": "cif", "inner_alias": "ikob", "proj_col": "code", "filter_col": "level", "join_col": "type", "correlated_ref": "cif.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02746
train
v3
Schema: schedules (alias: vmob)(salary, date, code, amount) projects(date, type, amount, salary) Task: Find salary from schedules where value exceeds the total value from projects for the same type. SQL:
SELECT salary FROM schedules AS vmob WHERE value > ( SELECT SUM(value) FROM projects AS uliv WHERE uliv.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "projects", "outer_alias": "vmob", "inner_alias": "uliv", "proj_col": "salary", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02747
train
v2
Schema: requests (alias: ejof)(salary, name, value, code) staff(name, id, code, status) Task: Retrieve name from requests that have at least one corresponding entry in staff sharing the same status. SQL:
SELECT name FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.status = ejof.status );
{ "outer_table": "requests", "inner_table": "staff", "outer_alias": "ejof", "inner_alias": "xnob", "proj_col": "name", "join_col": "status", "correlated_ref": "ejof.status", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02748
train
v2
Schema: customers (alias: lex)(value, date, code, level) projects(value, name, salary, amount) Task: Find id from customers where a matching record exists in projects with the same type. SQL:
SELECT id FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM projects AS uliv WHERE uliv.type = lex.type );
{ "outer_table": "customers", "inner_table": "projects", "outer_alias": "lex", "inner_alias": "uliv", "proj_col": "id", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02749
train
v2
Schema: branches (alias: agov)(date, level, value, code) sales(type, name, level, value) Task: Retrieve salary from branches that have at least one corresponding entry in sales sharing the same level. SQL:
SELECT salary FROM branches AS agov WHERE EXISTS ( SELECT 1 FROM sales AS cif WHERE cif.level = agov.level );
{ "outer_table": "branches", "inner_table": "sales", "outer_alias": "agov", "inner_alias": "cif", "proj_col": "salary", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02750
train
v3
Schema: orders (alias: kab)(value, amount, type, id) sales(date, salary, amount, code) Task: Retrieve salary from orders with value above the AVG(salary) of sales rows sharing the same status. SQL:
SELECT salary FROM orders AS kab WHERE value > ( SELECT AVG(salary) FROM sales AS cif WHERE cif.status = kab.status );
{ "outer_table": "orders", "inner_table": "sales", "outer_alias": "kab", "inner_alias": "cif", "proj_col": "salary", "filter_col": "value", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "kab.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02751
train
v2
Schema: transactions (alias: gev)(level, type, status, value) staff(level, amount, name, status) Task: Retrieve value from transactions that have at least one corresponding entry in staff sharing the same id. SQL:
SELECT value FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.id = gev.id );
{ "outer_table": "transactions", "inner_table": "staff", "outer_alias": "gev", "inner_alias": "xnob", "proj_col": "value", "join_col": "id", "correlated_ref": "gev.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02752
train
v1
Schema: shipments (alias: vnob)(name, type, amount, id) employees(salary, status, level, id) Task: Select salary from shipments where code exists in employees for the same id. SQL:
SELECT salary FROM shipments AS vnob WHERE code IN ( SELECT code FROM employees AS bev WHERE bev.id = vnob.id );
{ "outer_table": "shipments", "inner_table": "employees", "outer_alias": "vnob", "inner_alias": "bev", "proj_col": "salary", "filter_col": "code", "join_col": "id", "correlated_ref": "vnob.id", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02753
train
v1
Schema: tasks (alias: znob)(id, code, salary, amount) orders(salary, type, date, name) Task: Retrieve salary from tasks whose type is found in orders rows where type matches the outer record. SQL:
SELECT salary FROM tasks AS znob WHERE type IN ( SELECT type FROM orders AS kab WHERE kab.type = znob.type );
{ "outer_table": "tasks", "inner_table": "orders", "outer_alias": "znob", "inner_alias": "kab", "proj_col": "salary", "filter_col": "type", "join_col": "type", "correlated_ref": "znob.type", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02754
train
v3
Schema: departments (alias: dov)(type, id, amount, level) shipments(date, name, amount, salary) Task: Retrieve id from departments with salary above the MAX(amount) of shipments rows sharing the same status. SQL:
SELECT id FROM departments AS dov WHERE salary > ( SELECT MAX(amount) FROM shipments AS vnob WHERE vnob.status = dov.status );
{ "outer_table": "departments", "inner_table": "shipments", "outer_alias": "dov", "inner_alias": "vnob", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "dov.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02755
train
v1
Schema: orders (alias: kab)(status, date, id, name) schedules(code, type, id, name) Task: Select code from orders where level exists in schedules for the same level. SQL:
SELECT code FROM orders AS kab WHERE level IN ( SELECT level FROM schedules AS vmob WHERE vmob.level = kab.level );
{ "outer_table": "orders", "inner_table": "schedules", "outer_alias": "kab", "inner_alias": "vmob", "proj_col": "code", "filter_col": "level", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02756
train
v3
Schema: invoices (alias: fal)(value, type, name, salary) staff(date, level, status, type) Task: Find value from invoices where amount exceeds the count of value from staff for the same level. SQL:
SELECT value FROM invoices AS fal WHERE amount > ( SELECT COUNT(value) FROM staff AS xnob WHERE xnob.level = fal.level );
{ "outer_table": "invoices", "inner_table": "staff", "outer_alias": "fal", "inner_alias": "xnob", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "level", "correlated_ref": "fal.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02757
train
v3
Schema: branches (alias: agov)(date, status, id, code) regions(id, amount, level, status) Task: Retrieve id from branches with salary above the SUM(value) of regions rows sharing the same code. SQL:
SELECT id FROM branches AS agov WHERE salary > ( SELECT SUM(value) FROM regions AS okiv WHERE okiv.code = agov.code );
{ "outer_table": "branches", "inner_table": "regions", "outer_alias": "agov", "inner_alias": "okiv", "proj_col": "id", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "agov.code", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02758
train
v2
Schema: transactions (alias: gev)(type, date, level, value) managers(level, status, id, type) Task: Find name from transactions where a matching record exists in managers with the same type. SQL:
SELECT name FROM transactions AS gev WHERE EXISTS ( SELECT 1 FROM managers AS hac WHERE hac.type = gev.type );
{ "outer_table": "transactions", "inner_table": "managers", "outer_alias": "gev", "inner_alias": "hac", "proj_col": "name", "join_col": "type", "correlated_ref": "gev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02759
train
v1
Schema: items (alias: ikob)(value, date, status, type) customers(amount, value, status, level) Task: Select name from items where type exists in customers for the same code. SQL:
SELECT name FROM items AS ikob WHERE type IN ( SELECT type FROM customers AS lex WHERE lex.code = ikob.code );
{ "outer_table": "items", "inner_table": "customers", "outer_alias": "ikob", "inner_alias": "lex", "proj_col": "name", "filter_col": "type", "join_col": "code", "correlated_ref": "ikob.code", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02760
train
v3
Schema: employees (alias: bev)(id, salary, date, amount) sales(level, status, type, code) Task: Find name from employees where amount exceeds the maximum amount from sales for the same status. SQL:
SELECT name FROM employees AS bev WHERE amount > ( SELECT MAX(amount) FROM sales AS cif WHERE cif.status = bev.status );
{ "outer_table": "employees", "inner_table": "sales", "outer_alias": "bev", "inner_alias": "cif", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MAX", "join_col": "status", "correlated_ref": "bev.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02761
train
v2
Schema: items (alias: ikob)(code, amount, type, name) orders(salary, amount, code, status) Task: Retrieve id from items that have at least one corresponding entry in orders sharing the same level. SQL:
SELECT id FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.level = ikob.level );
{ "outer_table": "items", "inner_table": "orders", "outer_alias": "ikob", "inner_alias": "kab", "proj_col": "id", "join_col": "level", "correlated_ref": "ikob.level", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02762
train
v2
Schema: requests (alias: ejof)(date, status, salary, name) departments(status, salary, amount, level) Task: Retrieve code from requests that have at least one corresponding entry in departments sharing the same level. SQL:
SELECT code FROM requests AS ejof WHERE EXISTS ( SELECT 1 FROM departments AS dov WHERE dov.level = ejof.level );
{ "outer_table": "requests", "inner_table": "departments", "outer_alias": "ejof", "inner_alias": "dov", "proj_col": "code", "join_col": "level", "correlated_ref": "ejof.level", "token_group": "T2", "fan_out": 70 }
T2
cs9_fixed_v1_train_02763
train
v2
Schema: orders (alias: kab)(amount, type, id, status) staff(name, status, date, code) Task: Find amount from orders where a matching record exists in staff with the same level. SQL:
SELECT amount FROM orders AS kab WHERE EXISTS ( SELECT 1 FROM staff AS xnob WHERE xnob.level = kab.level );
{ "outer_table": "orders", "inner_table": "staff", "outer_alias": "kab", "inner_alias": "xnob", "proj_col": "amount", "join_col": "level", "correlated_ref": "kab.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02764
train
v1
Schema: accounts (alias: jac)(value, amount, code, id) schedules(status, date, value, type) Task: Find id from accounts where status appears in schedules entries with matching code. SQL:
SELECT id FROM accounts AS jac WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.code = jac.code );
{ "outer_table": "accounts", "inner_table": "schedules", "outer_alias": "jac", "inner_alias": "vmob", "proj_col": "id", "filter_col": "status", "join_col": "code", "correlated_ref": "jac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02765
train
v3
Schema: regions (alias: okiv)(type, code, value, status) tasks(id, level, code, amount) Task: Find code from regions where salary exceeds the total value from tasks for the same code. SQL:
SELECT code FROM regions AS okiv WHERE salary > ( SELECT SUM(value) FROM tasks AS znob WHERE znob.code = okiv.code );
{ "outer_table": "regions", "inner_table": "tasks", "outer_alias": "okiv", "inner_alias": "znob", "proj_col": "code", "filter_col": "salary", "agg_col": "value", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "okiv.code", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02766
train
v3
Schema: invoices (alias: fal)(name, code, salary, level) products(value, salary, code, name) Task: Find amount from invoices where value exceeds the count of salary from products for the same code. SQL:
SELECT amount FROM invoices AS fal WHERE value > ( SELECT COUNT(salary) FROM products AS nad WHERE nad.code = fal.code );
{ "outer_table": "invoices", "inner_table": "products", "outer_alias": "fal", "inner_alias": "nad", "proj_col": "amount", "filter_col": "value", "agg_col": "salary", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "fal.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02767
train
v1
Schema: departments (alias: dov)(name, date, code, status) transactions(name, type, salary, code) Task: Retrieve code from departments whose id is found in transactions rows where level matches the outer record. SQL:
SELECT code FROM departments AS dov WHERE id IN ( SELECT id FROM transactions AS gev WHERE gev.level = dov.level );
{ "outer_table": "departments", "inner_table": "transactions", "outer_alias": "dov", "inner_alias": "gev", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "dov.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02768
train
v1
Schema: employees (alias: bev)(name, amount, value, salary) invoices(type, date, id, salary) Task: Find id from employees where level appears in invoices entries with matching type. SQL:
SELECT id FROM employees AS bev WHERE level IN ( SELECT level FROM invoices AS fal WHERE fal.type = bev.type );
{ "outer_table": "employees", "inner_table": "invoices", "outer_alias": "bev", "inner_alias": "fal", "proj_col": "id", "filter_col": "level", "join_col": "type", "correlated_ref": "bev.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02769
train
v3
Schema: categories (alias: egiv)(level, code, type, date) requests(code, amount, name, value) Task: Find id from categories where salary exceeds the maximum amount from requests for the same type. SQL:
SELECT id FROM categories AS egiv WHERE salary > ( SELECT MAX(amount) FROM requests AS ejof WHERE ejof.type = egiv.type );
{ "outer_table": "categories", "inner_table": "requests", "outer_alias": "egiv", "inner_alias": "ejof", "proj_col": "id", "filter_col": "salary", "agg_col": "amount", "agg_fn": "MAX", "join_col": "type", "correlated_ref": "egiv.type", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02770
train
v3
Schema: branches (alias: agov)(id, name, amount, type) projects(amount, salary, date, value) Task: Retrieve code from branches with salary above the AVG(amount) of projects rows sharing the same level. SQL:
SELECT code FROM branches AS agov WHERE salary > ( SELECT AVG(amount) FROM projects AS uliv WHERE uliv.level = agov.level );
{ "outer_table": "branches", "inner_table": "projects", "outer_alias": "agov", "inner_alias": "uliv", "proj_col": "code", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "level", "correlated_ref": "agov.level", "token_group": "T2", "fan_out": 95 }
T2
cs9_fixed_v1_train_02771
train
v2
Schema: departments (alias: dov)(value, name, code, date) orders(code, value, date, status) Task: Find name from departments where a matching record exists in orders with the same id. SQL:
SELECT name FROM departments AS dov WHERE EXISTS ( SELECT 1 FROM orders AS kab WHERE kab.id = dov.id );
{ "outer_table": "departments", "inner_table": "orders", "outer_alias": "dov", "inner_alias": "kab", "proj_col": "name", "join_col": "id", "correlated_ref": "dov.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02772
train
v3
Schema: accounts (alias: jac)(date, amount, name, code) shipments(salary, status, date, amount) Task: Find value from accounts where amount exceeds the count of value from shipments for the same status. SQL:
SELECT value FROM accounts AS jac WHERE amount > ( SELECT COUNT(value) FROM shipments AS vnob WHERE vnob.status = jac.status );
{ "outer_table": "accounts", "inner_table": "shipments", "outer_alias": "jac", "inner_alias": "vnob", "proj_col": "value", "filter_col": "amount", "agg_col": "value", "agg_fn": "COUNT", "join_col": "status", "correlated_ref": "jac.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02773
train
v2
Schema: tasks (alias: znob)(date, id, name, amount) invoices(level, id, value, status) Task: Retrieve amount from tasks that have at least one corresponding entry in invoices sharing the same code. SQL:
SELECT amount FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = znob.code );
{ "outer_table": "tasks", "inner_table": "invoices", "outer_alias": "znob", "inner_alias": "fal", "proj_col": "amount", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02774
train
v3
Schema: products (alias: nad)(amount, code, name, status) schedules(name, salary, status, date) Task: Retrieve value from products with value above the MIN(amount) of schedules rows sharing the same code. SQL:
SELECT value FROM products AS nad WHERE value > ( SELECT MIN(amount) FROM schedules AS vmob WHERE vmob.code = nad.code );
{ "outer_table": "products", "inner_table": "schedules", "outer_alias": "nad", "inner_alias": "vmob", "proj_col": "value", "filter_col": "value", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02775
train
v3
Schema: staff (alias: xnob)(code, level, salary, status) categories(type, id, name, status) Task: Find name from staff where amount exceeds the total amount from categories for the same code. SQL:
SELECT name FROM staff AS xnob WHERE amount > ( SELECT SUM(amount) FROM categories AS egiv WHERE egiv.code = xnob.code );
{ "outer_table": "staff", "inner_table": "categories", "outer_alias": "xnob", "inner_alias": "egiv", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "code", "correlated_ref": "xnob.code", "token_group": "T2", "fan_out": 40 }
T2
cs9_fixed_v1_train_02776
train
v3
Schema: schedules (alias: vmob)(salary, status, amount, type) customers(salary, value, name, level) Task: Find code from schedules where value exceeds the total value from customers for the same id. SQL:
SELECT code FROM schedules AS vmob WHERE value > ( SELECT SUM(value) FROM customers AS lex WHERE lex.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "customers", "outer_alias": "vmob", "inner_alias": "lex", "proj_col": "code", "filter_col": "value", "agg_col": "value", "agg_fn": "SUM", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02777
train
v2
Schema: categories (alias: egiv)(level, amount, name, id) invoices(level, date, salary, amount) Task: Retrieve amount from categories that have at least one corresponding entry in invoices sharing the same code. SQL:
SELECT amount FROM categories AS egiv WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.code = egiv.code );
{ "outer_table": "categories", "inner_table": "invoices", "outer_alias": "egiv", "inner_alias": "fal", "proj_col": "amount", "join_col": "code", "correlated_ref": "egiv.code", "token_group": "T2", "fan_out": 80 }
T2
cs9_fixed_v1_train_02778
train
v2
Schema: tasks (alias: znob)(amount, status, name, type) accounts(salary, date, status, id) Task: Retrieve code from tasks that have at least one corresponding entry in accounts sharing the same code. SQL:
SELECT code FROM tasks AS znob WHERE EXISTS ( SELECT 1 FROM accounts AS jac WHERE jac.code = znob.code );
{ "outer_table": "tasks", "inner_table": "accounts", "outer_alias": "znob", "inner_alias": "jac", "proj_col": "code", "join_col": "code", "correlated_ref": "znob.code", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02779
train
v2
Schema: customers (alias: lex)(salary, name, status, code) tasks(level, type, date, code) Task: Retrieve code from customers that have at least one corresponding entry in tasks sharing the same status. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM tasks AS znob WHERE znob.status = lex.status );
{ "outer_table": "customers", "inner_table": "tasks", "outer_alias": "lex", "inner_alias": "znob", "proj_col": "code", "join_col": "status", "correlated_ref": "lex.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02780
train
v3
Schema: regions (alias: okiv)(value, status, id, amount) invoices(date, type, amount, level) Task: Find salary from regions where salary exceeds the average amount from invoices for the same status. SQL:
SELECT salary FROM regions AS okiv WHERE salary > ( SELECT AVG(amount) FROM invoices AS fal WHERE fal.status = okiv.status );
{ "outer_table": "regions", "inner_table": "invoices", "outer_alias": "okiv", "inner_alias": "fal", "proj_col": "salary", "filter_col": "salary", "agg_col": "amount", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "okiv.status", "token_group": "T2", "fan_out": 55 }
T2
cs9_fixed_v1_train_02781
train
v1
Schema: departments (alias: dov)(value, status, salary, date) requests(level, status, name, amount) Task: Select code from departments where status exists in requests for the same type. SQL:
SELECT code FROM departments AS dov WHERE status IN ( SELECT status FROM requests AS ejof WHERE ejof.type = dov.type );
{ "outer_table": "departments", "inner_table": "requests", "outer_alias": "dov", "inner_alias": "ejof", "proj_col": "code", "filter_col": "status", "join_col": "type", "correlated_ref": "dov.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02782
train
v3
Schema: sales (alias: cif)(type, value, amount, level) requests(amount, value, status, level) Task: Find id from sales where amount exceeds the average value from requests for the same id. SQL:
SELECT id FROM sales AS cif WHERE amount > ( SELECT AVG(value) FROM requests AS ejof WHERE ejof.id = cif.id );
{ "outer_table": "sales", "inner_table": "requests", "outer_alias": "cif", "inner_alias": "ejof", "proj_col": "id", "filter_col": "amount", "agg_col": "value", "agg_fn": "AVG", "join_col": "id", "correlated_ref": "cif.id", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02783
train
v3
Schema: employees (alias: bev)(value, level, amount, id) products(value, type, name, salary) Task: Find value from employees where salary exceeds the total amount from products for the same level. SQL:
SELECT value FROM employees AS bev WHERE salary > ( SELECT SUM(amount) FROM products AS nad WHERE nad.level = bev.level );
{ "outer_table": "employees", "inner_table": "products", "outer_alias": "bev", "inner_alias": "nad", "proj_col": "value", "filter_col": "salary", "agg_col": "amount", "agg_fn": "SUM", "join_col": "level", "correlated_ref": "bev.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02784
train
v1
Schema: tasks (alias: znob)(value, date, type, id) departments(id, status, name, code) Task: Select amount from tasks where level exists in departments for the same id. SQL:
SELECT amount FROM tasks AS znob WHERE level IN ( SELECT level FROM departments AS dov WHERE dov.id = znob.id );
{ "outer_table": "tasks", "inner_table": "departments", "outer_alias": "znob", "inner_alias": "dov", "proj_col": "amount", "filter_col": "level", "join_col": "id", "correlated_ref": "znob.id", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02785
train
v3
Schema: projects (alias: uliv)(type, id, salary, value) schedules(code, level, amount, id) Task: Find amount from projects where value exceeds the average amount from schedules for the same code. SQL:
SELECT amount FROM projects AS uliv WHERE value > ( SELECT AVG(amount) FROM schedules AS vmob WHERE vmob.code = uliv.code );
{ "outer_table": "projects", "inner_table": "schedules", "outer_alias": "uliv", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "value", "agg_col": "amount", "agg_fn": "AVG", "join_col": "code", "correlated_ref": "uliv.code", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02786
train
v2
Schema: customers (alias: lex)(type, salary, status, value) branches(type, value, name, code) Task: Retrieve code from customers that have at least one corresponding entry in branches sharing the same type. SQL:
SELECT code FROM customers AS lex WHERE EXISTS ( SELECT 1 FROM branches AS agov WHERE agov.type = lex.type );
{ "outer_table": "customers", "inner_table": "branches", "outer_alias": "lex", "inner_alias": "agov", "proj_col": "code", "join_col": "type", "correlated_ref": "lex.type", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02787
train
v1
Schema: tasks (alias: znob)(type, level, salary, amount) schedules(value, date, code, salary) Task: Retrieve amount from tasks whose status is found in schedules rows where level matches the outer record. SQL:
SELECT amount FROM tasks AS znob WHERE status IN ( SELECT status FROM schedules AS vmob WHERE vmob.level = znob.level );
{ "outer_table": "tasks", "inner_table": "schedules", "outer_alias": "znob", "inner_alias": "vmob", "proj_col": "amount", "filter_col": "status", "join_col": "level", "correlated_ref": "znob.level", "token_group": "T2", "fan_out": 35 }
T2
cs9_fixed_v1_train_02788
train
v3
Schema: sales (alias: cif)(value, code, name, date) tasks(name, salary, code, value) Task: Find code from sales where amount exceeds the average salary from tasks for the same status. SQL:
SELECT code FROM sales AS cif WHERE amount > ( SELECT AVG(salary) FROM tasks AS znob WHERE znob.status = cif.status );
{ "outer_table": "sales", "inner_table": "tasks", "outer_alias": "cif", "inner_alias": "znob", "proj_col": "code", "filter_col": "amount", "agg_col": "salary", "agg_fn": "AVG", "join_col": "status", "correlated_ref": "cif.status", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02789
train
v2
Schema: items (alias: ikob)(code, id, salary, value) invoices(salary, id, date, level) Task: Find value from items where a matching record exists in invoices with the same id. SQL:
SELECT value FROM items AS ikob WHERE EXISTS ( SELECT 1 FROM invoices AS fal WHERE fal.id = ikob.id );
{ "outer_table": "items", "inner_table": "invoices", "outer_alias": "ikob", "inner_alias": "fal", "proj_col": "value", "join_col": "id", "correlated_ref": "ikob.id", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02790
train
v3
Schema: shipments (alias: vnob)(salary, code, type, amount) regions(date, type, value, status) Task: Find name from shipments where salary exceeds the count of amount from regions for the same code. SQL:
SELECT name FROM shipments AS vnob WHERE salary > ( SELECT COUNT(amount) FROM regions AS okiv WHERE okiv.code = vnob.code );
{ "outer_table": "shipments", "inner_table": "regions", "outer_alias": "vnob", "inner_alias": "okiv", "proj_col": "name", "filter_col": "salary", "agg_col": "amount", "agg_fn": "COUNT", "join_col": "code", "correlated_ref": "vnob.code", "token_group": "T2", "fan_out": 45 }
T2
cs9_fixed_v1_train_02791
train
v1
Schema: items (alias: ikob)(type, status, value, amount) departments(value, name, status, amount) Task: Retrieve id from items whose type is found in departments rows where status matches the outer record. SQL:
SELECT id FROM items AS ikob WHERE type IN ( SELECT type FROM departments AS dov WHERE dov.status = ikob.status );
{ "outer_table": "items", "inner_table": "departments", "outer_alias": "ikob", "inner_alias": "dov", "proj_col": "id", "filter_col": "type", "join_col": "status", "correlated_ref": "ikob.status", "token_group": "T2", "fan_out": 60 }
T2
cs9_fixed_v1_train_02792
train
v3
Schema: schedules (alias: vmob)(type, code, status, value) branches(code, id, value, status) Task: Retrieve amount from schedules with amount above the SUM(amount) of branches rows sharing the same type. SQL:
SELECT amount FROM schedules AS vmob WHERE amount > ( SELECT SUM(amount) FROM branches AS agov WHERE agov.type = vmob.type );
{ "outer_table": "schedules", "inner_table": "branches", "outer_alias": "vmob", "inner_alias": "agov", "proj_col": "amount", "filter_col": "amount", "agg_col": "amount", "agg_fn": "SUM", "join_col": "type", "correlated_ref": "vmob.type", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02793
train
v3
Schema: managers (alias: hac)(code, value, salary, id) categories(code, type, amount, level) Task: Find salary from managers where value exceeds the maximum salary from categories for the same code. SQL:
SELECT salary FROM managers AS hac WHERE value > ( SELECT MAX(salary) 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": "value", "agg_col": "salary", "agg_fn": "MAX", "join_col": "code", "correlated_ref": "hac.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02794
train
v1
Schema: schedules (alias: vmob)(level, date, value, code) branches(level, date, name, status) Task: Retrieve name from schedules whose code is found in branches rows where id matches the outer record. SQL:
SELECT name FROM schedules AS vmob WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.id = vmob.id );
{ "outer_table": "schedules", "inner_table": "branches", "outer_alias": "vmob", "inner_alias": "agov", "proj_col": "name", "filter_col": "code", "join_col": "id", "correlated_ref": "vmob.id", "token_group": "T2", "fan_out": 50 }
T2
cs9_fixed_v1_train_02795
train
v1
Schema: accounts (alias: jac)(code, amount, level, name) staff(id, amount, code, value) Task: Select code from accounts where id exists in staff for the same level. SQL:
SELECT code FROM accounts AS jac WHERE id IN ( SELECT id FROM staff AS xnob WHERE xnob.level = jac.level );
{ "outer_table": "accounts", "inner_table": "staff", "outer_alias": "jac", "inner_alias": "xnob", "proj_col": "code", "filter_col": "id", "join_col": "level", "correlated_ref": "jac.level", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02796
train
v1
Schema: projects (alias: uliv)(salary, type, name, value) managers(code, name, value, salary) Task: Retrieve name from projects whose level is found in managers rows where type matches the outer record. SQL:
SELECT name FROM projects AS uliv WHERE level IN ( SELECT level FROM managers AS hac WHERE hac.type = uliv.type );
{ "outer_table": "projects", "inner_table": "managers", "outer_alias": "uliv", "inner_alias": "hac", "proj_col": "name", "filter_col": "level", "join_col": "type", "correlated_ref": "uliv.type", "token_group": "T2", "fan_out": 65 }
T2
cs9_fixed_v1_train_02797
train
v3
Schema: customers (alias: lex)(status, name, value, level) invoices(level, code, date, name) Task: Retrieve name from customers with amount above the MIN(amount) of invoices rows sharing the same code. SQL:
SELECT name FROM customers AS lex WHERE amount > ( SELECT MIN(amount) FROM invoices AS fal WHERE fal.code = lex.code );
{ "outer_table": "customers", "inner_table": "invoices", "outer_alias": "lex", "inner_alias": "fal", "proj_col": "name", "filter_col": "amount", "agg_col": "amount", "agg_fn": "MIN", "join_col": "code", "correlated_ref": "lex.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02798
train
v1
Schema: products (alias: nad)(level, amount, type, salary) branches(status, name, date, id) Task: Retrieve salary from products whose code is found in branches rows where code matches the outer record. SQL:
SELECT salary FROM products AS nad WHERE code IN ( SELECT code FROM branches AS agov WHERE agov.code = nad.code );
{ "outer_table": "products", "inner_table": "branches", "outer_alias": "nad", "inner_alias": "agov", "proj_col": "salary", "filter_col": "code", "join_col": "code", "correlated_ref": "nad.code", "token_group": "T1", "fan_out": 1 }
T1
cs9_fixed_v1_train_02799
train