variant stringclasses 3
values | prompt stringlengths 160 237 | sql stringlengths 102 141 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v2 | Schema:
orders (alias: ord)(value, date, name, status)
schedules(level, salary, date, type)
Task: Retrieve name from orders that have at least one corresponding entry in schedules sharing the same level.
SQL: | SELECT name FROM orders AS ord
WHERE EXISTS (
SELECT 1 FROM schedules AS schd
WHERE schd.level = ord.level
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "ord",
"inner_alias": "schd",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "ord.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06700 | train |
v2 | Schema:
products (alias: prod)(code, status, value, id)
categories(date, id, name, status)
Task: Find name from products where a matching record exists in categories with the same code.
SQL: | SELECT name FROM products AS prod
WHERE EXISTS (
SELECT 1 FROM categories AS catg
WHERE catg.code = prod.code
); | {
"outer_table": "products",
"inner_table": "categories",
"outer_alias": "prod",
"inner_alias": "catg",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "prod.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06701 | train |
v2 | Schema:
shipments (alias: shp)(id, value, level, amount)
branches(level, name, type, value)
Task: Retrieve salary from shipments that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT salary FROM shipments AS shp
WHERE EXISTS (
SELECT 1 FROM branches AS brc
WHERE brc.id = shp.id
); | {
"outer_table": "shipments",
"inner_table": "branches",
"outer_alias": "shp",
"inner_alias": "brc",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "shp.id",
"token_group": "T2",
"fan_out": 30
} | T2 | cs8_fixed_v4_train_06702 | train |
v3 | Schema:
managers (alias: mgr)(name, date, id, status)
categories(id, type, status, code)
Task: Find id from managers where value exceeds the average salary from categories for the same status.
SQL: | SELECT id FROM managers AS mgr
WHERE value > (
SELECT AVG(salary) FROM categories AS catg
WHERE catg.status = mgr.status
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "mgr",
"inner_alias": "catg",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "mgr.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06703 | train |
v1 | Schema:
accounts (alias: acct)(type, date, name, level)
items(type, name, amount, code)
Task: Select value from accounts where level exists in items for the same level.
SQL: | SELECT value FROM accounts AS acct
WHERE level IN (
SELECT level FROM items AS lne
WHERE lne.level = acct.level
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "acct",
"inner_alias": "lne",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "acct.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06704 | train |
v3 | Schema:
employees (alias: emp)(name, salary, value, level)
categories(salary, date, status, value)
Task: Retrieve id from employees with salary above the COUNT(amount) of categories rows sharing the same level.
SQL: | SELECT id FROM employees AS emp
WHERE salary > (
SELECT COUNT(amount) FROM categories AS catg
WHERE catg.level = emp.level
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "emp",
"inner_alias": "catg",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "emp.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06705 | train |
v3 | Schema:
products (alias: prod)(salary, date, name, id)
orders(status, name, date, salary)
Task: Retrieve value from products with value above the SUM(salary) of orders rows sharing the same type.
SQL: | SELECT value FROM products AS prod
WHERE value > (
SELECT SUM(salary) FROM orders AS ord
WHERE ord.type = prod.type
); | {
"outer_table": "products",
"inner_table": "orders",
"outer_alias": "prod",
"inner_alias": "ord",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "prod.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06706 | train |
v3 | Schema:
managers (alias: mgr)(status, amount, type, value)
branches(code, date, status, salary)
Task: Find name from managers where salary exceeds the total amount from branches for the same level.
SQL: | SELECT name FROM managers AS mgr
WHERE salary > (
SELECT SUM(amount) FROM branches AS brc
WHERE brc.level = mgr.level
); | {
"outer_table": "managers",
"inner_table": "branches",
"outer_alias": "mgr",
"inner_alias": "brc",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "mgr.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06707 | train |
v1 | Schema:
managers (alias: mgr)(date, code, id, type)
sales(level, type, salary, name)
Task: Select amount from managers where code exists in sales for the same type.
SQL: | SELECT amount FROM managers AS mgr
WHERE code IN (
SELECT code FROM sales AS sale
WHERE sale.type = mgr.type
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "mgr",
"inner_alias": "sale",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "mgr.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06708 | train |
v3 | Schema:
projects (alias: prj)(level, salary, type, name)
shipments(date, id, level, value)
Task: Find amount from projects where value exceeds the maximum amount from shipments for the same type.
SQL: | SELECT amount FROM projects AS prj
WHERE value > (
SELECT MAX(amount) FROM shipments AS shp
WHERE shp.type = prj.type
); | {
"outer_table": "projects",
"inner_table": "shipments",
"outer_alias": "prj",
"inner_alias": "shp",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "prj.type",
"token_group": "T2",
"fan_out": 712
} | T2 | cs8_fixed_v4_train_06709 | train |
v2 | Schema:
schedules (alias: schd)(amount, type, id, status)
employees(id, value, level, code)
Task: Find id from schedules where a matching record exists in employees with the same status.
SQL: | SELECT id FROM schedules AS schd
WHERE EXISTS (
SELECT 1 FROM employees AS emp
WHERE emp.status = schd.status
); | {
"outer_table": "schedules",
"inner_table": "employees",
"outer_alias": "schd",
"inner_alias": "emp",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "schd.status",
"token_group": "T2",
"fan_out": 36
} | T2 | cs8_fixed_v4_train_06710 | train |
v2 | Schema:
managers (alias: mgr)(name, level, value, date)
requests(type, level, amount, id)
Task: Retrieve salary from managers that have at least one corresponding entry in requests sharing the same type.
SQL: | SELECT salary FROM managers AS mgr
WHERE EXISTS (
SELECT 1 FROM requests AS ordr
WHERE ordr.type = mgr.type
); | {
"outer_table": "managers",
"inner_table": "requests",
"outer_alias": "mgr",
"inner_alias": "ordr",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "mgr.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06711 | train |
v2 | Schema:
projects (alias: prj)(date, code, salary, name)
orders(type, date, level, amount)
Task: Find name from projects where a matching record exists in orders with the same status.
SQL: | SELECT name FROM projects AS prj
WHERE EXISTS (
SELECT 1 FROM orders AS ord
WHERE ord.status = prj.status
); | {
"outer_table": "projects",
"inner_table": "orders",
"outer_alias": "prj",
"inner_alias": "ord",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "prj.status",
"token_group": "T2",
"fan_out": 712
} | T2 | cs8_fixed_v4_train_06712 | train |
v3 | Schema:
items (alias: lne)(id, level, name, date)
shipments(amount, date, type, value)
Task: Find amount from items where amount exceeds the minimum salary from shipments for the same id.
SQL: | SELECT amount FROM items AS lne
WHERE amount > (
SELECT MIN(salary) FROM shipments AS shp
WHERE shp.id = lne.id
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "lne",
"inner_alias": "shp",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "lne.id",
"token_group": "T2",
"fan_out": 883
} | T2 | cs8_fixed_v4_train_06713 | train |
v1 | Schema:
managers (alias: mgr)(date, id, status, type)
staff(level, type, id, amount)
Task: Find code from managers where status appears in staff entries with matching level.
SQL: | SELECT code FROM managers AS mgr
WHERE status IN (
SELECT status FROM staff AS empl
WHERE empl.level = mgr.level
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "mgr",
"inner_alias": "empl",
"proj_col": "code",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "mgr.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06714 | train |
v2 | Schema:
requests (alias: ordr)(name, value, amount, level)
transactions(name, date, id, amount)
Task: Find id from requests where a matching record exists in transactions with the same id.
SQL: | SELECT id FROM requests AS ordr
WHERE EXISTS (
SELECT 1 FROM transactions AS txn
WHERE txn.id = ordr.id
); | {
"outer_table": "requests",
"inner_table": "transactions",
"outer_alias": "ordr",
"inner_alias": "txn",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "ordr.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs8_fixed_v4_train_06715 | train |
v3 | Schema:
requests (alias: ordr)(salary, amount, id, value)
departments(date, value, level, name)
Task: Find code from requests where amount exceeds the total value from departments for the same code.
SQL: | SELECT code FROM requests AS ordr
WHERE amount > (
SELECT SUM(value) FROM departments AS dept
WHERE dept.code = ordr.code
); | {
"outer_table": "requests",
"inner_table": "departments",
"outer_alias": "ordr",
"inner_alias": "dept",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "ordr.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs8_fixed_v4_train_06716 | train |
v1 | Schema:
invoices (alias: inv)(salary, status, id, code)
products(status, name, id, type)
Task: Select salary from invoices where id exists in products for the same level.
SQL: | SELECT salary FROM invoices AS inv
WHERE id IN (
SELECT id FROM products AS prod
WHERE prod.level = inv.level
); | {
"outer_table": "invoices",
"inner_table": "products",
"outer_alias": "inv",
"inner_alias": "prod",
"proj_col": "salary",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "inv.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06717 | train |
v3 | Schema:
shipments (alias: shp)(type, amount, status, id)
categories(name, code, type, status)
Task: Find amount from shipments where amount exceeds the minimum amount from categories for the same id.
SQL: | SELECT amount FROM shipments AS shp
WHERE amount > (
SELECT MIN(amount) FROM categories AS catg
WHERE catg.id = shp.id
); | {
"outer_table": "shipments",
"inner_table": "categories",
"outer_alias": "shp",
"inner_alias": "catg",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "shp.id",
"token_group": "T2",
"fan_out": 30
} | T2 | cs8_fixed_v4_train_06718 | train |
v3 | Schema:
orders (alias: ord)(code, amount, status, level)
staff(value, name, status, amount)
Task: Retrieve salary from orders with value above the COUNT(salary) of staff rows sharing the same level.
SQL: | SELECT salary FROM orders AS ord
WHERE value > (
SELECT COUNT(salary) FROM staff AS empl
WHERE empl.level = ord.level
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "ord",
"inner_alias": "empl",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "ord.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06719 | train |
v3 | Schema:
products (alias: prod)(id, value, name, level)
regions(code, date, name, level)
Task: Retrieve code from products with salary above the MIN(salary) of regions rows sharing the same status.
SQL: | SELECT code FROM products AS prod
WHERE salary > (
SELECT MIN(salary) FROM regions AS rgn
WHERE rgn.status = prod.status
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "prod",
"inner_alias": "rgn",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "prod.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06720 | train |
v1 | Schema:
transactions (alias: txn)(code, id, salary, amount)
categories(amount, id, code, name)
Task: Select code from transactions where type exists in categories for the same status.
SQL: | SELECT code FROM transactions AS txn
WHERE type IN (
SELECT type FROM categories AS catg
WHERE catg.status = txn.status
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "txn",
"inner_alias": "catg",
"proj_col": "code",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "txn.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06721 | train |
v3 | Schema:
departments (alias: dept)(date, type, salary, name)
invoices(salary, level, id, code)
Task: Retrieve code from departments with value above the MAX(amount) of invoices rows sharing the same type.
SQL: | SELECT code FROM departments AS dept
WHERE value > (
SELECT MAX(amount) FROM invoices AS inv
WHERE inv.type = dept.type
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dept",
"inner_alias": "inv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "dept.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06722 | train |
v1 | Schema:
customers (alias: cust)(date, code, level, type)
departments(amount, code, date, name)
Task: Find amount from customers where status appears in departments entries with matching id.
SQL: | SELECT amount FROM customers AS cust
WHERE status IN (
SELECT status FROM departments AS dept
WHERE dept.id = cust.id
); | {
"outer_table": "customers",
"inner_table": "departments",
"outer_alias": "cust",
"inner_alias": "dept",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "cust.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06723 | train |
v2 | Schema:
employees (alias: emp)(salary, name, value, amount)
customers(value, code, level, status)
Task: Retrieve salary from employees that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT salary FROM employees AS emp
WHERE EXISTS (
SELECT 1 FROM customers AS cust
WHERE cust.id = emp.id
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "emp",
"inner_alias": "cust",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "emp.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06724 | train |
v2 | Schema:
staff (alias: empl)(id, name, date, salary)
items(salary, name, date, level)
Task: Retrieve id from staff that have at least one corresponding entry in items sharing the same status.
SQL: | SELECT id FROM staff AS empl
WHERE EXISTS (
SELECT 1 FROM items AS lne
WHERE lne.status = empl.status
); | {
"outer_table": "staff",
"inner_table": "items",
"outer_alias": "empl",
"inner_alias": "lne",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "empl.status",
"token_group": "T2",
"fan_out": 110
} | T2 | cs8_fixed_v4_train_06725 | train |
v1 | Schema:
projects (alias: prj)(level, date, type, amount)
requests(amount, level, type, salary)
Task: Retrieve name from projects whose status is found in requests rows where level matches the outer record.
SQL: | SELECT name FROM projects AS prj
WHERE status IN (
SELECT status FROM requests AS ordr
WHERE ordr.level = prj.level
); | {
"outer_table": "projects",
"inner_table": "requests",
"outer_alias": "prj",
"inner_alias": "ordr",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "prj.level",
"token_group": "T2",
"fan_out": 712
} | T2 | cs8_fixed_v4_train_06726 | train |
v2 | Schema:
items (alias: lne)(value, name, code, salary)
orders(type, value, code, amount)
Task: Retrieve code from items that have at least one corresponding entry in orders sharing the same type.
SQL: | SELECT code FROM items AS lne
WHERE EXISTS (
SELECT 1 FROM orders AS ord
WHERE ord.type = lne.type
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "lne",
"inner_alias": "ord",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "lne.type",
"token_group": "T2",
"fan_out": 883
} | T2 | cs8_fixed_v4_train_06727 | train |
v3 | Schema:
tasks (alias: tsk)(date, value, salary, level)
invoices(type, salary, name, value)
Task: Retrieve amount from tasks with value above the SUM(salary) of invoices rows sharing the same code.
SQL: | SELECT amount FROM tasks AS tsk
WHERE value > (
SELECT SUM(salary) FROM invoices AS inv
WHERE inv.code = tsk.code
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "tsk",
"inner_alias": "inv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "tsk.code",
"token_group": "T2",
"fan_out": 1586
} | T2 | cs8_fixed_v4_train_06728 | train |
v1 | Schema:
transactions (alias: txn)(status, value, salary, id)
staff(status, level, date, name)
Task: Retrieve id from transactions whose type is found in staff rows where level matches the outer record.
SQL: | SELECT id FROM transactions AS txn
WHERE type IN (
SELECT type FROM staff AS empl
WHERE empl.level = txn.level
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "txn",
"inner_alias": "empl",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "txn.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06729 | train |
v3 | Schema:
accounts (alias: acct)(salary, amount, date, status)
orders(code, name, value, id)
Task: Find salary from accounts where value exceeds the maximum value from orders for the same code.
SQL: | SELECT salary FROM accounts AS acct
WHERE value > (
SELECT MAX(value) FROM orders AS ord
WHERE ord.code = acct.code
); | {
"outer_table": "accounts",
"inner_table": "orders",
"outer_alias": "acct",
"inner_alias": "ord",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "acct.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06730 | train |
v3 | Schema:
projects (alias: prj)(name, code, date, status)
regions(level, status, value, amount)
Task: Retrieve value from projects with value above the MAX(salary) of regions rows sharing the same id.
SQL: | SELECT value FROM projects AS prj
WHERE value > (
SELECT MAX(salary) FROM regions AS rgn
WHERE rgn.id = prj.id
); | {
"outer_table": "projects",
"inner_table": "regions",
"outer_alias": "prj",
"inner_alias": "rgn",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "prj.id",
"token_group": "T2",
"fan_out": 712
} | T2 | cs8_fixed_v4_train_06731 | train |
v2 | Schema:
regions (alias: rgn)(type, name, date, id)
branches(status, level, salary, id)
Task: Find salary from regions where a matching record exists in branches with the same code.
SQL: | SELECT salary FROM regions AS rgn
WHERE EXISTS (
SELECT 1 FROM branches AS brc
WHERE brc.code = rgn.code
); | {
"outer_table": "regions",
"inner_table": "branches",
"outer_alias": "rgn",
"inner_alias": "brc",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "rgn.code",
"token_group": "T2",
"fan_out": 1534
} | T2 | cs8_fixed_v4_train_06732 | train |
v3 | Schema:
products (alias: prod)(code, type, date, level)
tasks(date, code, id, salary)
Task: Retrieve name from products with amount above the SUM(amount) of tasks rows sharing the same type.
SQL: | SELECT name FROM products AS prod
WHERE amount > (
SELECT SUM(amount) FROM tasks AS tsk
WHERE tsk.type = prod.type
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "prod",
"inner_alias": "tsk",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "prod.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06733 | train |
v2 | Schema:
schedules (alias: schd)(code, level, salary, value)
departments(status, amount, level, date)
Task: Find amount from schedules where a matching record exists in departments with the same code.
SQL: | SELECT amount FROM schedules AS schd
WHERE EXISTS (
SELECT 1 FROM departments AS dept
WHERE dept.code = schd.code
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "schd",
"inner_alias": "dept",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "schd.code",
"token_group": "T2",
"fan_out": 36
} | T2 | cs8_fixed_v4_train_06734 | train |
v1 | Schema:
schedules (alias: schd)(name, level, type, id)
branches(level, id, code, status)
Task: Retrieve salary from schedules whose id is found in branches rows where level matches the outer record.
SQL: | SELECT salary FROM schedules AS schd
WHERE id IN (
SELECT id FROM branches AS brc
WHERE brc.level = schd.level
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "schd",
"inner_alias": "brc",
"proj_col": "salary",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "schd.level",
"token_group": "T2",
"fan_out": 36
} | T2 | cs8_fixed_v4_train_06735 | train |
v3 | Schema:
schedules (alias: schd)(type, level, code, name)
managers(value, salary, date, id)
Task: Retrieve amount from schedules with salary above the SUM(amount) of managers rows sharing the same level.
SQL: | SELECT amount FROM schedules AS schd
WHERE salary > (
SELECT SUM(amount) FROM managers AS mgr
WHERE mgr.level = schd.level
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "schd",
"inner_alias": "mgr",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "schd.level",
"token_group": "T2",
"fan_out": 36
} | T2 | cs8_fixed_v4_train_06736 | train |
v1 | Schema:
products (alias: prod)(id, level, amount, type)
projects(value, code, salary, status)
Task: Select id from products where level exists in projects for the same status.
SQL: | SELECT id FROM products AS prod
WHERE level IN (
SELECT level FROM projects AS prj
WHERE prj.status = prod.status
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "prod",
"inner_alias": "prj",
"proj_col": "id",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "prod.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06737 | train |
v3 | Schema:
regions (alias: rgn)(status, name, level, type)
tasks(date, type, code, status)
Task: Find id from regions where amount exceeds the count of salary from tasks for the same status.
SQL: | SELECT id FROM regions AS rgn
WHERE amount > (
SELECT COUNT(salary) FROM tasks AS tsk
WHERE tsk.status = rgn.status
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "rgn",
"inner_alias": "tsk",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "rgn.status",
"token_group": "T2",
"fan_out": 1534
} | T2 | cs8_fixed_v4_train_06738 | train |
v2 | Schema:
schedules (alias: schd)(status, salary, code, level)
regions(type, amount, date, value)
Task: Retrieve salary from schedules that have at least one corresponding entry in regions sharing the same level.
SQL: | SELECT salary FROM schedules AS schd
WHERE EXISTS (
SELECT 1 FROM regions AS rgn
WHERE rgn.level = schd.level
); | {
"outer_table": "schedules",
"inner_table": "regions",
"outer_alias": "schd",
"inner_alias": "rgn",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "schd.level",
"token_group": "T2",
"fan_out": 36
} | T2 | cs8_fixed_v4_train_06739 | train |
v3 | Schema:
managers (alias: mgr)(type, date, status, code)
employees(value, date, level, status)
Task: Find value from managers where value exceeds the maximum value from employees for the same code.
SQL: | SELECT value FROM managers AS mgr
WHERE value > (
SELECT MAX(value) FROM employees AS emp
WHERE emp.code = mgr.code
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "mgr",
"inner_alias": "emp",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "mgr.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06740 | train |
v2 | Schema:
projects (alias: prj)(type, status, date, value)
staff(type, name, status, salary)
Task: Find salary from projects where a matching record exists in staff with the same status.
SQL: | SELECT salary FROM projects AS prj
WHERE EXISTS (
SELECT 1 FROM staff AS empl
WHERE empl.status = prj.status
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "prj",
"inner_alias": "empl",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "prj.status",
"token_group": "T2",
"fan_out": 712
} | T2 | cs8_fixed_v4_train_06741 | train |
v1 | Schema:
branches (alias: brc)(status, code, salary, amount)
requests(code, level, name, id)
Task: Find amount from branches where id appears in requests entries with matching status.
SQL: | SELECT amount FROM branches AS brc
WHERE id IN (
SELECT id FROM requests AS ordr
WHERE ordr.status = brc.status
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "brc",
"inner_alias": "ordr",
"proj_col": "amount",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "brc.status",
"token_group": "T2",
"fan_out": 1329
} | T2 | cs8_fixed_v4_train_06742 | train |
v1 | Schema:
products (alias: prod)(date, name, code, status)
schedules(value, status, type, id)
Task: Find code from products where code appears in schedules entries with matching code.
SQL: | SELECT code FROM products AS prod
WHERE code IN (
SELECT code FROM schedules AS schd
WHERE schd.code = prod.code
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "prod",
"inner_alias": "schd",
"proj_col": "code",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "prod.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06743 | train |
v2 | Schema:
managers (alias: mgr)(type, amount, status, name)
transactions(id, type, status, name)
Task: Find amount from managers where a matching record exists in transactions with the same level.
SQL: | SELECT amount FROM managers AS mgr
WHERE EXISTS (
SELECT 1 FROM transactions AS txn
WHERE txn.level = mgr.level
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "mgr",
"inner_alias": "txn",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "mgr.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06744 | train |
v2 | Schema:
managers (alias: mgr)(level, type, salary, date)
employees(value, level, status, date)
Task: Retrieve value from managers that have at least one corresponding entry in employees sharing the same id.
SQL: | SELECT value FROM managers AS mgr
WHERE EXISTS (
SELECT 1 FROM employees AS emp
WHERE emp.id = mgr.id
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "mgr",
"inner_alias": "emp",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "mgr.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06745 | train |
v1 | Schema:
branches (alias: brc)(amount, value, code, level)
orders(salary, amount, date, name)
Task: Retrieve code from branches whose status is found in orders rows where id matches the outer record.
SQL: | SELECT code FROM branches AS brc
WHERE status IN (
SELECT status FROM orders AS ord
WHERE ord.id = brc.id
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "brc",
"inner_alias": "ord",
"proj_col": "code",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "brc.id",
"token_group": "T2",
"fan_out": 1329
} | T2 | cs8_fixed_v4_train_06746 | train |
v1 | Schema:
managers (alias: mgr)(type, amount, id, status)
tasks(name, salary, date, code)
Task: Retrieve amount from managers whose level is found in tasks rows where code matches the outer record.
SQL: | SELECT amount FROM managers AS mgr
WHERE level IN (
SELECT level FROM tasks AS tsk
WHERE tsk.code = mgr.code
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "mgr",
"inner_alias": "tsk",
"proj_col": "amount",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "mgr.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06747 | train |
v3 | Schema:
accounts (alias: acct)(level, amount, date, code)
products(level, code, type, id)
Task: Find value from accounts where amount exceeds the total salary from products for the same code.
SQL: | SELECT value FROM accounts AS acct
WHERE amount > (
SELECT SUM(salary) FROM products AS prod
WHERE prod.code = acct.code
); | {
"outer_table": "accounts",
"inner_table": "products",
"outer_alias": "acct",
"inner_alias": "prod",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "acct.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06748 | train |
v2 | Schema:
accounts (alias: acct)(type, amount, id, date)
schedules(salary, amount, id, status)
Task: Find amount from accounts where a matching record exists in schedules with the same type.
SQL: | SELECT amount FROM accounts AS acct
WHERE EXISTS (
SELECT 1 FROM schedules AS schd
WHERE schd.type = acct.type
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "acct",
"inner_alias": "schd",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "acct.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06749 | train |
v1 | Schema:
accounts (alias: acct)(code, id, date, salary)
items(salary, date, id, code)
Task: Find code from accounts where level appears in items entries with matching level.
SQL: | SELECT code FROM accounts AS acct
WHERE level IN (
SELECT level FROM items AS lne
WHERE lne.level = acct.level
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "acct",
"inner_alias": "lne",
"proj_col": "code",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "acct.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06750 | train |
v3 | Schema:
requests (alias: ordr)(date, code, amount, name)
products(name, code, type, value)
Task: Retrieve salary from requests with amount above the AVG(amount) of products rows sharing the same status.
SQL: | SELECT salary FROM requests AS ordr
WHERE amount > (
SELECT AVG(amount) FROM products AS prod
WHERE prod.status = ordr.status
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ordr",
"inner_alias": "prod",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "ordr.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs8_fixed_v4_train_06751 | train |
v1 | Schema:
invoices (alias: inv)(level, type, salary, id)
schedules(amount, value, type, status)
Task: Retrieve id from invoices whose id is found in schedules rows where status matches the outer record.
SQL: | SELECT id FROM invoices AS inv
WHERE id IN (
SELECT id FROM schedules AS schd
WHERE schd.status = inv.status
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "inv",
"inner_alias": "schd",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "inv.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06752 | train |
v3 | Schema:
staff (alias: empl)(value, code, id, level)
transactions(id, type, code, date)
Task: Retrieve name from staff with amount above the MIN(amount) of transactions rows sharing the same level.
SQL: | SELECT name FROM staff AS empl
WHERE amount > (
SELECT MIN(amount) FROM transactions AS txn
WHERE txn.level = empl.level
); | {
"outer_table": "staff",
"inner_table": "transactions",
"outer_alias": "empl",
"inner_alias": "txn",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "empl.level",
"token_group": "T2",
"fan_out": 110
} | T2 | cs8_fixed_v4_train_06753 | train |
v3 | Schema:
managers (alias: mgr)(amount, value, salary, level)
regions(salary, value, amount, type)
Task: Retrieve id from managers with salary above the AVG(amount) of regions rows sharing the same id.
SQL: | SELECT id FROM managers AS mgr
WHERE salary > (
SELECT AVG(amount) FROM regions AS rgn
WHERE rgn.id = mgr.id
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "mgr",
"inner_alias": "rgn",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "mgr.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06754 | train |
v1 | Schema:
regions (alias: rgn)(name, id, date, level)
shipments(id, level, amount, value)
Task: Retrieve amount from regions whose code is found in shipments rows where status matches the outer record.
SQL: | SELECT amount FROM regions AS rgn
WHERE code IN (
SELECT code FROM shipments AS shp
WHERE shp.status = rgn.status
); | {
"outer_table": "regions",
"inner_table": "shipments",
"outer_alias": "rgn",
"inner_alias": "shp",
"proj_col": "amount",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "rgn.status",
"token_group": "T2",
"fan_out": 1534
} | T2 | cs8_fixed_v4_train_06755 | train |
v2 | Schema:
departments (alias: dept)(date, code, salary, status)
managers(type, code, level, value)
Task: Find salary from departments where a matching record exists in managers with the same status.
SQL: | SELECT salary FROM departments AS dept
WHERE EXISTS (
SELECT 1 FROM managers AS mgr
WHERE mgr.status = dept.status
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dept",
"inner_alias": "mgr",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "dept.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06756 | train |
v1 | Schema:
orders (alias: ord)(name, id, code, level)
branches(status, salary, id, value)
Task: Select id from orders where level exists in branches for the same id.
SQL: | SELECT id FROM orders AS ord
WHERE level IN (
SELECT level FROM branches AS brc
WHERE brc.id = ord.id
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "ord",
"inner_alias": "brc",
"proj_col": "id",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "ord.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06757 | train |
v1 | Schema:
regions (alias: rgn)(value, name, amount, salary)
customers(code, id, type, name)
Task: Retrieve code from regions whose status is found in customers rows where code matches the outer record.
SQL: | SELECT code FROM regions AS rgn
WHERE status IN (
SELECT status FROM customers AS cust
WHERE cust.code = rgn.code
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "rgn",
"inner_alias": "cust",
"proj_col": "code",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "rgn.code",
"token_group": "T2",
"fan_out": 1534
} | T2 | cs8_fixed_v4_train_06758 | train |
v2 | Schema:
schedules (alias: schd)(type, salary, value, code)
branches(id, salary, date, value)
Task: Retrieve code from schedules that have at least one corresponding entry in branches sharing the same code.
SQL: | SELECT code FROM schedules AS schd
WHERE EXISTS (
SELECT 1 FROM branches AS brc
WHERE brc.code = schd.code
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "schd",
"inner_alias": "brc",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "schd.code",
"token_group": "T2",
"fan_out": 36
} | T2 | cs8_fixed_v4_train_06759 | train |
v1 | Schema:
requests (alias: ordr)(value, code, name, id)
categories(salary, id, name, level)
Task: Retrieve name from requests whose code is found in categories rows where id matches the outer record.
SQL: | SELECT name FROM requests AS ordr
WHERE code IN (
SELECT code FROM categories AS catg
WHERE catg.id = ordr.id
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ordr",
"inner_alias": "catg",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "ordr.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs8_fixed_v4_train_06760 | train |
v1 | Schema:
regions (alias: rgn)(code, id, type, date)
categories(value, type, date, id)
Task: Find name from regions where code appears in categories entries with matching level.
SQL: | SELECT name FROM regions AS rgn
WHERE code IN (
SELECT code FROM categories AS catg
WHERE catg.level = rgn.level
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "rgn",
"inner_alias": "catg",
"proj_col": "name",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "rgn.level",
"token_group": "T2",
"fan_out": 1534
} | T2 | cs8_fixed_v4_train_06761 | train |
v1 | Schema:
schedules (alias: schd)(id, status, salary, value)
invoices(name, salary, level, amount)
Task: Select id from schedules where type exists in invoices for the same id.
SQL: | SELECT id FROM schedules AS schd
WHERE type IN (
SELECT type FROM invoices AS inv
WHERE inv.id = schd.id
); | {
"outer_table": "schedules",
"inner_table": "invoices",
"outer_alias": "schd",
"inner_alias": "inv",
"proj_col": "id",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "schd.id",
"token_group": "T2",
"fan_out": 36
} | T2 | cs8_fixed_v4_train_06762 | train |
v2 | Schema:
regions (alias: rgn)(salary, type, level, date)
sales(code, date, amount, value)
Task: Find salary from regions where a matching record exists in sales with the same id.
SQL: | SELECT salary FROM regions AS rgn
WHERE EXISTS (
SELECT 1 FROM sales AS sale
WHERE sale.id = rgn.id
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "rgn",
"inner_alias": "sale",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "rgn.id",
"token_group": "T2",
"fan_out": 1534
} | T2 | cs8_fixed_v4_train_06763 | train |
v3 | Schema:
employees (alias: emp)(status, id, type, name)
transactions(id, date, name, status)
Task: Find value from employees where value exceeds the average value from transactions for the same type.
SQL: | SELECT value FROM employees AS emp
WHERE value > (
SELECT AVG(value) FROM transactions AS txn
WHERE txn.type = emp.type
); | {
"outer_table": "employees",
"inner_table": "transactions",
"outer_alias": "emp",
"inner_alias": "txn",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "emp.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06764 | train |
v2 | Schema:
departments (alias: dept)(level, name, amount, id)
managers(salary, status, amount, id)
Task: Find value from departments where a matching record exists in managers with the same id.
SQL: | SELECT value FROM departments AS dept
WHERE EXISTS (
SELECT 1 FROM managers AS mgr
WHERE mgr.id = dept.id
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dept",
"inner_alias": "mgr",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "dept.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06765 | train |
v1 | Schema:
managers (alias: mgr)(salary, value, status, date)
tasks(amount, value, name, type)
Task: Retrieve value from managers whose id is found in tasks rows where code matches the outer record.
SQL: | SELECT value FROM managers AS mgr
WHERE id IN (
SELECT id FROM tasks AS tsk
WHERE tsk.code = mgr.code
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "mgr",
"inner_alias": "tsk",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "mgr.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06766 | train |
v3 | Schema:
orders (alias: ord)(date, salary, status, id)
managers(type, level, amount, value)
Task: Retrieve amount from orders with salary above the SUM(amount) of managers rows sharing the same type.
SQL: | SELECT amount FROM orders AS ord
WHERE salary > (
SELECT SUM(amount) FROM managers AS mgr
WHERE mgr.type = ord.type
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "ord",
"inner_alias": "mgr",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "ord.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06767 | train |
v2 | Schema:
transactions (alias: txn)(type, amount, status, name)
schedules(status, type, amount, name)
Task: Retrieve id from transactions that have at least one corresponding entry in schedules sharing the same code.
SQL: | SELECT id FROM transactions AS txn
WHERE EXISTS (
SELECT 1 FROM schedules AS schd
WHERE schd.code = txn.code
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "txn",
"inner_alias": "schd",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "txn.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06768 | train |
v2 | Schema:
employees (alias: emp)(id, date, value, salary)
managers(level, id, value, name)
Task: Find value from employees where a matching record exists in managers with the same code.
SQL: | SELECT value FROM employees AS emp
WHERE EXISTS (
SELECT 1 FROM managers AS mgr
WHERE mgr.code = emp.code
); | {
"outer_table": "employees",
"inner_table": "managers",
"outer_alias": "emp",
"inner_alias": "mgr",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "emp.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06769 | train |
v1 | Schema:
regions (alias: rgn)(type, value, name, code)
employees(date, status, name, salary)
Task: Select amount from regions where type exists in employees for the same type.
SQL: | SELECT amount FROM regions AS rgn
WHERE type IN (
SELECT type FROM employees AS emp
WHERE emp.type = rgn.type
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "rgn",
"inner_alias": "emp",
"proj_col": "amount",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "rgn.type",
"token_group": "T2",
"fan_out": 1534
} | T2 | cs8_fixed_v4_train_06770 | train |
v2 | Schema:
transactions (alias: txn)(id, salary, level, status)
branches(code, date, type, salary)
Task: Find code from transactions where a matching record exists in branches with the same id.
SQL: | SELECT code FROM transactions AS txn
WHERE EXISTS (
SELECT 1 FROM branches AS brc
WHERE brc.id = txn.id
); | {
"outer_table": "transactions",
"inner_table": "branches",
"outer_alias": "txn",
"inner_alias": "brc",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "txn.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06771 | train |
v3 | Schema:
items (alias: lne)(value, name, amount, date)
orders(id, salary, status, amount)
Task: Retrieve id from items with amount above the SUM(value) of orders rows sharing the same code.
SQL: | SELECT id FROM items AS lne
WHERE amount > (
SELECT SUM(value) FROM orders AS ord
WHERE ord.code = lne.code
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "lne",
"inner_alias": "ord",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "lne.code",
"token_group": "T2",
"fan_out": 883
} | T2 | cs8_fixed_v4_train_06772 | train |
v2 | Schema:
regions (alias: rgn)(amount, name, status, date)
tasks(date, level, id, value)
Task: Find id from regions where a matching record exists in tasks with the same level.
SQL: | SELECT id FROM regions AS rgn
WHERE EXISTS (
SELECT 1 FROM tasks AS tsk
WHERE tsk.level = rgn.level
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "rgn",
"inner_alias": "tsk",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "rgn.level",
"token_group": "T2",
"fan_out": 1534
} | T2 | cs8_fixed_v4_train_06773 | train |
v3 | Schema:
managers (alias: mgr)(status, amount, level, name)
projects(name, level, value, amount)
Task: Retrieve name from managers with value above the MAX(salary) of projects rows sharing the same type.
SQL: | SELECT name FROM managers AS mgr
WHERE value > (
SELECT MAX(salary) FROM projects AS prj
WHERE prj.type = mgr.type
); | {
"outer_table": "managers",
"inner_table": "projects",
"outer_alias": "mgr",
"inner_alias": "prj",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "mgr.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06774 | train |
v1 | Schema:
tasks (alias: tsk)(type, value, level, name)
projects(level, value, date, id)
Task: Find amount from tasks where type appears in projects entries with matching type.
SQL: | SELECT amount FROM tasks AS tsk
WHERE type IN (
SELECT type FROM projects AS prj
WHERE prj.type = tsk.type
); | {
"outer_table": "tasks",
"inner_table": "projects",
"outer_alias": "tsk",
"inner_alias": "prj",
"proj_col": "amount",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "tsk.type",
"token_group": "T2",
"fan_out": 1586
} | T2 | cs8_fixed_v4_train_06775 | train |
v3 | Schema:
staff (alias: empl)(id, level, type, amount)
accounts(value, amount, status, date)
Task: Find code from staff where salary exceeds the count of amount from accounts for the same status.
SQL: | SELECT code FROM staff AS empl
WHERE salary > (
SELECT COUNT(amount) FROM accounts AS acct
WHERE acct.status = empl.status
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "empl",
"inner_alias": "acct",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "empl.status",
"token_group": "T2",
"fan_out": 110
} | T2 | cs8_fixed_v4_train_06776 | train |
v2 | Schema:
projects (alias: prj)(date, value, amount, type)
categories(id, date, amount, salary)
Task: Find amount from projects where a matching record exists in categories with the same id.
SQL: | SELECT amount FROM projects AS prj
WHERE EXISTS (
SELECT 1 FROM categories AS catg
WHERE catg.id = prj.id
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "prj",
"inner_alias": "catg",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "prj.id",
"token_group": "T2",
"fan_out": 712
} | T2 | cs8_fixed_v4_train_06777 | train |
v1 | Schema:
departments (alias: dept)(id, value, status, code)
managers(value, salary, id, amount)
Task: Select name from departments where code exists in managers for the same status.
SQL: | SELECT name FROM departments AS dept
WHERE code IN (
SELECT code FROM managers AS mgr
WHERE mgr.status = dept.status
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dept",
"inner_alias": "mgr",
"proj_col": "name",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "dept.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06778 | train |
v2 | Schema:
shipments (alias: shp)(salary, level, date, type)
accounts(date, salary, level, id)
Task: Find code from shipments where a matching record exists in accounts with the same type.
SQL: | SELECT code FROM shipments AS shp
WHERE EXISTS (
SELECT 1 FROM accounts AS acct
WHERE acct.type = shp.type
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "shp",
"inner_alias": "acct",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "shp.type",
"token_group": "T2",
"fan_out": 30
} | T2 | cs8_fixed_v4_train_06779 | train |
v1 | Schema:
staff (alias: empl)(amount, name, type, value)
regions(code, value, type, date)
Task: Find name from staff where id appears in regions entries with matching code.
SQL: | SELECT name FROM staff AS empl
WHERE id IN (
SELECT id FROM regions AS rgn
WHERE rgn.code = empl.code
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "empl",
"inner_alias": "rgn",
"proj_col": "name",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "empl.code",
"token_group": "T2",
"fan_out": 110
} | T2 | cs8_fixed_v4_train_06780 | train |
v3 | Schema:
schedules (alias: schd)(level, salary, value, id)
customers(code, id, value, name)
Task: Retrieve salary from schedules with amount above the MAX(salary) of customers rows sharing the same type.
SQL: | SELECT salary FROM schedules AS schd
WHERE amount > (
SELECT MAX(salary) FROM customers AS cust
WHERE cust.type = schd.type
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "schd",
"inner_alias": "cust",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "schd.type",
"token_group": "T2",
"fan_out": 36
} | T2 | cs8_fixed_v4_train_06781 | train |
v1 | Schema:
staff (alias: empl)(code, salary, name, level)
categories(code, type, status, name)
Task: Retrieve name from staff whose level is found in categories rows where level matches the outer record.
SQL: | SELECT name FROM staff AS empl
WHERE level IN (
SELECT level FROM categories AS catg
WHERE catg.level = empl.level
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "empl",
"inner_alias": "catg",
"proj_col": "name",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "empl.level",
"token_group": "T2",
"fan_out": 110
} | T2 | cs8_fixed_v4_train_06782 | train |
v2 | Schema:
schedules (alias: schd)(value, level, amount, status)
branches(type, code, value, status)
Task: Find value from schedules where a matching record exists in branches with the same code.
SQL: | SELECT value FROM schedules AS schd
WHERE EXISTS (
SELECT 1 FROM branches AS brc
WHERE brc.code = schd.code
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "schd",
"inner_alias": "brc",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "schd.code",
"token_group": "T2",
"fan_out": 36
} | T2 | cs8_fixed_v4_train_06783 | train |
v1 | Schema:
employees (alias: emp)(type, status, date, name)
requests(name, level, date, amount)
Task: Find id from employees where type appears in requests entries with matching type.
SQL: | SELECT id FROM employees AS emp
WHERE type IN (
SELECT type FROM requests AS ordr
WHERE ordr.type = emp.type
); | {
"outer_table": "employees",
"inner_table": "requests",
"outer_alias": "emp",
"inner_alias": "ordr",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "emp.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06784 | train |
v2 | Schema:
tasks (alias: tsk)(status, level, value, salary)
projects(type, salary, id, value)
Task: Retrieve amount from tasks that have at least one corresponding entry in projects sharing the same type.
SQL: | SELECT amount FROM tasks AS tsk
WHERE EXISTS (
SELECT 1 FROM projects AS prj
WHERE prj.type = tsk.type
); | {
"outer_table": "tasks",
"inner_table": "projects",
"outer_alias": "tsk",
"inner_alias": "prj",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "tsk.type",
"token_group": "T2",
"fan_out": 1586
} | T2 | cs8_fixed_v4_train_06785 | train |
v1 | Schema:
departments (alias: dept)(code, type, status, id)
accounts(level, date, status, amount)
Task: Retrieve salary from departments whose type is found in accounts rows where status matches the outer record.
SQL: | SELECT salary FROM departments AS dept
WHERE type IN (
SELECT type FROM accounts AS acct
WHERE acct.status = dept.status
); | {
"outer_table": "departments",
"inner_table": "accounts",
"outer_alias": "dept",
"inner_alias": "acct",
"proj_col": "salary",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "dept.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06786 | train |
v2 | Schema:
items (alias: lne)(status, id, salary, type)
branches(level, id, type, date)
Task: Retrieve amount from items that have at least one corresponding entry in branches sharing the same type.
SQL: | SELECT amount FROM items AS lne
WHERE EXISTS (
SELECT 1 FROM branches AS brc
WHERE brc.type = lne.type
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "lne",
"inner_alias": "brc",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "lne.type",
"token_group": "T2",
"fan_out": 883
} | T2 | cs8_fixed_v4_train_06787 | train |
v1 | Schema:
projects (alias: prj)(code, id, value, amount)
customers(amount, salary, code, date)
Task: Select id from projects where type exists in customers for the same code.
SQL: | SELECT id FROM projects AS prj
WHERE type IN (
SELECT type FROM customers AS cust
WHERE cust.code = prj.code
); | {
"outer_table": "projects",
"inner_table": "customers",
"outer_alias": "prj",
"inner_alias": "cust",
"proj_col": "id",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "prj.code",
"token_group": "T2",
"fan_out": 712
} | T2 | cs8_fixed_v4_train_06788 | train |
v3 | Schema:
sales (alias: sale)(date, name, type, id)
staff(level, id, salary, type)
Task: Find name from sales where salary exceeds the total value from staff for the same type.
SQL: | SELECT name FROM sales AS sale
WHERE salary > (
SELECT SUM(value) FROM staff AS empl
WHERE empl.type = sale.type
); | {
"outer_table": "sales",
"inner_table": "staff",
"outer_alias": "sale",
"inner_alias": "empl",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "sale.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06789 | train |
v1 | Schema:
invoices (alias: inv)(status, value, name, amount)
departments(value, code, name, level)
Task: Retrieve code from invoices whose type is found in departments rows where id matches the outer record.
SQL: | SELECT code FROM invoices AS inv
WHERE type IN (
SELECT type FROM departments AS dept
WHERE dept.id = inv.id
); | {
"outer_table": "invoices",
"inner_table": "departments",
"outer_alias": "inv",
"inner_alias": "dept",
"proj_col": "code",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "inv.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06790 | train |
v1 | Schema:
categories (alias: catg)(date, name, salary, code)
staff(salary, code, name, level)
Task: Select name from categories where id exists in staff for the same code.
SQL: | SELECT name FROM categories AS catg
WHERE id IN (
SELECT id FROM staff AS empl
WHERE empl.code = catg.code
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "catg",
"inner_alias": "empl",
"proj_col": "name",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "catg.code",
"token_group": "T2",
"fan_out": 36
} | T2 | cs8_fixed_v4_train_06791 | train |
v1 | Schema:
shipments (alias: shp)(status, code, date, salary)
branches(name, amount, id, code)
Task: Retrieve name from shipments whose type is found in branches rows where level matches the outer record.
SQL: | SELECT name FROM shipments AS shp
WHERE type IN (
SELECT type FROM branches AS brc
WHERE brc.level = shp.level
); | {
"outer_table": "shipments",
"inner_table": "branches",
"outer_alias": "shp",
"inner_alias": "brc",
"proj_col": "name",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "shp.level",
"token_group": "T2",
"fan_out": 30
} | T2 | cs8_fixed_v4_train_06792 | train |
v1 | Schema:
products (alias: prod)(salary, level, name, value)
invoices(date, id, status, value)
Task: Find id from products where type appears in invoices entries with matching code.
SQL: | SELECT id FROM products AS prod
WHERE type IN (
SELECT type FROM invoices AS inv
WHERE inv.code = prod.code
); | {
"outer_table": "products",
"inner_table": "invoices",
"outer_alias": "prod",
"inner_alias": "inv",
"proj_col": "id",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "prod.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06793 | train |
v3 | Schema:
branches (alias: brc)(name, amount, level, date)
items(value, level, name, salary)
Task: Find salary from branches where value exceeds the count of value from items for the same id.
SQL: | SELECT salary FROM branches AS brc
WHERE value > (
SELECT COUNT(value) FROM items AS lne
WHERE lne.id = brc.id
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "brc",
"inner_alias": "lne",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "brc.id",
"token_group": "T2",
"fan_out": 1329
} | T2 | cs8_fixed_v4_train_06794 | train |
v1 | Schema:
transactions (alias: txn)(status, date, salary, level)
products(value, name, status, amount)
Task: Retrieve code from transactions whose id is found in products rows where id matches the outer record.
SQL: | SELECT code FROM transactions AS txn
WHERE id IN (
SELECT id FROM products AS prod
WHERE prod.id = txn.id
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "txn",
"inner_alias": "prod",
"proj_col": "code",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "txn.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06795 | train |
v1 | Schema:
branches (alias: brc)(salary, level, id, amount)
transactions(id, name, date, type)
Task: Find amount from branches where status appears in transactions entries with matching type.
SQL: | SELECT amount FROM branches AS brc
WHERE status IN (
SELECT status FROM transactions AS txn
WHERE txn.type = brc.type
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "brc",
"inner_alias": "txn",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "brc.type",
"token_group": "T2",
"fan_out": 1329
} | T2 | cs8_fixed_v4_train_06796 | train |
v1 | Schema:
projects (alias: prj)(level, value, id, name)
products(code, value, status, name)
Task: Select amount from projects where id exists in products for the same type.
SQL: | SELECT amount FROM projects AS prj
WHERE id IN (
SELECT id FROM products AS prod
WHERE prod.type = prj.type
); | {
"outer_table": "projects",
"inner_table": "products",
"outer_alias": "prj",
"inner_alias": "prod",
"proj_col": "amount",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "prj.type",
"token_group": "T2",
"fan_out": 712
} | T2 | cs8_fixed_v4_train_06797 | train |
v1 | Schema:
requests (alias: ordr)(name, level, amount, code)
invoices(status, amount, level, code)
Task: Find amount from requests where level appears in invoices entries with matching status.
SQL: | SELECT amount FROM requests AS ordr
WHERE level IN (
SELECT level FROM invoices AS inv
WHERE inv.status = ordr.status
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ordr",
"inner_alias": "inv",
"proj_col": "amount",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "ordr.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs8_fixed_v4_train_06798 | train |
v1 | Schema:
customers (alias: cust)(value, type, salary, id)
requests(name, amount, level, id)
Task: Find value from customers where type appears in requests entries with matching id.
SQL: | SELECT value FROM customers AS cust
WHERE type IN (
SELECT type FROM requests AS ordr
WHERE ordr.id = cust.id
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "cust",
"inner_alias": "ordr",
"proj_col": "value",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "cust.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs8_fixed_v4_train_06799 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.