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:
requests (alias: ejof)(type, code, name, value)
products(value, amount, status, date)
Task: Find salary from requests where salary exceeds the maximum amount from products for the same code.
SQL: | SELECT salary FROM requests AS ejof
WHERE salary > (
SELECT MAX(amount) FROM products AS nad
WHERE nad.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ejof",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05700 | train |
v1 | Schema:
projects (alias: uliv)(salary, amount, status, type)
employees(id, date, type, level)
Task: Select value from projects where level exists in employees for the same level.
SQL: | SELECT value FROM projects AS uliv
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "employees",
"outer_alias": "uliv",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05701 | train |
v2 | Schema:
categories (alias: egiv)(value, status, code, amount)
requests(id, status, date, value)
Task: Find salary from categories where a matching record exists in requests with the same code.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05702 | train |
v2 | Schema:
invoices (alias: fal)(value, salary, status, name)
tasks(salary, name, level, amount)
Task: Retrieve name from invoices that have at least one corresponding entry in tasks sharing the same code.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "tasks",
"outer_alias": "fal",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05703 | train |
v2 | Schema:
regions (alias: okiv)(level, salary, status, amount)
schedules(salary, name, amount, id)
Task: Find id from regions where a matching record exists in schedules with the same code.
SQL: | SELECT id FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "schedules",
"outer_alias": "okiv",
"inner_alias": "vmob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05704 | train |
v2 | Schema:
tasks (alias: znob)(date, salary, amount, level)
employees(type, name, salary, code)
Task: Find id from tasks where a matching record exists in employees with the same type.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05705 | train |
v3 | Schema:
branches (alias: agov)(id, value, type, level)
invoices(status, id, level, date)
Task: Find salary from branches where salary exceeds the average salary from invoices for the same level.
SQL: | SELECT salary FROM branches AS agov
WHERE salary > (
SELECT AVG(salary) FROM invoices AS fal
WHERE fal.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "invoices",
"outer_alias": "agov",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05706 | train |
v3 | Schema:
branches (alias: agov)(date, name, amount, level)
requests(id, name, level, status)
Task: Retrieve id from branches with salary above the SUM(salary) of requests rows sharing the same type.
SQL: | SELECT id FROM branches AS agov
WHERE salary > (
SELECT SUM(salary) FROM requests AS ejof
WHERE ejof.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "agov",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05707 | train |
v1 | Schema:
branches (alias: agov)(status, name, amount, level)
categories(date, level, amount, status)
Task: Retrieve amount from branches whose type is found in categories rows where type matches the outer record.
SQL: | SELECT amount FROM branches AS agov
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05708 | train |
v3 | Schema:
transactions (alias: gev)(salary, code, status, value)
orders(amount, level, name, type)
Task: Find name from transactions where value exceeds the average value from orders for the same level.
SQL: | SELECT name FROM transactions AS gev
WHERE value > (
SELECT AVG(value) FROM orders AS kab
WHERE kab.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05709 | train |
v3 | Schema:
items (alias: ikob)(date, code, id, type)
branches(amount, type, id, status)
Task: Retrieve id from items with value above the AVG(amount) of branches rows sharing the same type.
SQL: | SELECT id FROM items AS ikob
WHERE value > (
SELECT AVG(amount) FROM branches AS agov
WHERE agov.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "ikob",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05710 | train |
v3 | Schema:
managers (alias: hac)(value, amount, code, date)
departments(id, level, amount, type)
Task: Retrieve code from managers with salary above the COUNT(amount) of departments rows sharing the same id.
SQL: | SELECT code FROM managers AS hac
WHERE salary > (
SELECT COUNT(amount) FROM departments AS dov
WHERE dov.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "departments",
"outer_alias": "hac",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05711 | train |
v1 | Schema:
projects (alias: uliv)(name, code, date, id)
orders(level, name, status, amount)
Task: Find name from projects where level appears in orders entries with matching code.
SQL: | SELECT name FROM projects AS uliv
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "orders",
"outer_alias": "uliv",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05712 | train |
v3 | Schema:
transactions (alias: gev)(level, value, name, code)
schedules(amount, name, status, salary)
Task: Find amount from transactions where salary exceeds the minimum amount from schedules for the same code.
SQL: | SELECT amount FROM transactions AS gev
WHERE salary > (
SELECT MIN(amount) FROM schedules AS vmob
WHERE vmob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05713 | train |
v2 | Schema:
sales (alias: cif)(salary, status, level, value)
requests(code, date, status, type)
Task: Retrieve amount from sales that have at least one corresponding entry in requests sharing the same level.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05714 | train |
v2 | Schema:
requests (alias: ejof)(level, value, id, type)
tasks(type, amount, code, salary)
Task: Find name from requests where a matching record exists in tasks with the same type.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05715 | train |
v3 | Schema:
projects (alias: uliv)(amount, code, status, date)
sales(status, name, code, amount)
Task: Retrieve name from projects with amount above the SUM(salary) of sales rows sharing the same type.
SQL: | SELECT name FROM projects AS uliv
WHERE amount > (
SELECT SUM(salary) FROM sales AS cif
WHERE cif.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05716 | train |
v1 | Schema:
shipments (alias: vnob)(code, salary, name, value)
regions(amount, code, id, name)
Task: Select amount from shipments where type exists in regions for the same code.
SQL: | SELECT amount FROM shipments AS vnob
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05717 | train |
v2 | Schema:
projects (alias: uliv)(code, value, amount, type)
products(date, code, name, status)
Task: Retrieve salary from projects that have at least one corresponding entry in products sharing the same code.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "products",
"outer_alias": "uliv",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05718 | train |
v2 | Schema:
schedules (alias: vmob)(code, level, amount, value)
departments(value, date, level, code)
Task: Find value from schedules where a matching record exists in departments with the same type.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "vmob",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05719 | train |
v2 | Schema:
invoices (alias: fal)(type, salary, code, name)
departments(id, type, level, date)
Task: Find value from invoices where a matching record exists in departments with the same status.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "departments",
"outer_alias": "fal",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05720 | train |
v1 | Schema:
tasks (alias: znob)(level, date, status, id)
regions(code, type, value, date)
Task: Find id from tasks where level appears in regions entries with matching type.
SQL: | SELECT id FROM tasks AS znob
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "regions",
"outer_alias": "znob",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05721 | train |
v2 | Schema:
items (alias: ikob)(level, type, date, amount)
managers(name, code, salary, level)
Task: Find name from items where a matching record exists in managers with the same type.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "managers",
"outer_alias": "ikob",
"inner_alias": "hac",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05722 | train |
v2 | Schema:
requests (alias: ejof)(code, level, id, name)
managers(level, value, amount, date)
Task: Find amount from requests where a matching record exists in managers with the same code.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05723 | train |
v2 | Schema:
staff (alias: xnob)(code, id, name, amount)
invoices(id, salary, type, date)
Task: Find amount from staff where a matching record exists in invoices with the same status.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "invoices",
"outer_alias": "xnob",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05724 | train |
v1 | Schema:
departments (alias: dov)(level, value, type, name)
shipments(code, value, name, type)
Task: Select amount from departments where code exists in shipments for the same level.
SQL: | SELECT amount FROM departments AS dov
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "shipments",
"outer_alias": "dov",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05725 | train |
v3 | Schema:
accounts (alias: jac)(level, status, code, type)
items(value, level, id, amount)
Task: Find amount from accounts where value exceeds the count of salary from items for the same status.
SQL: | SELECT amount FROM accounts AS jac
WHERE value > (
SELECT COUNT(salary) FROM items AS ikob
WHERE ikob.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05726 | train |
v2 | Schema:
orders (alias: kab)(id, level, amount, status)
items(status, type, level, id)
Task: Retrieve id from orders that have at least one corresponding entry in items sharing the same id.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "items",
"outer_alias": "kab",
"inner_alias": "ikob",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05727 | train |
v1 | Schema:
orders (alias: kab)(status, level, salary, value)
sales(value, amount, id, type)
Task: Select salary from orders where type exists in sales for the same code.
SQL: | SELECT salary FROM orders AS kab
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "sales",
"outer_alias": "kab",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05728 | train |
v1 | Schema:
requests (alias: ejof)(value, id, code, amount)
products(type, status, value, level)
Task: Find name from requests where code appears in products entries with matching id.
SQL: | SELECT name FROM requests AS ejof
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ejof",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05729 | train |
v1 | Schema:
orders (alias: kab)(amount, type, level, name)
branches(id, level, date, salary)
Task: Retrieve value from orders whose code is found in branches rows where type matches the outer record.
SQL: | SELECT value FROM orders AS kab
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05730 | train |
v3 | Schema:
employees (alias: bev)(id, amount, level, salary)
sales(code, date, type, amount)
Task: Find id from employees where value exceeds the minimum salary from sales for the same level.
SQL: | SELECT id FROM employees AS bev
WHERE value > (
SELECT MIN(salary) FROM sales AS cif
WHERE cif.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "sales",
"outer_alias": "bev",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05731 | train |
v3 | Schema:
transactions (alias: gev)(level, salary, status, value)
sales(code, value, salary, name)
Task: Find amount from transactions where salary exceeds the minimum salary from sales for the same type.
SQL: | SELECT amount FROM transactions AS gev
WHERE salary > (
SELECT MIN(salary) FROM sales AS cif
WHERE cif.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05732 | train |
v3 | Schema:
invoices (alias: fal)(salary, value, type, status)
accounts(name, salary, id, amount)
Task: Retrieve amount from invoices with value above the COUNT(salary) of accounts rows sharing the same id.
SQL: | SELECT amount FROM invoices AS fal
WHERE value > (
SELECT COUNT(salary) FROM accounts AS jac
WHERE jac.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05733 | train |
v3 | Schema:
sales (alias: cif)(status, name, amount, id)
invoices(type, id, salary, name)
Task: Find id from sales where salary exceeds the average salary from invoices for the same status.
SQL: | SELECT id FROM sales AS cif
WHERE salary > (
SELECT AVG(salary) FROM invoices AS fal
WHERE fal.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05734 | train |
v3 | Schema:
requests (alias: ejof)(date, status, code, id)
shipments(code, name, value, salary)
Task: Find name from requests where salary exceeds the count of amount from shipments for the same level.
SQL: | SELECT name FROM requests AS ejof
WHERE salary > (
SELECT COUNT(amount) FROM shipments AS vnob
WHERE vnob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "shipments",
"outer_alias": "ejof",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05735 | train |
v2 | Schema:
staff (alias: xnob)(value, type, code, date)
sales(date, name, status, salary)
Task: Retrieve name from staff that have at least one corresponding entry in sales sharing the same id.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "sales",
"outer_alias": "xnob",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05736 | train |
v3 | Schema:
employees (alias: bev)(value, level, type, amount)
projects(level, date, amount, code)
Task: Retrieve code from employees with value above the SUM(amount) of projects rows sharing the same level.
SQL: | SELECT code FROM employees AS bev
WHERE value > (
SELECT SUM(amount) FROM projects AS uliv
WHERE uliv.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05737 | train |
v3 | Schema:
products (alias: nad)(value, type, name, id)
shipments(level, type, code, date)
Task: Retrieve code from products with value above the COUNT(amount) of shipments rows sharing the same type.
SQL: | SELECT code FROM products AS nad
WHERE value > (
SELECT COUNT(amount) FROM shipments AS vnob
WHERE vnob.type = nad.type
); | {
"outer_table": "products",
"inner_table": "shipments",
"outer_alias": "nad",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05738 | train |
v2 | Schema:
projects (alias: uliv)(salary, id, status, code)
schedules(name, code, value, amount)
Task: Find code from projects where a matching record exists in schedules with the same level.
SQL: | SELECT code FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "schedules",
"outer_alias": "uliv",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05739 | train |
v3 | Schema:
categories (alias: egiv)(id, type, name, amount)
items(type, amount, date, level)
Task: Find code from categories where salary exceeds the minimum value from items for the same level.
SQL: | SELECT code FROM categories AS egiv
WHERE salary > (
SELECT MIN(value) FROM items AS ikob
WHERE ikob.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "items",
"outer_alias": "egiv",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05740 | train |
v1 | Schema:
transactions (alias: gev)(amount, code, status, level)
shipments(status, amount, name, level)
Task: Select salary from transactions where code exists in shipments for the same type.
SQL: | SELECT salary FROM transactions AS gev
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "shipments",
"outer_alias": "gev",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05741 | train |
v3 | Schema:
requests (alias: ejof)(code, amount, value, name)
schedules(code, salary, date, status)
Task: Retrieve amount from requests with amount above the SUM(amount) of schedules rows sharing the same status.
SQL: | SELECT amount FROM requests AS ejof
WHERE amount > (
SELECT SUM(amount) FROM schedules AS vmob
WHERE vmob.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05742 | train |
v3 | Schema:
departments (alias: dov)(amount, salary, type, code)
managers(type, status, level, code)
Task: Find amount from departments where amount exceeds the average value from managers for the same id.
SQL: | SELECT amount FROM departments AS dov
WHERE amount > (
SELECT AVG(value) FROM managers AS hac
WHERE hac.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05743 | train |
v1 | Schema:
items (alias: ikob)(level, amount, value, code)
tasks(type, salary, id, level)
Task: Select salary from items where type exists in tasks for the same id.
SQL: | SELECT salary FROM items AS ikob
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "tasks",
"outer_alias": "ikob",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05744 | train |
v1 | Schema:
departments (alias: dov)(salary, level, amount, id)
customers(level, date, status, code)
Task: Select name from departments where code exists in customers for the same id.
SQL: | SELECT name FROM departments AS dov
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "customers",
"outer_alias": "dov",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05745 | train |
v1 | Schema:
accounts (alias: jac)(code, id, status, level)
shipments(date, type, name, amount)
Task: Select code from accounts where level exists in shipments for the same status.
SQL: | SELECT code FROM accounts AS jac
WHERE level IN (
SELECT level 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": "level",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05746 | train |
v1 | Schema:
employees (alias: bev)(name, level, status, salary)
branches(type, salary, code, status)
Task: Retrieve code from employees whose level is found in branches rows where id matches the outer record.
SQL: | SELECT code FROM employees AS bev
WHERE level IN (
SELECT level FROM branches AS agov
WHERE agov.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05747 | train |
v2 | Schema:
tasks (alias: znob)(salary, value, date, status)
invoices(value, status, salary, level)
Task: Find code from tasks where a matching record exists in invoices with the same type.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05748 | train |
v2 | Schema:
orders (alias: kab)(status, salary, value, id)
managers(code, level, status, name)
Task: Find code from orders where a matching record exists in managers with the same status.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "kab",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05749 | train |
v3 | Schema:
invoices (alias: fal)(value, code, amount, level)
items(status, salary, amount, date)
Task: Find amount from invoices where amount exceeds the total amount from items for the same type.
SQL: | SELECT amount FROM invoices AS fal
WHERE amount > (
SELECT SUM(amount) FROM items AS ikob
WHERE ikob.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "fal",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05750 | train |
v2 | Schema:
requests (alias: ejof)(salary, type, id, name)
orders(value, id, date, name)
Task: Retrieve salary from requests that have at least one corresponding entry in orders sharing the same code.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05751 | train |
v2 | Schema:
departments (alias: dov)(value, id, date, amount)
sales(id, salary, date, status)
Task: Retrieve name from departments that have at least one corresponding entry in sales sharing the same status.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05752 | train |
v1 | Schema:
accounts (alias: jac)(name, salary, level, code)
invoices(level, type, salary, amount)
Task: Find code from accounts where id appears in invoices entries with matching code.
SQL: | SELECT code FROM accounts AS jac
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05753 | train |
v1 | Schema:
accounts (alias: jac)(status, value, salary, date)
staff(name, level, value, code)
Task: Retrieve amount from accounts whose type is found in staff rows where status matches the outer record.
SQL: | SELECT amount FROM accounts AS jac
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05754 | train |
v1 | Schema:
branches (alias: agov)(date, id, status, amount)
employees(code, type, status, salary)
Task: Retrieve name from branches whose code is found in employees rows where code matches the outer record.
SQL: | SELECT name FROM branches AS agov
WHERE code IN (
SELECT code FROM employees AS bev
WHERE bev.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "employees",
"outer_alias": "agov",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05755 | train |
v1 | Schema:
managers (alias: hac)(amount, level, salary, id)
shipments(status, name, salary, value)
Task: Find name from managers where status appears in shipments entries with matching level.
SQL: | SELECT name FROM managers AS hac
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "hac",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05756 | train |
v2 | Schema:
tasks (alias: znob)(id, amount, code, value)
accounts(id, name, type, salary)
Task: Retrieve value from tasks that have at least one corresponding entry in accounts sharing the same level.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05757 | train |
v3 | Schema:
sales (alias: cif)(level, type, id, status)
products(salary, status, amount, type)
Task: Retrieve salary from sales with salary above the SUM(value) of products rows sharing the same id.
SQL: | SELECT salary FROM sales AS cif
WHERE salary > (
SELECT SUM(value) FROM products AS nad
WHERE nad.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05758 | train |
v2 | Schema:
employees (alias: bev)(code, salary, type, amount)
products(id, type, value, code)
Task: Find amount from employees where a matching record exists in products with the same id.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05759 | train |
v3 | Schema:
invoices (alias: fal)(name, status, amount, type)
branches(id, value, date, level)
Task: Retrieve code from invoices with value above the MIN(salary) of branches rows sharing the same level.
SQL: | SELECT code FROM invoices AS fal
WHERE value > (
SELECT MIN(salary) FROM branches AS agov
WHERE agov.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "branches",
"outer_alias": "fal",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05760 | train |
v2 | Schema:
customers (alias: lex)(type, id, status, code)
departments(value, type, level, amount)
Task: Retrieve amount from customers that have at least one corresponding entry in departments sharing the same id.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "departments",
"outer_alias": "lex",
"inner_alias": "dov",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05761 | train |
v3 | Schema:
schedules (alias: vmob)(type, status, level, name)
projects(date, code, amount, level)
Task: Retrieve code from schedules with salary above the MIN(value) of projects rows sharing the same level.
SQL: | SELECT code FROM schedules AS vmob
WHERE salary > (
SELECT MIN(value) FROM projects AS uliv
WHERE uliv.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "projects",
"outer_alias": "vmob",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05762 | train |
v2 | Schema:
schedules (alias: vmob)(code, name, amount, id)
shipments(status, date, name, level)
Task: Retrieve salary from schedules that have at least one corresponding entry in shipments sharing the same code.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05763 | train |
v2 | Schema:
staff (alias: xnob)(status, amount, type, date)
projects(id, amount, status, code)
Task: Find name from staff where a matching record exists in projects with the same level.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05764 | train |
v1 | Schema:
transactions (alias: gev)(amount, code, type, value)
orders(date, type, amount, name)
Task: Find name from transactions where id appears in orders entries with matching level.
SQL: | SELECT name FROM transactions AS gev
WHERE id IN (
SELECT id FROM orders AS kab
WHERE kab.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05765 | train |
v2 | Schema:
departments (alias: dov)(value, type, code, status)
items(level, salary, type, id)
Task: Find value from departments where a matching record exists in items with the same id.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05766 | train |
v3 | Schema:
accounts (alias: jac)(name, amount, date, salary)
managers(date, status, value, level)
Task: Retrieve value from accounts with salary above the COUNT(amount) of managers rows sharing the same type.
SQL: | SELECT value FROM accounts AS jac
WHERE salary > (
SELECT COUNT(amount) FROM managers AS hac
WHERE hac.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "managers",
"outer_alias": "jac",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05767 | train |
v3 | Schema:
managers (alias: hac)(type, code, id, status)
employees(date, id, value, status)
Task: Find id from managers where value exceeds the average salary from employees for the same code.
SQL: | SELECT id FROM managers AS hac
WHERE value > (
SELECT AVG(salary) FROM employees AS bev
WHERE bev.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05768 | train |
v1 | Schema:
tasks (alias: znob)(salary, status, code, date)
items(salary, name, level, amount)
Task: Retrieve salary from tasks whose level is found in items rows where status matches the outer record.
SQL: | SELECT salary FROM tasks AS znob
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "items",
"outer_alias": "znob",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05769 | train |
v2 | Schema:
regions (alias: okiv)(id, salary, value, level)
tasks(type, date, name, amount)
Task: Find name from regions where a matching record exists in tasks with the same code.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05770 | train |
v3 | Schema:
items (alias: ikob)(value, id, salary, level)
projects(salary, value, name, id)
Task: Find id from items where salary exceeds the average salary from projects for the same id.
SQL: | SELECT id FROM items AS ikob
WHERE salary > (
SELECT AVG(salary) FROM projects AS uliv
WHERE uliv.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05771 | train |
v1 | Schema:
staff (alias: xnob)(date, salary, amount, status)
projects(code, name, level, value)
Task: Find name from staff where code appears in projects entries with matching type.
SQL: | SELECT name FROM staff AS xnob
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05772 | train |
v1 | Schema:
staff (alias: xnob)(date, type, status, code)
requests(id, salary, amount, name)
Task: Select amount from staff where type exists in requests for the same type.
SQL: | SELECT amount FROM staff AS xnob
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05773 | train |
v3 | Schema:
managers (alias: hac)(type, name, code, date)
sales(date, type, name, salary)
Task: Retrieve salary from managers with salary above the MAX(salary) of sales rows sharing the same id.
SQL: | SELECT salary FROM managers AS hac
WHERE salary > (
SELECT MAX(salary) FROM sales AS cif
WHERE cif.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05774 | train |
v3 | Schema:
invoices (alias: fal)(salary, name, level, id)
tasks(amount, code, type, level)
Task: Find code from invoices where value exceeds the average value from tasks for the same level.
SQL: | SELECT code FROM invoices AS fal
WHERE value > (
SELECT AVG(value) FROM tasks AS znob
WHERE znob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "tasks",
"outer_alias": "fal",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05775 | train |
v1 | Schema:
sales (alias: cif)(amount, salary, value, id)
branches(salary, date, type, value)
Task: Retrieve salary from sales whose type is found in branches rows where level matches the outer record.
SQL: | SELECT salary FROM sales AS cif
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05776 | train |
v3 | Schema:
customers (alias: lex)(date, amount, status, salary)
orders(salary, name, value, level)
Task: Find salary from customers where amount exceeds the minimum salary from orders for the same level.
SQL: | SELECT salary FROM customers AS lex
WHERE amount > (
SELECT MIN(salary) FROM orders AS kab
WHERE kab.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "orders",
"outer_alias": "lex",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05777 | train |
v1 | Schema:
branches (alias: agov)(name, salary, value, type)
customers(id, level, value, type)
Task: Select name from branches where status exists in customers for the same code.
SQL: | SELECT name FROM branches AS agov
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05778 | train |
v3 | Schema:
customers (alias: lex)(id, amount, salary, value)
employees(salary, level, amount, type)
Task: Find amount from customers where salary exceeds the maximum salary from employees for the same code.
SQL: | SELECT amount FROM customers AS lex
WHERE salary > (
SELECT MAX(salary) FROM employees AS bev
WHERE bev.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "employees",
"outer_alias": "lex",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05779 | train |
v1 | Schema:
accounts (alias: jac)(name, level, code, date)
managers(amount, id, type, name)
Task: Retrieve code from accounts whose code is found in managers rows where status matches the outer record.
SQL: | SELECT code FROM accounts AS jac
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "managers",
"outer_alias": "jac",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05780 | train |
v2 | Schema:
departments (alias: dov)(id, level, date, code)
products(value, salary, date, amount)
Task: Find id from departments where a matching record exists in products with the same status.
SQL: | SELECT id FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "products",
"outer_alias": "dov",
"inner_alias": "nad",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05781 | train |
v2 | Schema:
branches (alias: agov)(salary, date, id, name)
sales(id, code, date, name)
Task: Retrieve name from branches that have at least one corresponding entry in sales sharing the same status.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "sales",
"outer_alias": "agov",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05782 | train |
v2 | Schema:
shipments (alias: vnob)(name, date, type, code)
orders(amount, code, level, type)
Task: Find name from shipments where a matching record exists in orders with the same type.
SQL: | SELECT name FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05783 | train |
v2 | Schema:
orders (alias: kab)(name, id, level, value)
regions(type, value, salary, level)
Task: Retrieve amount from orders that have at least one corresponding entry in regions sharing the same level.
SQL: | SELECT amount 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": "amount",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05784 | train |
v2 | Schema:
requests (alias: ejof)(name, amount, code, id)
products(amount, name, type, code)
Task: Retrieve code from requests that have at least one corresponding entry in products sharing the same type.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ejof",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05785 | train |
v2 | Schema:
customers (alias: lex)(value, salary, id, date)
tasks(code, salary, value, level)
Task: Retrieve amount from customers that have at least one corresponding entry in tasks sharing the same status.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "tasks",
"outer_alias": "lex",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05786 | train |
v2 | Schema:
accounts (alias: jac)(status, code, type, name)
items(salary, value, id, code)
Task: Find amount from accounts where a matching record exists in items with the same level.
SQL: | SELECT amount FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05787 | train |
v3 | Schema:
departments (alias: dov)(status, id, salary, code)
requests(salary, level, status, name)
Task: Retrieve value from departments with salary above the MAX(amount) of requests rows sharing the same status.
SQL: | SELECT value FROM departments AS dov
WHERE salary > (
SELECT MAX(amount) FROM requests AS ejof
WHERE ejof.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "requests",
"outer_alias": "dov",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05788 | train |
v3 | Schema:
managers (alias: hac)(name, amount, status, type)
items(level, type, status, id)
Task: Find salary from managers where value exceeds the minimum value from items for the same type.
SQL: | SELECT salary FROM managers AS hac
WHERE value > (
SELECT MIN(value) FROM items AS ikob
WHERE ikob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05789 | train |
v2 | Schema:
transactions (alias: gev)(code, amount, salary, level)
products(amount, date, id, code)
Task: Retrieve name from transactions that have at least one corresponding entry in products sharing the same level.
SQL: | SELECT name FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "gev",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05790 | train |
v1 | Schema:
items (alias: ikob)(type, value, id, status)
invoices(code, amount, salary, value)
Task: Find id from items where type appears in invoices entries with matching level.
SQL: | SELECT id FROM items AS ikob
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "invoices",
"outer_alias": "ikob",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05791 | train |
v3 | Schema:
products (alias: nad)(date, salary, amount, name)
transactions(amount, level, type, id)
Task: Retrieve amount from products with value above the MAX(salary) of transactions rows sharing the same id.
SQL: | SELECT amount FROM products AS nad
WHERE value > (
SELECT MAX(salary) FROM transactions AS gev
WHERE gev.id = nad.id
); | {
"outer_table": "products",
"inner_table": "transactions",
"outer_alias": "nad",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05792 | train |
v2 | Schema:
shipments (alias: vnob)(code, value, status, type)
departments(type, code, status, name)
Task: Find salary from shipments where a matching record exists in departments with the same id.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "departments",
"outer_alias": "vnob",
"inner_alias": "dov",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05793 | train |
v2 | Schema:
departments (alias: dov)(value, type, name, level)
shipments(value, date, id, code)
Task: Retrieve id from departments that have at least one corresponding entry in shipments sharing the same code.
SQL: | SELECT id FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "shipments",
"outer_alias": "dov",
"inner_alias": "vnob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05794 | train |
v2 | Schema:
tasks (alias: znob)(amount, status, value, name)
shipments(date, salary, status, type)
Task: Find id from tasks where a matching record exists in shipments with the same id.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "shipments",
"outer_alias": "znob",
"inner_alias": "vnob",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05795 | train |
v2 | Schema:
invoices (alias: fal)(id, name, date, amount)
products(id, name, level, type)
Task: Retrieve name from invoices that have at least one corresponding entry in products sharing the same type.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "products",
"outer_alias": "fal",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05796 | train |
v1 | Schema:
requests (alias: ejof)(amount, value, id, type)
customers(id, date, salary, code)
Task: Select name from requests where id exists in customers for the same status.
SQL: | SELECT name FROM requests AS ejof
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "customers",
"outer_alias": "ejof",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05797 | train |
v2 | Schema:
invoices (alias: fal)(status, code, name, id)
categories(value, level, type, amount)
Task: Find salary from invoices where a matching record exists in categories with the same level.
SQL: | SELECT salary FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05798 | train |
v3 | Schema:
orders (alias: kab)(amount, value, name, id)
branches(value, level, id, date)
Task: Find value from orders where value exceeds the maximum amount from branches for the same type.
SQL: | SELECT value FROM orders AS kab
WHERE value > (
SELECT MAX(amount) FROM branches AS agov
WHERE agov.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05799 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.