variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v2 | Schema:
managers (alias: hac)(value, status, name, salary)
sales(status, salary, id, name)
Task: Find name from managers where a matching record exists in sales with the same id.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08800 | train |
v2 | Schema:
branches (alias: agov)(status, name, id, code)
accounts(code, type, date, value)
Task: Find amount from branches where a matching record exists in accounts with the same status.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08801 | train |
v1 | Schema:
transactions (alias: gev)(name, salary, value, amount)
sales(id, type, code, salary)
Task: Select salary from transactions where level exists in sales for the same level.
SQL: | SELECT salary FROM transactions AS gev
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08802 | train |
v3 | Schema:
accounts (alias: jac)(status, salary, name, date)
sales(name, status, value, code)
Task: Retrieve name from accounts with salary above the MAX(amount) of sales rows sharing the same status.
SQL: | SELECT name FROM accounts AS jac
WHERE salary > (
SELECT MAX(amount) FROM sales AS cif
WHERE cif.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08803 | train |
v1 | Schema:
sales (alias: cif)(value, code, status, name)
branches(type, name, amount, date)
Task: Select value from sales where id exists in branches for the same level.
SQL: | SELECT value FROM sales AS cif
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08804 | train |
v2 | Schema:
orders (alias: kab)(amount, status, date, name)
sales(id, type, status, amount)
Task: Retrieve code from orders that have at least one corresponding entry in sales sharing the same level.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "sales",
"outer_alias": "kab",
"inner_alias": "cif",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08805 | train |
v2 | Schema:
departments (alias: dov)(level, status, amount, value)
projects(level, type, status, id)
Task: Find amount from departments where a matching record exists in projects with the same code.
SQL: | SELECT amount FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "projects",
"outer_alias": "dov",
"inner_alias": "uliv",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08806 | train |
v1 | Schema:
requests (alias: ejof)(code, value, salary, amount)
staff(status, salary, name, amount)
Task: Find amount from requests where type appears in staff entries with matching id.
SQL: | SELECT amount FROM requests AS ejof
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08807 | train |
v1 | Schema:
schedules (alias: vmob)(amount, status, name, value)
shipments(id, amount, name, salary)
Task: Retrieve name from schedules whose id is found in shipments rows where id matches the outer record.
SQL: | SELECT name FROM schedules AS vmob
WHERE id IN (
SELECT id FROM shipments AS vnob
WHERE vnob.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08808 | train |
v1 | Schema:
schedules (alias: vmob)(level, date, code, value)
managers(value, level, id, date)
Task: Find salary from schedules where code appears in managers entries with matching status.
SQL: | SELECT salary FROM schedules AS vmob
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08809 | train |
v3 | Schema:
orders (alias: kab)(name, value, id, status)
transactions(status, level, salary, amount)
Task: Find salary from orders where salary exceeds the minimum salary from transactions for the same id.
SQL: | SELECT salary FROM orders AS kab
WHERE salary > (
SELECT MIN(salary) FROM transactions AS gev
WHERE gev.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08810 | train |
v1 | Schema:
regions (alias: okiv)(date, salary, level, code)
products(type, level, code, id)
Task: Select name from regions where id exists in products for the same status.
SQL: | SELECT name FROM regions AS okiv
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08811 | train |
v1 | Schema:
shipments (alias: vnob)(date, salary, value, id)
transactions(value, type, date, name)
Task: Select value from shipments where level exists in transactions for the same type.
SQL: | SELECT value FROM shipments AS vnob
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08812 | train |
v2 | Schema:
requests (alias: ejof)(id, name, status, type)
accounts(name, status, salary, code)
Task: Retrieve code from requests that have at least one corresponding entry in accounts sharing the same status.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08813 | train |
v3 | Schema:
departments (alias: dov)(name, date, id, amount)
products(value, amount, code, salary)
Task: Retrieve code from departments with amount above the COUNT(salary) of products rows sharing the same level.
SQL: | SELECT code FROM departments AS dov
WHERE amount > (
SELECT COUNT(salary) FROM products AS nad
WHERE nad.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "products",
"outer_alias": "dov",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08814 | train |
v1 | Schema:
regions (alias: okiv)(type, value, date, name)
branches(status, name, value, salary)
Task: Select salary from regions where type exists in branches for the same status.
SQL: | SELECT salary FROM regions AS okiv
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "branches",
"outer_alias": "okiv",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08815 | train |
v3 | Schema:
items (alias: ikob)(code, value, amount, status)
staff(id, amount, code, type)
Task: Find id from items where salary exceeds the total amount from staff for the same status.
SQL: | SELECT id FROM items AS ikob
WHERE salary > (
SELECT SUM(amount) FROM staff AS xnob
WHERE xnob.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_08816 | train |
v1 | Schema:
managers (alias: hac)(salary, code, date, name)
tasks(salary, type, id, date)
Task: Find name from managers where level appears in tasks entries with matching code.
SQL: | SELECT name FROM managers AS hac
WHERE level IN (
SELECT level FROM tasks AS znob
WHERE znob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08817 | train |
v1 | Schema:
requests (alias: ejof)(code, id, amount, level)
employees(id, status, amount, salary)
Task: Select code from requests where level exists in employees for the same code.
SQL: | SELECT code FROM requests AS ejof
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08818 | train |
v1 | Schema:
requests (alias: ejof)(level, code, id, name)
managers(name, code, level, salary)
Task: Find salary from requests where status appears in managers entries with matching type.
SQL: | SELECT salary FROM requests AS ejof
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08819 | train |
v2 | Schema:
invoices (alias: fal)(status, salary, level, name)
sales(type, id, status, name)
Task: Find value from invoices where a matching record exists in sales with the same type.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "sales",
"outer_alias": "fal",
"inner_alias": "cif",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08820 | train |
v2 | Schema:
accounts (alias: jac)(level, date, amount, name)
invoices(salary, id, level, status)
Task: Find id from accounts where a matching record exists in invoices with the same level.
SQL: | SELECT id FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08821 | train |
v1 | Schema:
sales (alias: cif)(salary, code, type, value)
schedules(name, code, type, date)
Task: Find value from sales where status appears in schedules entries with matching code.
SQL: | SELECT value FROM sales AS cif
WHERE status IN (
SELECT status FROM schedules AS vmob
WHERE vmob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "schedules",
"outer_alias": "cif",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08822 | train |
v2 | Schema:
staff (alias: xnob)(id, level, type, code)
shipments(date, type, status, level)
Task: Retrieve id from staff that have at least one corresponding entry in shipments sharing the same code.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "xnob",
"inner_alias": "vnob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08823 | train |
v1 | Schema:
orders (alias: kab)(code, amount, date, status)
invoices(status, salary, date, code)
Task: Retrieve name from orders whose code is found in invoices rows where code matches the outer record.
SQL: | SELECT name FROM orders AS kab
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08824 | train |
v1 | Schema:
products (alias: nad)(status, code, name, value)
tasks(level, status, amount, type)
Task: Find name from products where id appears in tasks entries with matching type.
SQL: | SELECT name FROM products AS nad
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.type = nad.type
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "nad",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08825 | train |
v1 | Schema:
schedules (alias: vmob)(salary, status, type, id)
branches(level, salary, id, code)
Task: Find value from schedules where id appears in branches entries with matching id.
SQL: | SELECT value FROM schedules AS vmob
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "vmob",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08826 | train |
v3 | Schema:
sales (alias: cif)(code, salary, value, status)
items(id, code, level, amount)
Task: Find code from sales where salary exceeds the total value from items for the same code.
SQL: | SELECT code FROM sales AS cif
WHERE salary > (
SELECT SUM(value) FROM items AS ikob
WHERE ikob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08827 | train |
v1 | Schema:
branches (alias: agov)(name, status, amount, value)
tasks(amount, salary, code, type)
Task: Find id from branches where code appears in tasks entries with matching status.
SQL: | SELECT id FROM branches AS agov
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "tasks",
"outer_alias": "agov",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08828 | train |
v2 | Schema:
shipments (alias: vnob)(amount, status, salary, value)
projects(status, amount, value, code)
Task: Find id from shipments where a matching record exists in projects with the same status.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "projects",
"outer_alias": "vnob",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08829 | train |
v1 | Schema:
projects (alias: uliv)(status, value, date, id)
accounts(status, level, code, salary)
Task: Select id from projects where id exists in accounts for the same code.
SQL: | SELECT id FROM projects AS uliv
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "accounts",
"outer_alias": "uliv",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08830 | train |
v1 | Schema:
items (alias: ikob)(value, type, date, id)
shipments(code, id, date, amount)
Task: Retrieve value from items whose id is found in shipments rows where id matches the outer record.
SQL: | SELECT value FROM items AS ikob
WHERE id IN (
SELECT id FROM shipments AS vnob
WHERE vnob.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_08831 | train |
v3 | Schema:
departments (alias: dov)(date, id, amount, name)
schedules(id, type, status, name)
Task: Find code from departments where amount exceeds the total value from schedules for the same code.
SQL: | SELECT code FROM departments AS dov
WHERE amount > (
SELECT SUM(value) FROM schedules AS vmob
WHERE vmob.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "schedules",
"outer_alias": "dov",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08832 | train |
v1 | Schema:
employees (alias: bev)(value, amount, name, level)
departments(type, value, name, status)
Task: Select id from employees where status exists in departments for the same status.
SQL: | SELECT id 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": "id",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08833 | train |
v3 | Schema:
customers (alias: lex)(code, amount, level, name)
managers(status, name, level, value)
Task: Retrieve salary from customers with value above the COUNT(amount) of managers rows sharing the same level.
SQL: | SELECT salary FROM customers AS lex
WHERE value > (
SELECT COUNT(amount) FROM managers AS hac
WHERE hac.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08834 | train |
v1 | Schema:
accounts (alias: jac)(level, id, value, salary)
shipments(status, amount, value, level)
Task: Retrieve code from accounts whose status is found in shipments rows where status matches the outer record.
SQL: | SELECT code FROM accounts AS jac
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "shipments",
"outer_alias": "jac",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08835 | train |
v1 | Schema:
regions (alias: okiv)(name, date, salary, level)
shipments(status, value, code, id)
Task: Select amount from regions where status exists in shipments for the same id.
SQL: | SELECT amount FROM regions AS okiv
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "shipments",
"outer_alias": "okiv",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08836 | train |
v3 | Schema:
requests (alias: ejof)(type, status, value, date)
managers(value, name, amount, code)
Task: Find value from requests where salary exceeds the maximum salary from managers for the same type.
SQL: | SELECT value FROM requests AS ejof
WHERE salary > (
SELECT MAX(salary) FROM managers AS hac
WHERE hac.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08837 | train |
v1 | Schema:
sales (alias: cif)(level, amount, salary, name)
departments(type, value, amount, name)
Task: Select code from sales where code exists in departments for the same id.
SQL: | SELECT code FROM sales AS cif
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "departments",
"outer_alias": "cif",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08838 | train |
v1 | Schema:
items (alias: ikob)(level, value, amount, type)
requests(date, id, amount, level)
Task: Select code from items where type exists in requests for the same type.
SQL: | SELECT code FROM items AS ikob
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "ikob",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_08839 | train |
v3 | Schema:
transactions (alias: gev)(level, status, type, value)
projects(type, status, salary, name)
Task: Retrieve amount from transactions with salary above the SUM(amount) of projects rows sharing the same level.
SQL: | SELECT amount FROM transactions AS gev
WHERE salary > (
SELECT SUM(amount) FROM projects AS uliv
WHERE uliv.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08840 | train |
v3 | Schema:
invoices (alias: fal)(value, amount, id, status)
schedules(id, status, date, amount)
Task: Retrieve name from invoices with amount above the SUM(value) of schedules rows sharing the same level.
SQL: | SELECT name FROM invoices AS fal
WHERE amount > (
SELECT SUM(value) FROM schedules AS vmob
WHERE vmob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08841 | train |
v3 | Schema:
branches (alias: agov)(salary, code, status, value)
categories(status, salary, code, date)
Task: Find id from branches where amount exceeds the average value from categories for the same type.
SQL: | SELECT id FROM branches AS agov
WHERE amount > (
SELECT AVG(value) FROM categories AS egiv
WHERE egiv.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08842 | train |
v3 | Schema:
transactions (alias: gev)(name, type, amount, status)
invoices(amount, status, salary, date)
Task: Retrieve amount from transactions with amount above the MIN(value) of invoices rows sharing the same id.
SQL: | SELECT amount FROM transactions AS gev
WHERE amount > (
SELECT MIN(value) FROM invoices AS fal
WHERE fal.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "gev",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08843 | train |
v3 | Schema:
regions (alias: okiv)(type, name, salary, date)
branches(name, type, date, status)
Task: Find code from regions where salary exceeds the maximum salary from branches for the same id.
SQL: | SELECT code FROM regions AS okiv
WHERE salary > (
SELECT MAX(salary) FROM branches AS agov
WHERE agov.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "branches",
"outer_alias": "okiv",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08844 | train |
v1 | Schema:
sales (alias: cif)(salary, value, status, type)
customers(value, name, date, status)
Task: Retrieve id from sales whose id is found in customers rows where id matches the outer record.
SQL: | SELECT id FROM sales AS cif
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "cif",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08845 | train |
v2 | Schema:
invoices (alias: fal)(id, salary, value, amount)
tasks(name, value, code, level)
Task: Retrieve amount from invoices that have at least one corresponding entry in tasks sharing the same id.
SQL: | SELECT amount FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "tasks",
"outer_alias": "fal",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08846 | train |
v1 | Schema:
shipments (alias: vnob)(id, date, name, salary)
transactions(status, name, amount, date)
Task: Retrieve id from shipments whose type is found in transactions rows where level matches the outer record.
SQL: | SELECT id FROM shipments AS vnob
WHERE type IN (
SELECT type FROM transactions AS gev
WHERE gev.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08847 | train |
v1 | Schema:
branches (alias: agov)(value, code, status, type)
orders(name, salary, level, type)
Task: Select name from branches where type exists in orders for the same type.
SQL: | SELECT name FROM branches AS agov
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08848 | train |
v2 | Schema:
customers (alias: lex)(status, type, name, level)
accounts(value, id, date, amount)
Task: Find name from customers where a matching record exists in accounts with the same code.
SQL: | SELECT name FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08849 | train |
v1 | Schema:
regions (alias: okiv)(name, id, level, salary)
products(name, amount, date, id)
Task: Retrieve id from regions whose code is found in products rows where type matches the outer record.
SQL: | SELECT id FROM regions AS okiv
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08850 | train |
v1 | Schema:
invoices (alias: fal)(level, type, code, date)
categories(value, type, id, code)
Task: Select name from invoices where level exists in categories for the same level.
SQL: | SELECT name FROM invoices AS fal
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08851 | train |
v2 | Schema:
staff (alias: xnob)(id, amount, code, level)
tasks(amount, id, name, date)
Task: Retrieve salary from staff that have at least one corresponding entry in tasks sharing the same type.
SQL: | SELECT salary FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08852 | train |
v2 | Schema:
shipments (alias: vnob)(status, code, date, salary)
invoices(salary, amount, value, status)
Task: Retrieve salary from shipments that have at least one corresponding entry in invoices sharing the same status.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "invoices",
"outer_alias": "vnob",
"inner_alias": "fal",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08853 | train |
v2 | Schema:
sales (alias: cif)(type, amount, id, date)
regions(name, id, level, date)
Task: Retrieve amount from sales that have at least one corresponding entry in regions sharing the same status.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08854 | train |
v1 | Schema:
categories (alias: egiv)(level, type, salary, code)
accounts(id, date, code, salary)
Task: Retrieve value from categories whose type is found in accounts rows where code matches the outer record.
SQL: | SELECT value FROM categories AS egiv
WHERE type IN (
SELECT type FROM accounts AS jac
WHERE jac.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08855 | train |
v2 | Schema:
branches (alias: agov)(level, id, status, amount)
shipments(value, amount, type, date)
Task: Retrieve name from branches that have at least one corresponding entry in shipments sharing the same id.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08856 | train |
v2 | Schema:
managers (alias: hac)(type, status, code, level)
sales(code, value, type, level)
Task: Retrieve amount from managers that have at least one corresponding entry in sales sharing the same id.
SQL: | SELECT amount FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08857 | train |
v3 | Schema:
sales (alias: cif)(salary, date, code, status)
categories(id, name, code, value)
Task: Find salary from sales where salary exceeds the count of amount from categories for the same code.
SQL: | SELECT salary FROM sales AS cif
WHERE salary > (
SELECT COUNT(amount) FROM categories AS egiv
WHERE egiv.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08858 | train |
v1 | Schema:
customers (alias: lex)(code, status, type, amount)
regions(status, date, value, amount)
Task: Retrieve name from customers whose level is found in regions rows where code matches the outer record.
SQL: | SELECT name FROM customers AS lex
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "regions",
"outer_alias": "lex",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08859 | train |
v1 | Schema:
regions (alias: okiv)(level, amount, value, id)
employees(amount, code, level, date)
Task: Retrieve amount from regions whose id is found in employees rows where code matches the outer record.
SQL: | SELECT amount FROM regions AS okiv
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "okiv",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08860 | train |
v2 | Schema:
accounts (alias: jac)(id, date, value, amount)
schedules(code, name, type, date)
Task: Retrieve name from accounts that have at least one corresponding entry in schedules sharing the same type.
SQL: | SELECT name FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08861 | train |
v1 | Schema:
products (alias: nad)(id, salary, value, name)
tasks(status, name, id, level)
Task: Select id from products where id exists in tasks for the same level.
SQL: | SELECT id FROM products AS nad
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.level = nad.level
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "nad",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08862 | train |
v1 | Schema:
regions (alias: okiv)(amount, status, code, value)
managers(value, code, id, salary)
Task: Find id from regions where level appears in managers entries with matching id.
SQL: | SELECT id FROM regions AS okiv
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "managers",
"outer_alias": "okiv",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08863 | train |
v2 | Schema:
categories (alias: egiv)(type, name, level, status)
departments(amount, type, status, id)
Task: Retrieve amount from categories that have at least one corresponding entry in departments sharing the same type.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "departments",
"outer_alias": "egiv",
"inner_alias": "dov",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08864 | train |
v2 | Schema:
invoices (alias: fal)(status, code, name, date)
employees(level, amount, salary, id)
Task: Retrieve name from invoices that have at least one corresponding entry in employees sharing the same level.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08865 | train |
v2 | Schema:
accounts (alias: jac)(code, type, amount, name)
items(type, level, id, date)
Task: Retrieve salary from accounts that have at least one corresponding entry in items sharing the same id.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08866 | train |
v3 | Schema:
accounts (alias: jac)(date, code, level, type)
categories(amount, value, code, salary)
Task: Find value from accounts where salary exceeds the minimum salary from categories for the same status.
SQL: | SELECT value FROM accounts AS jac
WHERE salary > (
SELECT MIN(salary) FROM categories AS egiv
WHERE egiv.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08867 | train |
v3 | Schema:
items (alias: ikob)(salary, id, amount, date)
employees(status, name, code, id)
Task: Find id from items where value exceeds the minimum value from employees for the same type.
SQL: | SELECT id FROM items AS ikob
WHERE value > (
SELECT MIN(value) FROM employees AS bev
WHERE bev.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "ikob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_08868 | train |
v1 | Schema:
projects (alias: uliv)(status, date, level, id)
requests(value, name, type, salary)
Task: Find name from projects where code appears in requests entries with matching id.
SQL: | SELECT name FROM projects AS uliv
WHERE code IN (
SELECT code FROM requests AS ejof
WHERE ejof.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "requests",
"outer_alias": "uliv",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08869 | train |
v3 | Schema:
tasks (alias: znob)(amount, id, salary, level)
categories(code, value, amount, type)
Task: Retrieve amount from tasks with salary above the AVG(value) of categories rows sharing the same level.
SQL: | SELECT amount FROM tasks AS znob
WHERE salary > (
SELECT AVG(value) FROM categories AS egiv
WHERE egiv.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08870 | train |
v2 | Schema:
employees (alias: bev)(type, salary, level, id)
departments(id, code, amount, type)
Task: Retrieve salary from employees that have at least one corresponding entry in departments sharing the same level.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08871 | train |
v2 | Schema:
employees (alias: bev)(name, type, date, status)
customers(code, id, status, value)
Task: Find salary from employees where a matching record exists in customers with the same id.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08872 | train |
v2 | Schema:
managers (alias: hac)(name, status, level, code)
projects(salary, date, name, id)
Task: Find salary from managers where a matching record exists in projects with the same id.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "projects",
"outer_alias": "hac",
"inner_alias": "uliv",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08873 | train |
v1 | Schema:
regions (alias: okiv)(amount, salary, id, type)
tasks(salary, value, amount, name)
Task: Retrieve id from regions whose level is found in tasks rows where id matches the outer record.
SQL: | SELECT id FROM regions AS okiv
WHERE level IN (
SELECT level FROM tasks AS znob
WHERE znob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08874 | train |
v1 | Schema:
shipments (alias: vnob)(code, amount, status, id)
projects(date, amount, salary, name)
Task: Find amount from shipments where id appears in projects entries with matching level.
SQL: | SELECT amount FROM shipments AS vnob
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "projects",
"outer_alias": "vnob",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08875 | train |
v3 | Schema:
accounts (alias: jac)(type, value, salary, id)
items(id, status, date, salary)
Task: Retrieve id from accounts with value above the AVG(amount) of items rows sharing the same status.
SQL: | SELECT id FROM accounts AS jac
WHERE value > (
SELECT AVG(amount) FROM items AS ikob
WHERE ikob.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08876 | train |
v3 | Schema:
products (alias: nad)(value, salary, status, id)
branches(status, id, code, amount)
Task: Retrieve id from products with salary above the MAX(value) of branches rows sharing the same type.
SQL: | SELECT id FROM products AS nad
WHERE salary > (
SELECT MAX(value) FROM branches AS agov
WHERE agov.type = nad.type
); | {
"outer_table": "products",
"inner_table": "branches",
"outer_alias": "nad",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08877 | train |
v1 | Schema:
orders (alias: kab)(type, amount, level, salary)
invoices(id, level, amount, type)
Task: Select name from orders where level exists in invoices for the same status.
SQL: | SELECT name FROM orders AS kab
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08878 | train |
v3 | Schema:
invoices (alias: fal)(value, date, id, name)
accounts(type, level, date, id)
Task: Retrieve amount from invoices with value above the COUNT(amount) of accounts rows sharing the same status.
SQL: | SELECT amount FROM invoices AS fal
WHERE value > (
SELECT COUNT(amount) FROM accounts AS jac
WHERE jac.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08879 | train |
v2 | Schema:
products (alias: nad)(amount, status, level, id)
managers(date, salary, type, value)
Task: Find value from products where a matching record exists in managers with the same id.
SQL: | SELECT value FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = nad.id
); | {
"outer_table": "products",
"inner_table": "managers",
"outer_alias": "nad",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08880 | train |
v1 | Schema:
accounts (alias: jac)(value, amount, date, type)
shipments(status, amount, type, salary)
Task: Find id from accounts where status appears in shipments entries with matching id.
SQL: | SELECT id FROM accounts AS jac
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "shipments",
"outer_alias": "jac",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08881 | train |
v2 | Schema:
customers (alias: lex)(salary, date, code, level)
shipments(name, type, date, value)
Task: Find amount from customers where a matching record exists in shipments with the same type.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "shipments",
"outer_alias": "lex",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08882 | train |
v2 | Schema:
projects (alias: uliv)(amount, value, salary, level)
staff(amount, id, date, level)
Task: Retrieve id from projects that have at least one corresponding entry in staff sharing the same code.
SQL: | SELECT id FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08883 | train |
v2 | Schema:
branches (alias: agov)(code, status, type, value)
employees(level, date, id, code)
Task: Find salary from branches where a matching record exists in employees with the same status.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "employees",
"outer_alias": "agov",
"inner_alias": "bev",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08884 | train |
v1 | Schema:
departments (alias: dov)(status, salary, id, amount)
invoices(name, level, code, amount)
Task: Find salary from departments where code appears in invoices entries with matching id.
SQL: | SELECT salary FROM departments AS dov
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08885 | train |
v2 | Schema:
requests (alias: ejof)(level, id, name, value)
customers(name, type, level, date)
Task: Retrieve code from requests that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "customers",
"outer_alias": "ejof",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08886 | train |
v3 | Schema:
items (alias: ikob)(salary, code, status, type)
products(date, value, code, name)
Task: Retrieve name from items with amount above the MAX(amount) of products rows sharing the same code.
SQL: | SELECT name FROM items AS ikob
WHERE amount > (
SELECT MAX(amount) FROM products AS nad
WHERE nad.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_08887 | train |
v2 | Schema:
employees (alias: bev)(value, salary, id, type)
transactions(amount, type, level, value)
Task: Retrieve value from employees that have at least one corresponding entry in transactions sharing the same status.
SQL: | SELECT value FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "transactions",
"outer_alias": "bev",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08888 | train |
v3 | Schema:
orders (alias: kab)(level, status, type, code)
projects(type, date, value, id)
Task: Retrieve value from orders with amount above the MIN(amount) of projects rows sharing the same level.
SQL: | SELECT value FROM orders AS kab
WHERE amount > (
SELECT MIN(amount) FROM projects AS uliv
WHERE uliv.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "projects",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08889 | train |
v3 | Schema:
categories (alias: egiv)(amount, code, level, value)
sales(level, date, amount, name)
Task: Find amount from categories where amount exceeds the total salary from sales for the same id.
SQL: | SELECT amount FROM categories AS egiv
WHERE amount > (
SELECT SUM(salary) FROM sales AS cif
WHERE cif.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "sales",
"outer_alias": "egiv",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08890 | train |
v3 | Schema:
categories (alias: egiv)(name, id, status, amount)
tasks(level, name, status, salary)
Task: Retrieve code from categories with value above the AVG(amount) of tasks rows sharing the same code.
SQL: | SELECT code FROM categories AS egiv
WHERE value > (
SELECT AVG(amount) FROM tasks AS znob
WHERE znob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "tasks",
"outer_alias": "egiv",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08891 | train |
v1 | Schema:
orders (alias: kab)(salary, value, type, amount)
tasks(code, value, name, level)
Task: Retrieve salary from orders whose type is found in tasks rows where status matches the outer record.
SQL: | SELECT salary FROM orders AS kab
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "tasks",
"outer_alias": "kab",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08892 | train |
v1 | Schema:
branches (alias: agov)(code, name, date, type)
schedules(level, date, type, salary)
Task: Retrieve code from branches whose type is found in schedules rows where id matches the outer record.
SQL: | SELECT code FROM branches AS agov
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "schedules",
"outer_alias": "agov",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08893 | train |
v1 | Schema:
invoices (alias: fal)(level, value, id, amount)
employees(id, value, salary, type)
Task: Retrieve salary from invoices whose level is found in employees rows where status matches the outer record.
SQL: | SELECT salary FROM invoices AS fal
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08894 | train |
v1 | Schema:
tasks (alias: znob)(value, amount, status, id)
orders(amount, id, date, value)
Task: Retrieve amount from tasks whose level is found in orders rows where id matches the outer record.
SQL: | SELECT amount FROM tasks AS znob
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08895 | train |
v2 | Schema:
sales (alias: cif)(type, value, name, amount)
orders(value, name, salary, type)
Task: Find amount from sales where a matching record exists in orders with the same level.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "orders",
"outer_alias": "cif",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08896 | train |
v3 | Schema:
managers (alias: hac)(status, value, name, code)
schedules(status, value, salary, name)
Task: Find amount from managers where value exceeds the total amount from schedules for the same level.
SQL: | SELECT amount FROM managers AS hac
WHERE value > (
SELECT SUM(amount) FROM schedules AS vmob
WHERE vmob.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "schedules",
"outer_alias": "hac",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08897 | train |
v3 | Schema:
orders (alias: kab)(value, status, code, amount)
employees(level, salary, code, name)
Task: Find id from orders where salary exceeds the minimum salary from employees for the same id.
SQL: | SELECT id FROM orders AS kab
WHERE salary > (
SELECT MIN(salary) FROM employees AS bev
WHERE bev.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "employees",
"outer_alias": "kab",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08898 | train |
v3 | Schema:
orders (alias: kab)(value, id, amount, code)
projects(code, status, value, date)
Task: Retrieve amount from orders with value above the AVG(salary) of projects rows sharing the same id.
SQL: | SELECT amount FROM orders AS kab
WHERE value > (
SELECT AVG(salary) FROM projects AS uliv
WHERE uliv.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "projects",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08899 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.