variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v3 | Schema:
employees (alias: bev)(date, salary, status, id)
customers(salary, code, name, status)
Task: Retrieve amount from employees with amount above the MIN(value) of customers rows sharing the same type.
SQL: | SELECT amount FROM employees AS bev
WHERE amount > (
SELECT MIN(value) FROM customers AS lex
WHERE lex.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00800 | train |
v3 | Schema:
transactions (alias: gev)(code, level, date, salary)
schedules(salary, date, type, value)
Task: Retrieve id from transactions with value above the COUNT(value) of schedules rows sharing the same level.
SQL: | SELECT id FROM transactions AS gev
WHERE value > (
SELECT COUNT(value) FROM schedules AS vmob
WHERE vmob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00801 | train |
v3 | Schema:
tasks (alias: znob)(amount, type, name, id)
customers(level, salary, status, date)
Task: Retrieve amount from tasks with amount above the SUM(salary) of customers rows sharing the same code.
SQL: | SELECT amount FROM tasks AS znob
WHERE amount > (
SELECT SUM(salary) FROM customers AS lex
WHERE lex.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00802 | train |
v2 | Schema:
items (alias: ikob)(salary, name, type, value)
projects(value, name, amount, salary)
Task: Retrieve salary from items that have at least one corresponding entry in projects sharing the same level.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00803 | train |
v1 | Schema:
products (alias: nad)(salary, code, id, status)
items(value, amount, level, code)
Task: Select id from products where status exists in items for the same id.
SQL: | SELECT id FROM products AS nad
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.id = nad.id
); | {
"outer_table": "products",
"inner_table": "items",
"outer_alias": "nad",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00804 | train |
v3 | Schema:
managers (alias: hac)(level, id, value, code)
staff(name, value, amount, code)
Task: Find value from managers where amount exceeds the average amount from staff for the same level.
SQL: | SELECT value FROM managers AS hac
WHERE amount > (
SELECT AVG(amount) FROM staff AS xnob
WHERE xnob.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "hac",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00805 | train |
v1 | Schema:
items (alias: ikob)(status, id, date, salary)
products(name, id, value, amount)
Task: Retrieve value from items whose type is found in products rows where status matches the outer record.
SQL: | SELECT value FROM items AS ikob
WHERE type IN (
SELECT type FROM products AS nad
WHERE nad.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00806 | train |
v1 | Schema:
projects (alias: uliv)(value, status, amount, type)
invoices(value, salary, code, name)
Task: Retrieve code from projects whose type is found in invoices rows where type matches the outer record.
SQL: | SELECT code FROM projects AS uliv
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "invoices",
"outer_alias": "uliv",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00807 | train |
v1 | Schema:
tasks (alias: znob)(status, id, code, salary)
accounts(value, salary, type, status)
Task: Select code from tasks where code exists in accounts for the same id.
SQL: | SELECT code FROM tasks AS znob
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00808 | train |
v1 | Schema:
shipments (alias: vnob)(amount, status, name, id)
transactions(id, status, value, name)
Task: Find id from shipments where status appears in transactions entries with matching type.
SQL: | SELECT id FROM shipments AS vnob
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00809 | train |
v2 | Schema:
schedules (alias: vmob)(code, date, amount, type)
managers(status, type, date, amount)
Task: Find code from schedules where a matching record exists in managers with the same status.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00810 | train |
v3 | Schema:
customers (alias: lex)(type, id, date, name)
staff(name, type, date, status)
Task: Retrieve name from customers with salary above the AVG(amount) of staff rows sharing the same status.
SQL: | SELECT name FROM customers AS lex
WHERE salary > (
SELECT AVG(amount) FROM staff AS xnob
WHERE xnob.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00811 | train |
v1 | Schema:
staff (alias: xnob)(status, type, code, salary)
requests(amount, name, type, salary)
Task: Find salary from staff where status appears in requests entries with matching status.
SQL: | SELECT salary FROM staff AS xnob
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00812 | train |
v1 | Schema:
shipments (alias: vnob)(salary, date, status, amount)
customers(name, id, salary, date)
Task: Select amount from shipments where status exists in customers for the same type.
SQL: | SELECT amount FROM shipments AS vnob
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00813 | train |
v3 | Schema:
departments (alias: dov)(id, salary, date, type)
managers(code, status, id, name)
Task: Retrieve name from departments with salary above the SUM(value) of managers rows sharing the same id.
SQL: | SELECT name FROM departments AS dov
WHERE salary > (
SELECT SUM(value) FROM managers AS hac
WHERE hac.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00814 | train |
v3 | Schema:
products (alias: nad)(code, amount, value, level)
requests(id, date, level, name)
Task: Retrieve amount from products with value above the MAX(salary) of requests rows sharing the same code.
SQL: | SELECT amount FROM products AS nad
WHERE value > (
SELECT MAX(salary) FROM requests AS ejof
WHERE ejof.code = nad.code
); | {
"outer_table": "products",
"inner_table": "requests",
"outer_alias": "nad",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00815 | train |
v3 | Schema:
employees (alias: bev)(name, id, value, date)
customers(date, status, name, amount)
Task: Retrieve salary from employees with salary above the MIN(amount) of customers rows sharing the same level.
SQL: | SELECT salary FROM employees AS bev
WHERE salary > (
SELECT MIN(amount) FROM customers AS lex
WHERE lex.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00816 | train |
v1 | Schema:
employees (alias: bev)(salary, level, value, type)
sales(id, type, status, code)
Task: Find value from employees where level appears in sales entries with matching id.
SQL: | SELECT value FROM employees AS bev
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "sales",
"outer_alias": "bev",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00817 | train |
v2 | Schema:
shipments (alias: vnob)(date, name, value, level)
accounts(type, id, status, date)
Task: Retrieve amount from shipments that have at least one corresponding entry in accounts sharing the same id.
SQL: | SELECT amount FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00818 | train |
v1 | Schema:
categories (alias: egiv)(amount, code, name, level)
managers(salary, code, level, value)
Task: Find salary from categories where code appears in managers entries with matching code.
SQL: | SELECT salary FROM categories AS egiv
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "managers",
"outer_alias": "egiv",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00819 | train |
v3 | Schema:
invoices (alias: fal)(type, level, amount, salary)
orders(id, status, amount, level)
Task: Retrieve value from invoices with salary above the SUM(salary) of orders rows sharing the same level.
SQL: | SELECT value FROM invoices AS fal
WHERE salary > (
SELECT SUM(salary) FROM orders AS kab
WHERE kab.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00820 | train |
v2 | Schema:
regions (alias: okiv)(type, name, code, value)
managers(code, salary, type, amount)
Task: Retrieve name from regions that have at least one corresponding entry in managers sharing the same type.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "managers",
"outer_alias": "okiv",
"inner_alias": "hac",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00821 | train |
v3 | Schema:
accounts (alias: jac)(name, code, date, status)
requests(level, status, value, name)
Task: Find name from accounts where amount exceeds the count of value from requests for the same status.
SQL: | SELECT name FROM accounts AS jac
WHERE amount > (
SELECT COUNT(value) FROM requests AS ejof
WHERE ejof.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "requests",
"outer_alias": "jac",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00822 | train |
v3 | Schema:
branches (alias: agov)(type, level, value, date)
items(amount, name, date, status)
Task: Retrieve code from branches with amount above the MIN(salary) of items rows sharing the same type.
SQL: | SELECT code FROM branches AS agov
WHERE amount > (
SELECT MIN(salary) FROM items AS ikob
WHERE ikob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00823 | train |
v2 | Schema:
transactions (alias: gev)(amount, type, salary, status)
regions(level, salary, code, status)
Task: Find amount from transactions where a matching record exists in regions with the same status.
SQL: | SELECT amount FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00824 | train |
v2 | Schema:
shipments (alias: vnob)(name, date, status, value)
customers(value, amount, id, salary)
Task: Retrieve name from shipments that have at least one corresponding entry in customers sharing the same type.
SQL: | SELECT name FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00825 | train |
v3 | Schema:
accounts (alias: jac)(id, type, name, amount)
items(value, salary, date, code)
Task: Retrieve salary from accounts with value above the SUM(salary) of items rows sharing the same level.
SQL: | SELECT salary FROM accounts AS jac
WHERE value > (
SELECT SUM(salary) FROM items AS ikob
WHERE ikob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00826 | train |
v3 | Schema:
tasks (alias: znob)(type, value, code, amount)
items(code, value, id, salary)
Task: Retrieve id from tasks with value above the AVG(salary) of items rows sharing the same level.
SQL: | SELECT id FROM tasks AS znob
WHERE value > (
SELECT AVG(salary) FROM items AS ikob
WHERE ikob.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "items",
"outer_alias": "znob",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00827 | train |
v1 | Schema:
tasks (alias: znob)(salary, type, level, name)
products(level, status, name, id)
Task: Find name from tasks where status appears in products entries with matching code.
SQL: | SELECT name FROM tasks AS znob
WHERE status IN (
SELECT status FROM products AS nad
WHERE nad.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00828 | train |
v3 | Schema:
products (alias: nad)(amount, date, value, type)
sales(value, level, type, code)
Task: Retrieve salary from products with amount above the SUM(value) of sales rows sharing the same status.
SQL: | SELECT salary FROM products AS nad
WHERE amount > (
SELECT SUM(value) FROM sales AS cif
WHERE cif.status = nad.status
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "nad",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00829 | train |
v2 | Schema:
departments (alias: dov)(code, level, date, type)
transactions(status, salary, id, level)
Task: Retrieve code from departments that have at least one corresponding entry in transactions sharing the same id.
SQL: | SELECT code FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00830 | train |
v1 | Schema:
sales (alias: cif)(type, code, salary, date)
managers(date, type, amount, status)
Task: Find value from sales where code appears in managers entries with matching status.
SQL: | SELECT value FROM sales AS cif
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00831 | train |
v3 | Schema:
categories (alias: egiv)(id, name, amount, salary)
accounts(level, type, value, status)
Task: Find salary from categories where salary exceeds the maximum salary from accounts for the same status.
SQL: | SELECT salary FROM categories AS egiv
WHERE salary > (
SELECT MAX(salary) FROM accounts AS jac
WHERE jac.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00832 | train |
v1 | Schema:
projects (alias: uliv)(value, status, date, code)
schedules(code, type, salary, value)
Task: Select value from projects where level exists in schedules for the same id.
SQL: | SELECT value FROM projects AS uliv
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "schedules",
"outer_alias": "uliv",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00833 | train |
v1 | Schema:
schedules (alias: vmob)(amount, level, status, code)
accounts(id, date, value, type)
Task: Find id from schedules where status appears in accounts entries with matching status.
SQL: | SELECT id FROM schedules AS vmob
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00834 | train |
v3 | Schema:
schedules (alias: vmob)(value, id, amount, code)
departments(status, date, value, amount)
Task: Retrieve amount from schedules with value above the SUM(salary) of departments rows sharing the same id.
SQL: | SELECT amount FROM schedules AS vmob
WHERE value > (
SELECT SUM(salary) FROM departments AS dov
WHERE dov.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "vmob",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00835 | train |
v2 | Schema:
accounts (alias: jac)(value, code, name, id)
employees(type, date, value, id)
Task: Retrieve id from accounts that have at least one corresponding entry in employees sharing the same level.
SQL: | SELECT id FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00836 | train |
v2 | Schema:
branches (alias: agov)(type, level, date, name)
customers(id, level, value, status)
Task: Find id from branches where a matching record exists in customers with the same level.
SQL: | SELECT id FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00837 | train |
v1 | Schema:
products (alias: nad)(code, amount, type, level)
schedules(value, salary, level, amount)
Task: Retrieve code from products whose type is found in schedules rows where code matches the outer record.
SQL: | SELECT code FROM products AS nad
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.code = nad.code
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "nad",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00838 | train |
v2 | Schema:
orders (alias: kab)(type, id, status, level)
regions(code, name, salary, amount)
Task: Find value from orders where a matching record exists in regions with the same level.
SQL: | SELECT value FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "regions",
"outer_alias": "kab",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00839 | train |
v3 | Schema:
managers (alias: hac)(name, date, amount, salary)
schedules(id, type, name, value)
Task: Retrieve amount from managers with value above the MIN(amount) of schedules rows sharing the same status.
SQL: | SELECT amount FROM managers AS hac
WHERE value > (
SELECT MIN(amount) FROM schedules AS vmob
WHERE vmob.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "schedules",
"outer_alias": "hac",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00840 | train |
v1 | Schema:
sales (alias: cif)(type, amount, value, code)
tasks(value, type, date, level)
Task: Retrieve value from sales whose code is found in tasks rows where type matches the outer record.
SQL: | SELECT value FROM sales AS cif
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "tasks",
"outer_alias": "cif",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00841 | train |
v2 | Schema:
customers (alias: lex)(status, salary, value, date)
shipments(amount, type, salary, value)
Task: Find value from customers where a matching record exists in shipments with the same code.
SQL: | SELECT value FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "shipments",
"outer_alias": "lex",
"inner_alias": "vnob",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00842 | train |
v3 | Schema:
accounts (alias: jac)(status, code, type, amount)
customers(level, code, id, name)
Task: Retrieve value from accounts with value above the SUM(value) of customers rows sharing the same level.
SQL: | SELECT value FROM accounts AS jac
WHERE value > (
SELECT SUM(value) FROM customers AS lex
WHERE lex.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00843 | train |
v3 | Schema:
requests (alias: ejof)(type, name, level, date)
shipments(level, date, status, value)
Task: Retrieve salary from requests with amount above the AVG(salary) of shipments rows sharing the same id.
SQL: | SELECT salary FROM requests AS ejof
WHERE amount > (
SELECT AVG(salary) FROM shipments AS vnob
WHERE vnob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "shipments",
"outer_alias": "ejof",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00844 | train |
v2 | Schema:
branches (alias: agov)(salary, type, value, status)
products(code, salary, amount, value)
Task: Find id from branches where a matching record exists in products with the same id.
SQL: | SELECT id FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00845 | train |
v2 | Schema:
departments (alias: dov)(status, id, date, type)
accounts(name, date, level, salary)
Task: Retrieve salary from departments that have at least one corresponding entry in accounts sharing the same code.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "accounts",
"outer_alias": "dov",
"inner_alias": "jac",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00846 | train |
v1 | Schema:
branches (alias: agov)(value, date, name, level)
requests(code, date, amount, status)
Task: Retrieve code from branches whose level is found in requests rows where type matches the outer record.
SQL: | SELECT code FROM branches AS agov
WHERE level IN (
SELECT level FROM requests AS ejof
WHERE ejof.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "agov",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00847 | train |
v2 | Schema:
requests (alias: ejof)(level, salary, amount, name)
orders(value, date, code, id)
Task: Retrieve amount from requests that have at least one corresponding entry in orders sharing the same level.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00848 | train |
v2 | Schema:
accounts (alias: jac)(date, amount, level, value)
managers(code, amount, salary, value)
Task: Retrieve code from accounts that have at least one corresponding entry in managers sharing the same status.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "managers",
"outer_alias": "jac",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00849 | train |
v2 | Schema:
categories (alias: egiv)(id, value, name, date)
departments(type, amount, value, name)
Task: Find id from categories where a matching record exists in departments with the same code.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "departments",
"outer_alias": "egiv",
"inner_alias": "dov",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00850 | train |
v1 | Schema:
items (alias: ikob)(type, code, value, level)
orders(value, id, level, code)
Task: Select id from items where id exists in orders for the same id.
SQL: | SELECT id FROM items AS ikob
WHERE id IN (
SELECT id FROM orders AS kab
WHERE kab.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00851 | train |
v2 | Schema:
tasks (alias: znob)(salary, code, level, id)
regions(amount, salary, id, status)
Task: Retrieve code from tasks that have at least one corresponding entry in regions sharing the same status.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "regions",
"outer_alias": "znob",
"inner_alias": "okiv",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00852 | train |
v2 | Schema:
tasks (alias: znob)(id, type, value, amount)
sales(amount, type, id, salary)
Task: Retrieve id from tasks that have at least one corresponding entry in sales sharing the same status.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00853 | train |
v2 | Schema:
staff (alias: xnob)(code, status, amount, id)
transactions(name, level, status, value)
Task: Retrieve amount from staff that have at least one corresponding entry in transactions sharing the same code.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "transactions",
"outer_alias": "xnob",
"inner_alias": "gev",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00854 | train |
v1 | Schema:
orders (alias: kab)(value, status, level, id)
transactions(type, code, level, name)
Task: Retrieve name from orders whose status is found in transactions rows where code matches the outer record.
SQL: | SELECT name FROM orders AS kab
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00855 | train |
v1 | Schema:
staff (alias: xnob)(status, name, code, type)
accounts(name, id, value, status)
Task: Select salary from staff where status exists in accounts for the same level.
SQL: | SELECT salary FROM staff AS xnob
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00856 | train |
v3 | Schema:
staff (alias: xnob)(status, level, name, value)
projects(amount, status, salary, date)
Task: Find amount from staff where amount exceeds the count of salary from projects for the same code.
SQL: | SELECT amount FROM staff AS xnob
WHERE amount > (
SELECT COUNT(salary) FROM projects AS uliv
WHERE uliv.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00857 | train |
v1 | Schema:
categories (alias: egiv)(type, date, code, name)
items(value, date, code, name)
Task: Select amount from categories where code exists in items for the same code.
SQL: | SELECT amount FROM categories AS egiv
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "items",
"outer_alias": "egiv",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00858 | train |
v1 | Schema:
departments (alias: dov)(status, value, salary, level)
projects(amount, salary, type, date)
Task: Find amount from departments where code appears in projects entries with matching code.
SQL: | SELECT amount FROM departments AS dov
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "projects",
"outer_alias": "dov",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00859 | train |
v2 | Schema:
employees (alias: bev)(id, name, code, value)
orders(type, value, salary, id)
Task: Retrieve name from employees that have at least one corresponding entry in orders sharing the same type.
SQL: | SELECT name FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00860 | train |
v1 | Schema:
employees (alias: bev)(amount, date, value, code)
departments(name, status, amount, date)
Task: Find name from employees where status appears in departments entries with matching status.
SQL: | SELECT name FROM employees AS bev
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00861 | train |
v1 | Schema:
tasks (alias: znob)(status, date, id, salary)
orders(salary, type, value, id)
Task: Find salary from tasks where level appears in orders entries with matching type.
SQL: | SELECT salary FROM tasks AS znob
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00862 | train |
v1 | Schema:
transactions (alias: gev)(type, status, amount, date)
items(status, id, level, name)
Task: Find name from transactions where level appears in items entries with matching code.
SQL: | SELECT name FROM transactions AS gev
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00863 | train |
v2 | Schema:
managers (alias: hac)(level, name, status, salary)
employees(code, level, date, id)
Task: Retrieve name from managers that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00864 | train |
v3 | Schema:
branches (alias: agov)(date, id, amount, name)
orders(level, salary, status, code)
Task: Find name from branches where value exceeds the total salary from orders for the same code.
SQL: | SELECT name FROM branches AS agov
WHERE value > (
SELECT SUM(salary) FROM orders AS kab
WHERE kab.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00865 | train |
v2 | Schema:
departments (alias: dov)(amount, name, value, id)
tasks(name, id, code, type)
Task: Retrieve id from departments that have at least one corresponding entry in tasks sharing the same status.
SQL: | SELECT id FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "tasks",
"outer_alias": "dov",
"inner_alias": "znob",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00866 | train |
v3 | Schema:
staff (alias: xnob)(salary, name, type, amount)
transactions(type, name, amount, value)
Task: Find amount from staff where salary exceeds the maximum salary from transactions for the same code.
SQL: | SELECT amount FROM staff AS xnob
WHERE salary > (
SELECT MAX(salary) FROM transactions AS gev
WHERE gev.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "transactions",
"outer_alias": "xnob",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00867 | train |
v1 | Schema:
accounts (alias: jac)(level, status, id, amount)
transactions(status, id, level, date)
Task: Select amount from accounts where type exists in transactions for the same status.
SQL: | SELECT amount FROM accounts AS jac
WHERE type IN (
SELECT type FROM transactions AS gev
WHERE gev.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00868 | train |
v3 | Schema:
requests (alias: ejof)(type, level, date, amount)
tasks(amount, value, id, code)
Task: Find id from requests where amount exceeds the total amount from tasks for the same level.
SQL: | SELECT id FROM requests AS ejof
WHERE amount > (
SELECT SUM(amount) FROM tasks AS znob
WHERE znob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00869 | train |
v2 | Schema:
items (alias: ikob)(date, amount, code, level)
invoices(type, id, code, name)
Task: Find value from items where a matching record exists in invoices with the same level.
SQL: | SELECT value FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "invoices",
"outer_alias": "ikob",
"inner_alias": "fal",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00870 | train |
v1 | Schema:
staff (alias: xnob)(name, salary, status, level)
customers(level, code, amount, salary)
Task: Find amount from staff where status appears in customers entries with matching status.
SQL: | SELECT amount FROM staff AS xnob
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00871 | train |
v1 | Schema:
items (alias: ikob)(date, code, name, amount)
invoices(amount, code, name, type)
Task: Select code from items where code exists in invoices for the same id.
SQL: | SELECT code FROM items AS ikob
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "invoices",
"outer_alias": "ikob",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00872 | train |
v3 | Schema:
managers (alias: hac)(id, amount, level, value)
tasks(status, code, level, salary)
Task: Find value from managers where amount exceeds the average salary from tasks for the same id.
SQL: | SELECT value FROM managers AS hac
WHERE amount > (
SELECT AVG(salary) FROM tasks AS znob
WHERE znob.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00873 | train |
v1 | Schema:
customers (alias: lex)(date, value, salary, amount)
managers(type, id, amount, salary)
Task: Find salary from customers where id appears in managers entries with matching status.
SQL: | SELECT salary FROM customers AS lex
WHERE id IN (
SELECT id FROM managers AS hac
WHERE hac.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00874 | train |
v2 | Schema:
transactions (alias: gev)(level, salary, code, date)
projects(code, amount, salary, id)
Task: Find code from transactions where a matching record exists in projects with the same type.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00875 | train |
v3 | Schema:
customers (alias: lex)(id, status, code, name)
shipments(id, date, status, amount)
Task: Find code from customers where salary exceeds the maximum amount from shipments for the same status.
SQL: | SELECT code FROM customers AS lex
WHERE salary > (
SELECT MAX(amount) FROM shipments AS vnob
WHERE vnob.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "shipments",
"outer_alias": "lex",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00876 | train |
v3 | Schema:
transactions (alias: gev)(salary, type, value, name)
requests(code, status, level, value)
Task: Find salary from transactions where value exceeds the minimum salary from requests for the same type.
SQL: | SELECT salary FROM transactions AS gev
WHERE value > (
SELECT MIN(salary) FROM requests AS ejof
WHERE ejof.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00877 | train |
v2 | Schema:
accounts (alias: jac)(level, id, value, salary)
tasks(salary, level, value, amount)
Task: Retrieve id from accounts that have at least one corresponding entry in tasks sharing the same id.
SQL: | SELECT id FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "tasks",
"outer_alias": "jac",
"inner_alias": "znob",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00878 | train |
v2 | Schema:
products (alias: nad)(salary, name, value, date)
branches(value, name, level, code)
Task: Find amount from products where a matching record exists in branches with the same status.
SQL: | SELECT amount FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = nad.status
); | {
"outer_table": "products",
"inner_table": "branches",
"outer_alias": "nad",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00879 | train |
v1 | Schema:
staff (alias: xnob)(amount, salary, status, date)
transactions(code, value, salary, name)
Task: Find code from staff where code appears in transactions entries with matching code.
SQL: | SELECT code FROM staff AS xnob
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "transactions",
"outer_alias": "xnob",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00880 | train |
v1 | Schema:
accounts (alias: jac)(date, code, value, name)
categories(salary, level, date, value)
Task: Find id from accounts where id appears in categories entries with matching type.
SQL: | SELECT id FROM accounts AS jac
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00881 | train |
v2 | Schema:
categories (alias: egiv)(level, salary, status, code)
tasks(date, salary, type, code)
Task: Retrieve code from categories that have at least one corresponding entry in tasks sharing the same level.
SQL: | SELECT code FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "tasks",
"outer_alias": "egiv",
"inner_alias": "znob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00882 | train |
v1 | Schema:
branches (alias: agov)(code, salary, name, id)
managers(level, value, date, amount)
Task: Select id from branches where code exists in managers for the same code.
SQL: | SELECT id FROM branches AS agov
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00883 | train |
v3 | Schema:
departments (alias: dov)(id, salary, level, type)
regions(name, status, amount, salary)
Task: Find name from departments where salary exceeds the minimum value from regions for the same code.
SQL: | SELECT name FROM departments AS dov
WHERE salary > (
SELECT MIN(value) FROM regions AS okiv
WHERE okiv.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "regions",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00884 | train |
v1 | Schema:
departments (alias: dov)(id, amount, level, salary)
sales(id, salary, code, amount)
Task: Select name from departments where status exists in sales for the same level.
SQL: | SELECT name FROM departments AS dov
WHERE status IN (
SELECT status FROM sales AS cif
WHERE cif.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00885 | train |
v1 | Schema:
sales (alias: cif)(level, status, value, amount)
transactions(value, type, salary, date)
Task: Select salary from sales where status exists in transactions for the same level.
SQL: | SELECT salary FROM sales AS cif
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00886 | train |
v3 | Schema:
tasks (alias: znob)(salary, id, code, status)
categories(salary, code, type, level)
Task: Retrieve id from tasks with amount above the SUM(salary) of categories rows sharing the same level.
SQL: | SELECT id FROM tasks AS znob
WHERE amount > (
SELECT SUM(salary) FROM categories AS egiv
WHERE egiv.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00887 | train |
v2 | Schema:
projects (alias: uliv)(level, id, type, name)
departments(salary, amount, date, value)
Task: Find value from projects where a matching record exists in departments with the same level.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00888 | train |
v3 | Schema:
employees (alias: bev)(id, amount, value, date)
items(status, type, name, value)
Task: Find salary from employees where amount exceeds the average salary from items for the same level.
SQL: | SELECT salary FROM employees AS bev
WHERE amount > (
SELECT AVG(salary) FROM items AS ikob
WHERE ikob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "items",
"outer_alias": "bev",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00889 | train |
v1 | Schema:
schedules (alias: vmob)(code, status, id, amount)
regions(name, amount, value, id)
Task: Select code from schedules where status exists in regions for the same level.
SQL: | SELECT code FROM schedules AS vmob
WHERE status IN (
SELECT status FROM regions AS okiv
WHERE okiv.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "regions",
"outer_alias": "vmob",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00890 | train |
v3 | Schema:
products (alias: nad)(value, status, code, date)
employees(id, type, salary, date)
Task: Find amount from products where salary exceeds the maximum amount from employees for the same type.
SQL: | SELECT amount FROM products AS nad
WHERE salary > (
SELECT MAX(amount) FROM employees AS bev
WHERE bev.type = nad.type
); | {
"outer_table": "products",
"inner_table": "employees",
"outer_alias": "nad",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00891 | train |
v2 | Schema:
orders (alias: kab)(amount, code, salary, status)
managers(level, amount, value, code)
Task: Find code from orders where a matching record exists in managers with the same type.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "kab",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00892 | train |
v3 | Schema:
transactions (alias: gev)(level, type, amount, code)
products(code, salary, date, status)
Task: Find name from transactions where value exceeds the total value from products for the same id.
SQL: | SELECT name FROM transactions AS gev
WHERE value > (
SELECT SUM(value) FROM products AS nad
WHERE nad.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "gev",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00893 | train |
v2 | Schema:
tasks (alias: znob)(id, amount, level, name)
schedules(value, level, name, id)
Task: Find name from tasks where a matching record exists in schedules with the same status.
SQL: | SELECT name FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "schedules",
"outer_alias": "znob",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00894 | train |
v1 | Schema:
sales (alias: cif)(salary, date, name, code)
customers(type, level, date, value)
Task: Retrieve amount from sales whose code is found in customers rows where status matches the outer record.
SQL: | SELECT amount FROM sales AS cif
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "cif",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00895 | train |
v1 | Schema:
items (alias: ikob)(salary, name, type, code)
shipments(salary, code, type, amount)
Task: Select value from items where code exists in shipments for the same status.
SQL: | SELECT value FROM items AS ikob
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00896 | train |
v2 | Schema:
products (alias: nad)(status, code, value, name)
requests(code, type, status, level)
Task: Retrieve id from products that have at least one corresponding entry in requests sharing the same type.
SQL: | SELECT id FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = nad.type
); | {
"outer_table": "products",
"inner_table": "requests",
"outer_alias": "nad",
"inner_alias": "ejof",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00897 | train |
v2 | Schema:
schedules (alias: vmob)(code, value, type, salary)
transactions(status, type, level, date)
Task: Find code from schedules where a matching record exists in transactions with the same id.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "transactions",
"outer_alias": "vmob",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00898 | train |
v1 | Schema:
sales (alias: cif)(amount, type, salary, code)
branches(salary, type, level, code)
Task: Retrieve name from sales whose type is found in branches rows where code matches the outer record.
SQL: | SELECT name FROM sales AS cif
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00899 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.