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:
departments (alias: dov)(date, id, amount, level)
branches(amount, level, type, date)
Task: Select id from departments where id exists in branches for the same level.
SQL: | SELECT id FROM departments AS dov
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01500 | train |
v1 | Schema:
categories (alias: egiv)(date, name, code, amount)
departments(id, name, type, code)
Task: Find id from categories where type appears in departments entries with matching code.
SQL: | SELECT id FROM categories AS egiv
WHERE type IN (
SELECT type FROM departments AS dov
WHERE dov.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "departments",
"outer_alias": "egiv",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01501 | train |
v3 | Schema:
branches (alias: agov)(id, name, level, value)
regions(status, salary, name, amount)
Task: Retrieve amount from branches with amount above the AVG(salary) of regions rows sharing the same status.
SQL: | SELECT amount FROM branches AS agov
WHERE amount > (
SELECT AVG(salary) FROM regions AS okiv
WHERE okiv.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01502 | train |
v1 | Schema:
regions (alias: okiv)(amount, salary, date, code)
customers(level, id, value, date)
Task: Retrieve amount from regions whose code is found in customers rows where id matches the outer record.
SQL: | SELECT amount FROM regions AS okiv
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01503 | train |
v2 | Schema:
requests (alias: ejof)(salary, type, code, status)
items(code, level, status, value)
Task: Find id from requests where a matching record exists in items with the same code.
SQL: | SELECT id FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ejof",
"inner_alias": "ikob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01504 | train |
v3 | Schema:
accounts (alias: jac)(amount, date, value, salary)
departments(id, type, date, amount)
Task: Find amount from accounts where salary exceeds the average salary from departments for the same id.
SQL: | SELECT amount FROM accounts AS jac
WHERE salary > (
SELECT AVG(salary) FROM departments AS dov
WHERE dov.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "departments",
"outer_alias": "jac",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01505 | train |
v2 | Schema:
schedules (alias: vmob)(amount, name, status, id)
customers(value, id, status, code)
Task: Retrieve amount from schedules that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT amount FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01506 | train |
v1 | Schema:
staff (alias: xnob)(level, name, amount, value)
schedules(amount, date, status, type)
Task: Find name from staff where id appears in schedules entries with matching code.
SQL: | SELECT name FROM staff AS xnob
WHERE id IN (
SELECT id FROM schedules AS vmob
WHERE vmob.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "schedules",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01507 | train |
v2 | Schema:
accounts (alias: jac)(id, code, value, amount)
products(code, salary, id, date)
Task: Retrieve name from accounts that have at least one corresponding entry in products sharing the same level.
SQL: | SELECT name FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "products",
"outer_alias": "jac",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01508 | train |
v3 | Schema:
customers (alias: lex)(value, type, id, salary)
employees(id, name, level, status)
Task: Find amount from customers where salary exceeds the maximum amount from employees for the same id.
SQL: | SELECT amount FROM customers AS lex
WHERE salary > (
SELECT MAX(amount) FROM employees AS bev
WHERE bev.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "employees",
"outer_alias": "lex",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01509 | train |
v1 | Schema:
requests (alias: ejof)(status, salary, value, amount)
schedules(salary, name, type, id)
Task: Retrieve name from requests whose type is found in schedules rows where level matches the outer record.
SQL: | SELECT name FROM requests AS ejof
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01510 | train |
v2 | Schema:
staff (alias: xnob)(code, status, level, salary)
products(type, value, amount, id)
Task: Retrieve amount from staff that have at least one corresponding entry in products sharing the same id.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "products",
"outer_alias": "xnob",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01511 | train |
v3 | Schema:
categories (alias: egiv)(code, type, salary, status)
accounts(type, amount, name, level)
Task: Find salary from categories where amount exceeds the total amount from accounts for the same id.
SQL: | SELECT salary FROM categories AS egiv
WHERE amount > (
SELECT SUM(amount) FROM accounts AS jac
WHERE jac.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01512 | train |
v1 | Schema:
staff (alias: xnob)(amount, level, status, type)
regions(name, status, amount, level)
Task: Retrieve amount from staff whose code is found in regions rows where type matches the outer record.
SQL: | SELECT amount FROM staff AS xnob
WHERE code IN (
SELECT code FROM regions AS okiv
WHERE okiv.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "xnob",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01513 | train |
v1 | Schema:
sales (alias: cif)(level, date, value, salary)
schedules(name, value, status, type)
Task: Find amount from sales where level appears in schedules entries with matching type.
SQL: | SELECT amount FROM sales AS cif
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "schedules",
"outer_alias": "cif",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01514 | train |
v2 | Schema:
regions (alias: okiv)(code, id, amount, name)
products(value, date, salary, code)
Task: Find name from regions where a matching record exists in products with the same id.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01515 | train |
v2 | Schema:
sales (alias: cif)(status, type, name, salary)
managers(date, level, id, name)
Task: Retrieve amount from sales that have at least one corresponding entry in managers sharing the same id.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01516 | train |
v2 | Schema:
customers (alias: lex)(id, level, type, code)
items(name, level, status, date)
Task: Retrieve id from customers that have at least one corresponding entry in items sharing the same code.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01517 | train |
v1 | Schema:
accounts (alias: jac)(name, type, status, code)
managers(salary, value, date, level)
Task: Select code from accounts where level exists in managers for the same type.
SQL: | SELECT code FROM accounts AS jac
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "managers",
"outer_alias": "jac",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01518 | train |
v3 | Schema:
branches (alias: agov)(date, amount, status, code)
orders(id, name, status, amount)
Task: Find salary from branches where amount exceeds the total value from orders for the same level.
SQL: | SELECT salary FROM branches AS agov
WHERE amount > (
SELECT SUM(value) FROM orders AS kab
WHERE kab.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01519 | train |
v3 | Schema:
requests (alias: ejof)(id, type, level, salary)
branches(salary, level, status, code)
Task: Find salary from requests where value exceeds the minimum salary from branches for the same type.
SQL: | SELECT salary FROM requests AS ejof
WHERE value > (
SELECT MIN(salary) FROM branches AS agov
WHERE agov.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01520 | train |
v1 | Schema:
regions (alias: okiv)(status, name, salary, code)
tasks(value, type, date, name)
Task: Select code from regions where type exists in tasks for the same code.
SQL: | SELECT code FROM regions AS okiv
WHERE type IN (
SELECT type 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": "type",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01521 | train |
v3 | Schema:
transactions (alias: gev)(status, name, id, salary)
customers(amount, id, code, value)
Task: Retrieve code from transactions with amount above the MAX(value) of customers rows sharing the same type.
SQL: | SELECT code FROM transactions AS gev
WHERE amount > (
SELECT MAX(value) FROM customers AS lex
WHERE lex.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01522 | train |
v1 | Schema:
accounts (alias: jac)(status, code, id, name)
products(type, amount, name, salary)
Task: Find value from accounts where level appears in products entries with matching id.
SQL: | SELECT value FROM accounts AS jac
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "products",
"outer_alias": "jac",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01523 | train |
v2 | Schema:
categories (alias: egiv)(amount, id, date, code)
orders(level, status, code, date)
Task: Find id from categories where a matching record exists in orders with the same code.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01524 | train |
v1 | Schema:
departments (alias: dov)(salary, id, date, status)
invoices(date, id, level, type)
Task: Select name from departments where status exists in invoices for the same level.
SQL: | SELECT name FROM departments AS dov
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01525 | train |
v1 | Schema:
requests (alias: ejof)(id, type, status, amount)
managers(name, date, value, type)
Task: Select value from requests where status exists in managers for the same id.
SQL: | SELECT value FROM requests AS ejof
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01526 | train |
v2 | Schema:
requests (alias: ejof)(status, id, value, code)
shipments(amount, type, status, name)
Task: Find salary from requests where a matching record exists in shipments with the same type.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "shipments",
"outer_alias": "ejof",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01527 | train |
v3 | Schema:
customers (alias: lex)(status, type, level, date)
accounts(status, value, level, name)
Task: Find code from customers where value exceeds the average salary from accounts for the same code.
SQL: | SELECT code FROM customers AS lex
WHERE value > (
SELECT AVG(salary) FROM accounts AS jac
WHERE jac.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01528 | train |
v1 | Schema:
sales (alias: cif)(level, status, amount, date)
tasks(salary, code, type, status)
Task: Find salary from sales where id appears in tasks entries with matching type.
SQL: | SELECT salary FROM sales AS cif
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "tasks",
"outer_alias": "cif",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01529 | train |
v1 | Schema:
staff (alias: xnob)(level, code, date, id)
schedules(amount, code, level, value)
Task: Select id from staff where level exists in schedules for the same status.
SQL: | SELECT id FROM staff AS xnob
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "schedules",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01530 | train |
v2 | Schema:
schedules (alias: vmob)(type, amount, id, value)
regions(code, salary, status, type)
Task: Retrieve value from schedules that have at least one corresponding entry in regions sharing the same level.
SQL: | SELECT value 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": "value",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01531 | train |
v3 | Schema:
schedules (alias: vmob)(code, name, value, amount)
customers(type, date, amount, level)
Task: Retrieve value from schedules with value above the MIN(value) of customers rows sharing the same type.
SQL: | SELECT value FROM schedules AS vmob
WHERE value > (
SELECT MIN(value) FROM customers AS lex
WHERE lex.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01532 | train |
v2 | Schema:
shipments (alias: vnob)(status, type, id, name)
orders(date, status, amount, type)
Task: Retrieve id from shipments that have at least one corresponding entry in orders sharing the same code.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01533 | train |
v2 | Schema:
shipments (alias: vnob)(amount, status, type, date)
categories(status, amount, code, level)
Task: Find id from shipments where a matching record exists in categories with the same code.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "categories",
"outer_alias": "vnob",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01534 | train |
v3 | Schema:
departments (alias: dov)(date, amount, level, type)
regions(date, amount, level, name)
Task: Retrieve salary from departments with salary above the MIN(salary) of regions rows sharing the same status.
SQL: | SELECT salary FROM departments AS dov
WHERE salary > (
SELECT MIN(salary) FROM regions AS okiv
WHERE okiv.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "regions",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01535 | train |
v1 | Schema:
orders (alias: kab)(value, level, date, amount)
projects(type, status, level, value)
Task: Find salary from orders where type appears in projects entries with matching code.
SQL: | SELECT salary FROM orders AS kab
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "projects",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01536 | train |
v1 | Schema:
categories (alias: egiv)(status, name, value, amount)
branches(status, amount, salary, code)
Task: Retrieve id from categories whose type is found in branches rows where level matches the outer record.
SQL: | SELECT id FROM categories AS egiv
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01537 | train |
v1 | Schema:
projects (alias: uliv)(value, amount, code, name)
transactions(date, name, status, id)
Task: Select code from projects where level exists in transactions for the same id.
SQL: | SELECT code FROM projects AS uliv
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01538 | train |
v2 | Schema:
branches (alias: agov)(code, level, date, amount)
shipments(name, code, level, id)
Task: Find code from branches where a matching record exists in shipments with the same type.
SQL: | SELECT code FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01539 | train |
v1 | Schema:
items (alias: ikob)(type, id, date, salary)
orders(type, value, amount, salary)
Task: Retrieve value from items whose code is found in orders rows where type matches the outer record.
SQL: | SELECT value FROM items AS ikob
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01540 | train |
v1 | Schema:
managers (alias: hac)(name, type, code, id)
sales(level, name, type, salary)
Task: Find id from managers where level appears in sales entries with matching code.
SQL: | SELECT id FROM managers AS hac
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01541 | train |
v2 | Schema:
products (alias: nad)(level, salary, name, amount)
regions(amount, value, level, status)
Task: Retrieve name from products that have at least one corresponding entry in regions sharing the same id.
SQL: | SELECT name FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = nad.id
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01542 | train |
v3 | Schema:
products (alias: nad)(code, amount, name, salary)
shipments(value, status, date, code)
Task: Retrieve amount from products with value above the MAX(value) of shipments rows sharing the same type.
SQL: | SELECT amount FROM products AS nad
WHERE value > (
SELECT MAX(value) FROM shipments AS vnob
WHERE vnob.type = nad.type
); | {
"outer_table": "products",
"inner_table": "shipments",
"outer_alias": "nad",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01543 | train |
v1 | Schema:
staff (alias: xnob)(level, code, date, amount)
items(name, status, code, value)
Task: Retrieve amount from staff whose level is found in items rows where status matches the outer record.
SQL: | SELECT amount FROM staff AS xnob
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "items",
"outer_alias": "xnob",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01544 | train |
v1 | Schema:
projects (alias: uliv)(status, code, name, level)
products(date, id, value, level)
Task: Select amount from projects where status exists in products for the same type.
SQL: | SELECT amount FROM projects AS uliv
WHERE status IN (
SELECT status FROM products AS nad
WHERE nad.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "products",
"outer_alias": "uliv",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01545 | train |
v3 | Schema:
regions (alias: okiv)(amount, id, code, type)
customers(level, code, id, status)
Task: Retrieve code from regions with amount above the MAX(value) of customers rows sharing the same id.
SQL: | SELECT code FROM regions AS okiv
WHERE amount > (
SELECT MAX(value) FROM customers AS lex
WHERE lex.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01546 | train |
v1 | Schema:
shipments (alias: vnob)(salary, level, date, name)
categories(salary, amount, type, date)
Task: Retrieve code from shipments whose code is found in categories rows where id matches the outer record.
SQL: | SELECT code FROM shipments AS vnob
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "categories",
"outer_alias": "vnob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01547 | train |
v2 | Schema:
departments (alias: dov)(id, value, date, salary)
employees(id, code, status, date)
Task: Find name from departments where a matching record exists in employees with the same id.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "employees",
"outer_alias": "dov",
"inner_alias": "bev",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01548 | train |
v2 | Schema:
managers (alias: hac)(status, code, salary, value)
transactions(code, date, status, salary)
Task: Find name from managers where a matching record exists in transactions with the same level.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01549 | train |
v3 | Schema:
employees (alias: bev)(type, salary, name, value)
departments(code, id, level, name)
Task: Find value from employees where amount exceeds the total salary from departments for the same type.
SQL: | SELECT value FROM employees AS bev
WHERE amount > (
SELECT SUM(salary) FROM departments AS dov
WHERE dov.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01550 | train |
v1 | Schema:
transactions (alias: gev)(status, id, code, level)
regions(value, code, salary, type)
Task: Find name from transactions where id appears in regions entries with matching type.
SQL: | SELECT name FROM transactions AS gev
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01551 | train |
v2 | Schema:
requests (alias: ejof)(id, name, date, level)
customers(value, salary, amount, type)
Task: Retrieve code from requests that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "customers",
"outer_alias": "ejof",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01552 | train |
v3 | Schema:
projects (alias: uliv)(value, date, name, id)
transactions(date, name, amount, type)
Task: Find name from projects where value exceeds the maximum value from transactions for the same level.
SQL: | SELECT name FROM projects AS uliv
WHERE value > (
SELECT MAX(value) FROM transactions AS gev
WHERE gev.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01553 | train |
v1 | Schema:
projects (alias: uliv)(status, salary, id, type)
products(status, salary, value, name)
Task: Select amount from projects where code exists in products for the same type.
SQL: | SELECT amount FROM projects AS uliv
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "products",
"outer_alias": "uliv",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01554 | train |
v2 | Schema:
categories (alias: egiv)(status, value, id, code)
requests(id, amount, type, level)
Task: Retrieve salary from categories that have at least one corresponding entry in requests sharing the same level.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01555 | train |
v3 | Schema:
shipments (alias: vnob)(id, value, type, status)
projects(name, type, level, amount)
Task: Retrieve value from shipments with salary above the COUNT(amount) of projects rows sharing the same type.
SQL: | SELECT value FROM shipments AS vnob
WHERE salary > (
SELECT COUNT(amount) FROM projects AS uliv
WHERE uliv.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "projects",
"outer_alias": "vnob",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01556 | train |
v3 | Schema:
customers (alias: lex)(amount, date, level, name)
products(salary, id, value, level)
Task: Find code from customers where amount exceeds the minimum salary from products for the same type.
SQL: | SELECT code FROM customers AS lex
WHERE amount > (
SELECT MIN(salary) FROM products AS nad
WHERE nad.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"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_01557 | train |
v3 | Schema:
orders (alias: kab)(id, date, salary, value)
categories(code, salary, date, type)
Task: Retrieve salary from orders with salary above the COUNT(salary) of categories rows sharing the same level.
SQL: | SELECT salary FROM orders AS kab
WHERE salary > (
SELECT COUNT(salary) FROM categories AS egiv
WHERE egiv.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01558 | train |
v3 | Schema:
employees (alias: bev)(date, type, amount, level)
staff(id, status, name, type)
Task: Find name from employees where salary exceeds the average salary from staff for the same level.
SQL: | SELECT name FROM employees AS bev
WHERE salary > (
SELECT AVG(salary) FROM staff AS xnob
WHERE xnob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "staff",
"outer_alias": "bev",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01559 | train |
v2 | Schema:
orders (alias: kab)(salary, amount, id, level)
invoices(status, code, amount, date)
Task: Find id from orders where a matching record exists in invoices with the same code.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01560 | train |
v2 | Schema:
departments (alias: dov)(status, level, id, salary)
customers(status, type, salary, amount)
Task: Find value from departments where a matching record exists in customers with the same status.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "customers",
"outer_alias": "dov",
"inner_alias": "lex",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01561 | train |
v2 | Schema:
schedules (alias: vmob)(level, type, value, status)
branches(id, amount, date, name)
Task: Find code from schedules where a matching record exists in branches with the same status.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "vmob",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01562 | train |
v3 | Schema:
items (alias: ikob)(amount, salary, type, date)
managers(name, id, salary, value)
Task: Find value from items where value exceeds the total amount from managers for the same type.
SQL: | SELECT value FROM items AS ikob
WHERE value > (
SELECT SUM(amount) FROM managers AS hac
WHERE hac.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "managers",
"outer_alias": "ikob",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01563 | train |
v3 | Schema:
branches (alias: agov)(value, name, date, status)
shipments(salary, date, code, amount)
Task: Retrieve id from branches with salary above the MAX(amount) of shipments rows sharing the same type.
SQL: | SELECT id FROM branches AS agov
WHERE salary > (
SELECT MAX(amount) FROM shipments AS vnob
WHERE vnob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01564 | train |
v3 | Schema:
regions (alias: okiv)(level, date, name, type)
departments(code, id, level, type)
Task: Retrieve name from regions with salary above the SUM(amount) of departments rows sharing the same level.
SQL: | SELECT name FROM regions AS okiv
WHERE salary > (
SELECT SUM(amount) FROM departments AS dov
WHERE dov.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01565 | train |
v2 | Schema:
staff (alias: xnob)(id, value, date, name)
categories(amount, id, date, code)
Task: Find amount from staff where a matching record exists in categories with the same type.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01566 | train |
v2 | Schema:
tasks (alias: znob)(date, type, salary, level)
employees(code, id, amount, value)
Task: Find name from tasks where a matching record exists in employees with the same status.
SQL: | SELECT name FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01567 | train |
v1 | Schema:
requests (alias: ejof)(code, id, date, value)
staff(code, name, status, date)
Task: Find code from requests where code appears in staff entries with matching status.
SQL: | SELECT code FROM requests AS ejof
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01568 | train |
v3 | Schema:
orders (alias: kab)(type, level, amount, name)
branches(value, type, level, code)
Task: Find salary from orders where salary exceeds the minimum amount from branches for the same status.
SQL: | SELECT salary FROM orders AS kab
WHERE salary > (
SELECT MIN(amount) FROM branches AS agov
WHERE agov.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01569 | train |
v2 | Schema:
products (alias: nad)(amount, salary, code, status)
managers(amount, type, date, value)
Task: Retrieve id from products that have at least one corresponding entry in managers sharing the same code.
SQL: | SELECT id FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = nad.code
); | {
"outer_table": "products",
"inner_table": "managers",
"outer_alias": "nad",
"inner_alias": "hac",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01570 | train |
v1 | Schema:
sales (alias: cif)(level, date, value, name)
managers(type, name, id, amount)
Task: Select salary from sales where code exists in managers for the same id.
SQL: | SELECT salary FROM sales AS cif
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01571 | train |
v2 | Schema:
customers (alias: lex)(type, code, salary, value)
items(id, amount, date, code)
Task: Retrieve code from customers that have at least one corresponding entry in items sharing the same id.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01572 | train |
v3 | Schema:
categories (alias: egiv)(date, value, name, type)
staff(type, code, salary, level)
Task: Retrieve value from categories with value above the COUNT(salary) of staff rows sharing the same code.
SQL: | SELECT value FROM categories AS egiv
WHERE value > (
SELECT COUNT(salary) FROM staff AS xnob
WHERE xnob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "egiv",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01573 | train |
v2 | Schema:
transactions (alias: gev)(value, id, status, salary)
projects(type, amount, status, date)
Task: Find salary from transactions where a matching record exists in projects with the same status.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01574 | train |
v2 | Schema:
tasks (alias: znob)(level, value, status, date)
departments(level, amount, status, salary)
Task: Retrieve code from tasks that have at least one corresponding entry in departments sharing the same level.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "departments",
"outer_alias": "znob",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01575 | train |
v3 | Schema:
orders (alias: kab)(code, type, date, value)
managers(id, value, type, amount)
Task: Find code from orders where value exceeds the minimum value from managers for the same type.
SQL: | SELECT code FROM orders AS kab
WHERE value > (
SELECT MIN(value) FROM managers AS hac
WHERE hac.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "kab",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01576 | train |
v3 | Schema:
employees (alias: bev)(date, type, status, name)
categories(code, date, status, salary)
Task: Find salary from employees where value exceeds the maximum salary from categories for the same id.
SQL: | SELECT salary FROM employees AS bev
WHERE value > (
SELECT MAX(salary) FROM categories AS egiv
WHERE egiv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01577 | train |
v2 | Schema:
items (alias: ikob)(id, code, status, type)
orders(type, value, date, id)
Task: Find name from items where a matching record exists in orders with the same status.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01578 | train |
v2 | Schema:
categories (alias: egiv)(amount, status, code, level)
accounts(level, amount, value, name)
Task: Find code from categories where a matching record exists in accounts with the same status.
SQL: | SELECT code FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01579 | train |
v3 | Schema:
employees (alias: bev)(value, name, date, id)
schedules(name, salary, status, level)
Task: Find code from employees where value exceeds the average salary from schedules for the same id.
SQL: | SELECT code FROM employees AS bev
WHERE value > (
SELECT AVG(salary) FROM schedules AS vmob
WHERE vmob.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "schedules",
"outer_alias": "bev",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01580 | train |
v1 | Schema:
shipments (alias: vnob)(date, name, amount, type)
regions(id, amount, date, code)
Task: Retrieve salary from shipments whose id is found in regions rows where status matches the outer record.
SQL: | SELECT salary FROM shipments AS vnob
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01581 | train |
v1 | Schema:
managers (alias: hac)(status, level, value, type)
transactions(id, level, type, status)
Task: Select value from managers where level exists in transactions for the same code.
SQL: | SELECT value FROM managers AS hac
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01582 | train |
v3 | Schema:
staff (alias: xnob)(type, value, level, id)
transactions(level, amount, date, value)
Task: Find name from staff where amount exceeds the average salary from transactions for the same status.
SQL: | SELECT name FROM staff AS xnob
WHERE amount > (
SELECT AVG(salary) FROM transactions AS gev
WHERE gev.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "transactions",
"outer_alias": "xnob",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01583 | train |
v3 | Schema:
projects (alias: uliv)(amount, code, type, value)
customers(code, amount, type, date)
Task: Retrieve amount from projects with salary above the MAX(value) of customers rows sharing the same code.
SQL: | SELECT amount FROM projects AS uliv
WHERE salary > (
SELECT MAX(value) FROM customers AS lex
WHERE lex.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "customers",
"outer_alias": "uliv",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01584 | train |
v1 | Schema:
sales (alias: cif)(status, value, date, id)
items(amount, salary, date, status)
Task: Retrieve amount from sales whose code is found in items rows where status matches the outer record.
SQL: | SELECT amount FROM sales AS cif
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01585 | train |
v2 | Schema:
items (alias: ikob)(level, value, amount, date)
employees(salary, name, date, level)
Task: Retrieve id from items that have at least one corresponding entry in employees sharing the same type.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "ikob",
"inner_alias": "bev",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01586 | train |
v2 | Schema:
products (alias: nad)(name, id, type, date)
shipments(name, amount, id, value)
Task: Find salary from products where a matching record exists in shipments with the same code.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = nad.code
); | {
"outer_table": "products",
"inner_table": "shipments",
"outer_alias": "nad",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01587 | train |
v2 | Schema:
accounts (alias: jac)(level, id, date, name)
categories(level, salary, value, id)
Task: Find value from accounts where a matching record exists in categories with the same status.
SQL: | SELECT value FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01588 | train |
v3 | Schema:
shipments (alias: vnob)(level, code, status, amount)
tasks(date, value, level, id)
Task: Find code from shipments where value exceeds the average value from tasks for the same code.
SQL: | SELECT code FROM shipments AS vnob
WHERE value > (
SELECT AVG(value) FROM tasks AS znob
WHERE znob.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "tasks",
"outer_alias": "vnob",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01589 | train |
v1 | Schema:
invoices (alias: fal)(amount, type, status, value)
categories(date, level, name, code)
Task: Find amount from invoices where code appears in categories entries with matching level.
SQL: | SELECT amount FROM invoices AS fal
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01590 | train |
v3 | Schema:
departments (alias: dov)(type, amount, code, status)
shipments(name, status, salary, code)
Task: Retrieve name from departments with salary above the AVG(value) of shipments rows sharing the same type.
SQL: | SELECT name FROM departments AS dov
WHERE salary > (
SELECT AVG(value) FROM shipments AS vnob
WHERE vnob.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "shipments",
"outer_alias": "dov",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01591 | train |
v3 | Schema:
products (alias: nad)(id, code, name, type)
schedules(salary, name, level, code)
Task: Find amount from products where value exceeds the minimum salary from schedules for the same level.
SQL: | SELECT amount FROM products AS nad
WHERE value > (
SELECT MIN(salary) FROM schedules AS vmob
WHERE vmob.level = nad.level
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "nad",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01592 | train |
v3 | Schema:
regions (alias: okiv)(amount, status, type, value)
accounts(value, status, id, name)
Task: Find amount from regions where salary exceeds the count of salary from accounts for the same id.
SQL: | SELECT amount FROM regions AS okiv
WHERE salary > (
SELECT COUNT(salary) FROM accounts AS jac
WHERE jac.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "accounts",
"outer_alias": "okiv",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01593 | train |
v3 | Schema:
transactions (alias: gev)(id, type, amount, status)
orders(type, salary, value, status)
Task: Find id from transactions where value exceeds the maximum salary from orders for the same type.
SQL: | SELECT id FROM transactions AS gev
WHERE value > (
SELECT MAX(salary) FROM orders AS kab
WHERE kab.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01594 | train |
v1 | Schema:
products (alias: nad)(status, date, type, level)
sales(value, level, id, salary)
Task: Retrieve code from products whose level is found in sales rows where status matches the outer record.
SQL: | SELECT code FROM products AS nad
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.status = nad.status
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "nad",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01595 | train |
v2 | Schema:
categories (alias: egiv)(value, status, date, id)
employees(type, salary, id, name)
Task: Find amount from categories where a matching record exists in employees with the same level.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "employees",
"outer_alias": "egiv",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01596 | train |
v1 | Schema:
staff (alias: xnob)(value, amount, date, salary)
projects(date, status, salary, name)
Task: Find value from staff where level appears in projects entries with matching status.
SQL: | SELECT value FROM staff AS xnob
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01597 | train |
v3 | Schema:
invoices (alias: fal)(name, id, value, code)
transactions(level, code, id, date)
Task: Retrieve code from invoices with value above the COUNT(salary) of transactions rows sharing the same level.
SQL: | SELECT code FROM invoices AS fal
WHERE value > (
SELECT COUNT(salary) FROM transactions AS gev
WHERE gev.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01598 | train |
v2 | Schema:
requests (alias: ejof)(level, name, type, amount)
categories(level, name, amount, code)
Task: Retrieve name from requests that have at least one corresponding entry in categories sharing the same type.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01599 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.