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:
regions (alias: okiv)(type, value, code, amount)
orders(value, level, name, status)
Task: Find code from regions where a matching record exists in orders with the same level.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03700 | train |
v3 | Schema:
customers (alias: lex)(date, id, salary, code)
schedules(level, value, code, id)
Task: Retrieve name from customers with salary above the AVG(value) of schedules rows sharing the same type.
SQL: | SELECT name FROM customers AS lex
WHERE salary > (
SELECT AVG(value) FROM schedules AS vmob
WHERE vmob.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03701 | train |
v3 | Schema:
requests (alias: ejof)(amount, id, value, level)
schedules(date, level, salary, name)
Task: Find id from requests where value exceeds the total value from schedules for the same id.
SQL: | SELECT id FROM requests AS ejof
WHERE value > (
SELECT SUM(value) FROM schedules AS vmob
WHERE vmob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03702 | train |
v2 | Schema:
categories (alias: egiv)(name, salary, id, level)
shipments(level, type, salary, name)
Task: Find amount from categories where a matching record exists in shipments with the same code.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "shipments",
"outer_alias": "egiv",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03703 | train |
v2 | Schema:
categories (alias: egiv)(name, status, level, value)
invoices(code, type, status, amount)
Task: Find code from categories where a matching record exists in invoices with the same type.
SQL: | SELECT code FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03704 | train |
v2 | Schema:
schedules (alias: vmob)(id, status, type, salary)
transactions(value, type, date, status)
Task: Retrieve name from schedules that have at least one corresponding entry in transactions sharing the same status.
SQL: | SELECT name FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "transactions",
"outer_alias": "vmob",
"inner_alias": "gev",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03705 | train |
v3 | Schema:
managers (alias: hac)(name, level, value, id)
tasks(type, value, code, id)
Task: Find amount from managers where amount exceeds the total salary from tasks for the same type.
SQL: | SELECT amount FROM managers AS hac
WHERE amount > (
SELECT SUM(salary) FROM tasks AS znob
WHERE znob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03706 | train |
v2 | Schema:
branches (alias: agov)(date, amount, id, name)
departments(status, level, code, salary)
Task: Find salary from branches where a matching record exists in departments with the same level.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "departments",
"outer_alias": "agov",
"inner_alias": "dov",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03707 | train |
v1 | Schema:
orders (alias: kab)(type, salary, amount, value)
accounts(level, status, id, value)
Task: Find name from orders where level appears in accounts entries with matching status.
SQL: | SELECT name FROM orders AS kab
WHERE level IN (
SELECT level FROM accounts AS jac
WHERE jac.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03708 | train |
v3 | Schema:
staff (alias: xnob)(code, id, status, date)
accounts(value, amount, status, id)
Task: Retrieve id from staff with value above the MAX(salary) of accounts rows sharing the same id.
SQL: | SELECT id FROM staff AS xnob
WHERE value > (
SELECT MAX(salary) FROM accounts AS jac
WHERE jac.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03709 | train |
v3 | Schema:
managers (alias: hac)(level, status, amount, code)
branches(salary, id, status, amount)
Task: Retrieve code from managers with amount above the SUM(amount) of branches rows sharing the same code.
SQL: | SELECT code FROM managers AS hac
WHERE amount > (
SELECT SUM(amount) FROM branches AS agov
WHERE agov.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "branches",
"outer_alias": "hac",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03710 | train |
v2 | Schema:
items (alias: ikob)(status, value, type, id)
managers(id, type, status, amount)
Task: Retrieve amount from items that have at least one corresponding entry in managers sharing the same type.
SQL: | SELECT amount 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": "amount",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03711 | train |
v1 | Schema:
shipments (alias: vnob)(code, type, status, value)
requests(code, type, id, level)
Task: Retrieve code from shipments whose status is found in requests rows where level matches the outer record.
SQL: | SELECT code FROM shipments AS vnob
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03712 | train |
v1 | Schema:
items (alias: ikob)(salary, status, amount, type)
invoices(level, status, value, code)
Task: Find id from items where level appears in invoices entries with matching id.
SQL: | SELECT id FROM items AS ikob
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "invoices",
"outer_alias": "ikob",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03713 | train |
v1 | Schema:
shipments (alias: vnob)(salary, id, level, value)
managers(value, date, level, salary)
Task: Retrieve name from shipments whose status is found in managers rows where type matches the outer record.
SQL: | SELECT name FROM shipments AS vnob
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "managers",
"outer_alias": "vnob",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03714 | train |
v3 | Schema:
departments (alias: dov)(value, date, code, type)
items(value, salary, type, amount)
Task: Retrieve salary from departments with amount above the COUNT(value) of items rows sharing the same code.
SQL: | SELECT salary FROM departments AS dov
WHERE amount > (
SELECT COUNT(value) FROM items AS ikob
WHERE ikob.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03715 | train |
v1 | Schema:
sales (alias: cif)(status, value, salary, id)
requests(value, level, name, date)
Task: Retrieve salary from sales whose id is found in requests rows where status matches the outer record.
SQL: | SELECT salary FROM sales AS cif
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03716 | train |
v3 | Schema:
sales (alias: cif)(name, date, status, code)
invoices(date, salary, level, status)
Task: Find value from sales where amount exceeds the count of value from invoices for the same status.
SQL: | SELECT value FROM sales AS cif
WHERE amount > (
SELECT COUNT(value) FROM invoices AS fal
WHERE fal.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03717 | train |
v2 | Schema:
branches (alias: agov)(amount, status, id, type)
schedules(status, value, id, type)
Task: Find code from branches where a matching record exists in schedules with the same status.
SQL: | SELECT code FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "schedules",
"outer_alias": "agov",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03718 | train |
v2 | Schema:
departments (alias: dov)(type, status, date, salary)
projects(name, amount, code, date)
Task: Find name from departments where a matching record exists in projects with the same status.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "projects",
"outer_alias": "dov",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03719 | train |
v3 | Schema:
branches (alias: agov)(level, name, type, id)
departments(code, date, value, id)
Task: Find amount from branches where amount exceeds the maximum value from departments for the same code.
SQL: | SELECT amount FROM branches AS agov
WHERE amount > (
SELECT MAX(value) FROM departments AS dov
WHERE dov.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "departments",
"outer_alias": "agov",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03720 | train |
v1 | Schema:
employees (alias: bev)(value, id, amount, name)
tasks(id, value, type, date)
Task: Find name from employees where status appears in tasks entries with matching level.
SQL: | SELECT name FROM employees AS bev
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "tasks",
"outer_alias": "bev",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03721 | train |
v3 | Schema:
transactions (alias: gev)(id, status, level, salary)
departments(type, amount, value, status)
Task: Find value from transactions where amount exceeds the maximum salary from departments for the same id.
SQL: | SELECT value FROM transactions AS gev
WHERE amount > (
SELECT MAX(salary) FROM departments AS dov
WHERE dov.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03722 | train |
v1 | Schema:
orders (alias: kab)(value, level, amount, code)
managers(id, amount, date, value)
Task: Find id from orders where type appears in managers entries with matching level.
SQL: | SELECT id FROM orders AS kab
WHERE type IN (
SELECT type FROM managers AS hac
WHERE hac.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "kab",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03723 | train |
v3 | Schema:
regions (alias: okiv)(code, id, status, name)
items(amount, value, type, salary)
Task: Find id from regions where value exceeds the minimum value from items for the same type.
SQL: | SELECT id FROM regions AS okiv
WHERE value > (
SELECT MIN(value) FROM items AS ikob
WHERE ikob.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "items",
"outer_alias": "okiv",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03724 | train |
v2 | Schema:
employees (alias: bev)(name, level, type, value)
categories(status, level, name, date)
Task: Find id from employees where a matching record exists in categories with the same level.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03725 | train |
v2 | Schema:
sales (alias: cif)(value, status, salary, type)
orders(status, name, salary, type)
Task: Retrieve name from sales that have at least one corresponding entry in orders sharing the same level.
SQL: | SELECT name 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": "name",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03726 | train |
v2 | Schema:
transactions (alias: gev)(level, value, name, id)
sales(level, code, id, salary)
Task: Find code from transactions where a matching record exists in sales with the same code.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03727 | train |
v1 | Schema:
invoices (alias: fal)(salary, code, amount, date)
schedules(level, status, name, type)
Task: Find value from invoices where status appears in schedules entries with matching level.
SQL: | SELECT value FROM invoices AS fal
WHERE status IN (
SELECT status FROM schedules AS vmob
WHERE vmob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03728 | train |
v1 | Schema:
schedules (alias: vmob)(type, status, amount, value)
items(date, code, value, level)
Task: Retrieve name from schedules whose code is found in items rows where status matches the outer record.
SQL: | SELECT name FROM schedules AS vmob
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "items",
"outer_alias": "vmob",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03729 | train |
v1 | Schema:
projects (alias: uliv)(amount, status, type, name)
departments(value, amount, code, salary)
Task: Select value from projects where level exists in departments for the same type.
SQL: | SELECT value FROM projects AS uliv
WHERE level IN (
SELECT level FROM departments AS dov
WHERE dov.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03730 | train |
v1 | Schema:
sales (alias: cif)(type, level, code, date)
managers(status, name, level, amount)
Task: Select code from sales where status exists in managers for the same type.
SQL: | SELECT code FROM sales AS cif
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03731 | train |
v3 | Schema:
invoices (alias: fal)(amount, code, date, salary)
orders(id, date, amount, code)
Task: Retrieve amount from invoices with value above the COUNT(amount) of orders rows sharing the same code.
SQL: | SELECT amount FROM invoices AS fal
WHERE value > (
SELECT COUNT(amount) FROM orders AS kab
WHERE kab.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03732 | train |
v3 | Schema:
schedules (alias: vmob)(code, id, amount, name)
requests(date, salary, level, type)
Task: Find value from schedules where value exceeds the total amount from requests for the same id.
SQL: | SELECT value FROM schedules AS vmob
WHERE value > (
SELECT SUM(amount) FROM requests AS ejof
WHERE ejof.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "requests",
"outer_alias": "vmob",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03733 | train |
v3 | Schema:
products (alias: nad)(level, name, salary, date)
sales(status, type, level, value)
Task: Retrieve salary from products with value above the SUM(amount) of sales rows sharing the same code.
SQL: | SELECT salary FROM products AS nad
WHERE value > (
SELECT SUM(amount) FROM sales AS cif
WHERE cif.code = nad.code
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "nad",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03734 | train |
v3 | Schema:
branches (alias: agov)(level, amount, code, name)
invoices(status, code, date, id)
Task: Find code from branches where salary exceeds the minimum value from invoices for the same type.
SQL: | SELECT code FROM branches AS agov
WHERE salary > (
SELECT MIN(value) FROM invoices AS fal
WHERE fal.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "invoices",
"outer_alias": "agov",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03735 | train |
v3 | Schema:
managers (alias: hac)(date, name, code, status)
invoices(date, code, amount, salary)
Task: Find code from managers where salary exceeds the total salary from invoices for the same id.
SQL: | SELECT code FROM managers AS hac
WHERE salary > (
SELECT SUM(salary) FROM invoices AS fal
WHERE fal.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03736 | train |
v3 | Schema:
transactions (alias: gev)(code, salary, level, amount)
regions(value, code, salary, status)
Task: Find salary from transactions where salary exceeds the average salary from regions for the same code.
SQL: | SELECT salary FROM transactions AS gev
WHERE salary > (
SELECT AVG(salary) FROM regions AS okiv
WHERE okiv.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03737 | train |
v3 | Schema:
requests (alias: ejof)(date, status, amount, level)
schedules(status, amount, value, id)
Task: Retrieve salary from requests with amount above the MIN(amount) of schedules rows sharing the same id.
SQL: | SELECT salary FROM requests AS ejof
WHERE amount > (
SELECT MIN(amount) FROM schedules AS vmob
WHERE vmob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03738 | train |
v3 | Schema:
invoices (alias: fal)(salary, value, code, name)
schedules(code, date, type, status)
Task: Retrieve code from invoices with value above the AVG(value) of schedules rows sharing the same type.
SQL: | SELECT code FROM invoices AS fal
WHERE value > (
SELECT AVG(value) FROM schedules AS vmob
WHERE vmob.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03739 | train |
v3 | Schema:
shipments (alias: vnob)(date, value, code, amount)
customers(date, amount, code, status)
Task: Retrieve value from shipments with value above the MAX(value) of customers rows sharing the same id.
SQL: | SELECT value FROM shipments AS vnob
WHERE value > (
SELECT MAX(value) FROM customers AS lex
WHERE lex.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03740 | train |
v1 | Schema:
managers (alias: hac)(type, name, salary, status)
staff(name, id, salary, type)
Task: Find value from managers where id appears in staff entries with matching level.
SQL: | SELECT value FROM managers AS hac
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "hac",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03741 | train |
v1 | Schema:
categories (alias: egiv)(id, date, type, code)
tasks(salary, value, level, id)
Task: Select salary from categories where status exists in tasks for the same level.
SQL: | SELECT salary FROM categories AS egiv
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "tasks",
"outer_alias": "egiv",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03742 | train |
v1 | Schema:
tasks (alias: znob)(date, value, id, code)
requests(amount, code, value, salary)
Task: Find name from tasks where id appears in requests entries with matching level.
SQL: | SELECT name FROM tasks AS znob
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03743 | train |
v2 | Schema:
invoices (alias: fal)(id, code, status, amount)
orders(type, level, id, date)
Task: Find amount from invoices where a matching record exists in orders with the same level.
SQL: | SELECT amount FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03744 | train |
v3 | Schema:
invoices (alias: fal)(name, level, salary, type)
products(id, code, salary, date)
Task: Retrieve amount from invoices with amount above the MIN(amount) of products rows sharing the same code.
SQL: | SELECT amount FROM invoices AS fal
WHERE amount > (
SELECT MIN(amount) FROM products AS nad
WHERE nad.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "products",
"outer_alias": "fal",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03745 | train |
v2 | Schema:
departments (alias: dov)(amount, type, level, code)
tasks(id, code, status, name)
Task: Retrieve amount from departments that have at least one corresponding entry in tasks sharing the same status.
SQL: | SELECT amount FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "tasks",
"outer_alias": "dov",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03746 | train |
v3 | Schema:
projects (alias: uliv)(status, date, salary, code)
accounts(id, name, status, type)
Task: Retrieve salary from projects with amount above the MIN(salary) of accounts rows sharing the same code.
SQL: | SELECT salary FROM projects AS uliv
WHERE amount > (
SELECT MIN(salary) FROM accounts AS jac
WHERE jac.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "accounts",
"outer_alias": "uliv",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03747 | train |
v1 | Schema:
accounts (alias: jac)(type, code, id, amount)
products(salary, level, date, value)
Task: Find amount from accounts where level appears in products entries with matching type.
SQL: | SELECT amount FROM accounts AS jac
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "products",
"outer_alias": "jac",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03748 | train |
v2 | Schema:
items (alias: ikob)(status, code, amount, name)
sales(salary, amount, status, date)
Task: Retrieve amount from items that have at least one corresponding entry in sales sharing the same status.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "sales",
"outer_alias": "ikob",
"inner_alias": "cif",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03749 | train |
v1 | Schema:
requests (alias: ejof)(date, level, type, salary)
accounts(status, date, value, level)
Task: Find value from requests where status appears in accounts entries with matching id.
SQL: | SELECT value FROM requests AS ejof
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03750 | train |
v2 | Schema:
products (alias: nad)(date, amount, id, name)
items(type, id, level, salary)
Task: Find amount from products where a matching record exists in items with the same code.
SQL: | SELECT amount FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = nad.code
); | {
"outer_table": "products",
"inner_table": "items",
"outer_alias": "nad",
"inner_alias": "ikob",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03751 | train |
v3 | Schema:
requests (alias: ejof)(type, salary, date, id)
accounts(salary, date, amount, value)
Task: Find code from requests where amount exceeds the minimum salary from accounts for the same type.
SQL: | SELECT code FROM requests AS ejof
WHERE amount > (
SELECT MIN(salary) FROM accounts AS jac
WHERE jac.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03752 | train |
v3 | Schema:
departments (alias: dov)(name, value, code, type)
schedules(date, level, name, type)
Task: Find value from departments where amount exceeds the average salary from schedules for the same id.
SQL: | SELECT value FROM departments AS dov
WHERE amount > (
SELECT AVG(salary) FROM schedules AS vmob
WHERE vmob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "schedules",
"outer_alias": "dov",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03753 | train |
v2 | Schema:
departments (alias: dov)(name, code, amount, status)
projects(type, id, name, salary)
Task: Find value from departments where a matching record exists in projects with the same type.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "projects",
"outer_alias": "dov",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03754 | train |
v2 | Schema:
tasks (alias: znob)(status, code, amount, id)
products(date, value, type, name)
Task: Find code from tasks where a matching record exists in products with the same type.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03755 | train |
v1 | Schema:
sales (alias: cif)(id, level, date, name)
accounts(status, type, name, id)
Task: Retrieve salary from sales whose status is found in accounts rows where id matches the outer record.
SQL: | SELECT salary FROM sales AS cif
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "accounts",
"outer_alias": "cif",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03756 | train |
v1 | Schema:
regions (alias: okiv)(name, id, date, value)
sales(name, id, amount, status)
Task: Select salary from regions where code exists in sales for the same level.
SQL: | SELECT salary FROM regions AS okiv
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03757 | train |
v1 | Schema:
shipments (alias: vnob)(name, salary, id, value)
orders(type, amount, status, level)
Task: Find code from shipments where status appears in orders entries with matching code.
SQL: | SELECT code FROM shipments AS vnob
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03758 | train |
v1 | Schema:
employees (alias: bev)(type, amount, name, code)
schedules(salary, type, amount, code)
Task: Retrieve id from employees whose code is found in schedules rows where level matches the outer record.
SQL: | SELECT id FROM employees AS bev
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "schedules",
"outer_alias": "bev",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03759 | train |
v3 | Schema:
projects (alias: uliv)(amount, level, name, id)
departments(level, code, type, amount)
Task: Retrieve id from projects with salary above the COUNT(amount) of departments rows sharing the same status.
SQL: | SELECT id FROM projects AS uliv
WHERE salary > (
SELECT COUNT(amount) FROM departments AS dov
WHERE dov.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03760 | train |
v3 | Schema:
projects (alias: uliv)(code, date, amount, value)
staff(code, salary, status, name)
Task: Retrieve id from projects with salary above the SUM(salary) of staff rows sharing the same id.
SQL: | SELECT id FROM projects AS uliv
WHERE salary > (
SELECT SUM(salary) FROM staff AS xnob
WHERE xnob.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03761 | train |
v2 | Schema:
items (alias: ikob)(value, code, name, status)
departments(id, code, name, value)
Task: Find salary from items where a matching record exists in departments with the same level.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "departments",
"outer_alias": "ikob",
"inner_alias": "dov",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03762 | train |
v1 | Schema:
regions (alias: okiv)(value, level, amount, type)
categories(type, date, amount, name)
Task: Select salary from regions where status exists in categories for the same level.
SQL: | SELECT salary FROM regions AS okiv
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03763 | train |
v1 | Schema:
customers (alias: lex)(salary, level, status, code)
products(amount, salary, type, level)
Task: Select name from customers where status exists in products for the same status.
SQL: | SELECT name FROM customers AS lex
WHERE status IN (
SELECT status FROM products AS nad
WHERE nad.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03764 | train |
v2 | Schema:
items (alias: ikob)(date, type, amount, id)
shipments(date, type, salary, value)
Task: Retrieve value from items that have at least one corresponding entry in shipments sharing the same type.
SQL: | SELECT value FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03765 | train |
v2 | Schema:
regions (alias: okiv)(type, date, id, status)
customers(name, value, id, salary)
Task: Find id from regions where a matching record exists in customers with the same level.
SQL: | SELECT id FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03766 | train |
v2 | Schema:
categories (alias: egiv)(status, type, code, id)
schedules(amount, value, level, name)
Task: Retrieve amount from categories that have at least one corresponding entry in schedules sharing the same type.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03767 | train |
v1 | Schema:
requests (alias: ejof)(name, type, code, date)
managers(level, amount, date, salary)
Task: Find amount from requests where level appears in managers entries with matching id.
SQL: | SELECT amount FROM requests AS ejof
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03768 | train |
v2 | Schema:
categories (alias: egiv)(amount, level, salary, type)
managers(status, salary, amount, code)
Task: Find amount from categories where a matching record exists in managers with the same level.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "managers",
"outer_alias": "egiv",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03769 | train |
v1 | Schema:
projects (alias: uliv)(salary, id, date, amount)
categories(id, date, level, value)
Task: Retrieve salary from projects whose type is found in categories rows where code matches the outer record.
SQL: | SELECT salary FROM projects AS uliv
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03770 | train |
v3 | Schema:
products (alias: nad)(amount, status, name, id)
managers(amount, date, value, level)
Task: Retrieve salary from products with salary above the MIN(amount) of managers rows sharing the same status.
SQL: | SELECT salary FROM products AS nad
WHERE salary > (
SELECT MIN(amount) FROM managers AS hac
WHERE hac.status = nad.status
); | {
"outer_table": "products",
"inner_table": "managers",
"outer_alias": "nad",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03771 | train |
v3 | Schema:
accounts (alias: jac)(name, salary, date, status)
items(type, value, status, id)
Task: Retrieve salary from accounts with value above the MAX(amount) of items rows sharing the same type.
SQL: | SELECT salary FROM accounts AS jac
WHERE value > (
SELECT MAX(amount) FROM items AS ikob
WHERE ikob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03772 | train |
v3 | Schema:
employees (alias: bev)(salary, id, date, status)
schedules(type, name, date, level)
Task: Retrieve amount from employees with salary above the AVG(value) of schedules rows sharing the same id.
SQL: | SELECT amount FROM employees AS bev
WHERE salary > (
SELECT AVG(value) FROM schedules AS vmob
WHERE vmob.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "schedules",
"outer_alias": "bev",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03773 | train |
v3 | Schema:
sales (alias: cif)(code, name, amount, status)
employees(type, date, value, amount)
Task: Retrieve value from sales with value above the MAX(amount) of employees rows sharing the same id.
SQL: | SELECT value FROM sales AS cif
WHERE value > (
SELECT MAX(amount) FROM employees AS bev
WHERE bev.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "employees",
"outer_alias": "cif",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03774 | train |
v3 | Schema:
schedules (alias: vmob)(status, code, id, level)
requests(code, name, level, type)
Task: Retrieve value from schedules with amount above the COUNT(amount) of requests rows sharing the same id.
SQL: | SELECT value FROM schedules AS vmob
WHERE amount > (
SELECT COUNT(amount) FROM requests AS ejof
WHERE ejof.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "requests",
"outer_alias": "vmob",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03775 | train |
v2 | Schema:
categories (alias: egiv)(code, id, amount, salary)
sales(code, date, id, name)
Task: Find id from categories where a matching record exists in sales with the same status.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "sales",
"outer_alias": "egiv",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03776 | train |
v3 | Schema:
shipments (alias: vnob)(salary, id, type, code)
projects(type, amount, id, level)
Task: Find amount from shipments where value exceeds the average amount from projects for the same code.
SQL: | SELECT amount FROM shipments AS vnob
WHERE value > (
SELECT AVG(amount) FROM projects AS uliv
WHERE uliv.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "projects",
"outer_alias": "vnob",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03777 | train |
v1 | Schema:
branches (alias: agov)(amount, code, name, salary)
managers(level, amount, code, salary)
Task: Select salary from branches where id exists in managers for the same level.
SQL: | SELECT salary FROM branches AS agov
WHERE id IN (
SELECT id FROM managers AS hac
WHERE hac.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03778 | train |
v1 | Schema:
categories (alias: egiv)(value, name, level, status)
requests(code, amount, name, level)
Task: Retrieve value from categories whose type is found in requests rows where id matches the outer record.
SQL: | SELECT value FROM categories AS egiv
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03779 | train |
v2 | Schema:
orders (alias: kab)(salary, value, id, date)
staff(status, value, name, amount)
Task: Find salary from orders where a matching record exists in staff with the same id.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03780 | train |
v3 | Schema:
projects (alias: uliv)(level, date, name, type)
requests(level, amount, id, status)
Task: Find id from projects where amount exceeds the minimum salary from requests for the same status.
SQL: | SELECT id FROM projects AS uliv
WHERE amount > (
SELECT MIN(salary) FROM requests AS ejof
WHERE ejof.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "requests",
"outer_alias": "uliv",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03781 | train |
v3 | Schema:
regions (alias: okiv)(status, name, date, salary)
branches(date, name, salary, id)
Task: Retrieve value from regions with amount above the MAX(amount) of branches rows sharing the same level.
SQL: | SELECT value FROM regions AS okiv
WHERE amount > (
SELECT MAX(amount) FROM branches AS agov
WHERE agov.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "branches",
"outer_alias": "okiv",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03782 | train |
v2 | Schema:
transactions (alias: gev)(id, date, amount, type)
orders(salary, type, level, amount)
Task: Find salary from transactions where a matching record exists in orders with the same code.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03783 | train |
v3 | Schema:
departments (alias: dov)(level, status, id, code)
shipments(name, level, status, value)
Task: Find value from departments where salary exceeds the average value from shipments for the same status.
SQL: | SELECT value FROM departments AS dov
WHERE salary > (
SELECT AVG(value) FROM shipments AS vnob
WHERE vnob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "shipments",
"outer_alias": "dov",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03784 | train |
v3 | Schema:
invoices (alias: fal)(value, id, salary, level)
staff(status, level, name, date)
Task: Find id from invoices where value exceeds the count of value from staff for the same id.
SQL: | SELECT id FROM invoices AS fal
WHERE value > (
SELECT COUNT(value) FROM staff AS xnob
WHERE xnob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03785 | train |
v2 | Schema:
shipments (alias: vnob)(type, name, level, date)
regions(value, code, type, amount)
Task: Find amount from shipments where a matching record exists in regions with the same level.
SQL: | SELECT amount FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03786 | train |
v2 | Schema:
sales (alias: cif)(level, date, name, status)
categories(id, name, code, date)
Task: Find value from sales where a matching record exists in categories with the same code.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03787 | train |
v2 | Schema:
invoices (alias: fal)(name, amount, date, value)
branches(status, code, id, level)
Task: Find name from invoices where a matching record exists in branches with the same type.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "branches",
"outer_alias": "fal",
"inner_alias": "agov",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03788 | train |
v1 | Schema:
transactions (alias: gev)(value, name, amount, code)
requests(code, type, id, date)
Task: Find name from transactions where type appears in requests entries with matching code.
SQL: | SELECT name FROM transactions AS gev
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03789 | train |
v2 | Schema:
transactions (alias: gev)(name, status, salary, amount)
categories(salary, type, amount, level)
Task: Find amount from transactions where a matching record exists in categories with the same code.
SQL: | SELECT amount FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03790 | train |
v3 | Schema:
regions (alias: okiv)(amount, date, code, status)
shipments(value, name, date, type)
Task: Retrieve name from regions with value above the MIN(amount) of shipments rows sharing the same id.
SQL: | SELECT name FROM regions AS okiv
WHERE value > (
SELECT MIN(amount) FROM shipments AS vnob
WHERE vnob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "shipments",
"outer_alias": "okiv",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03791 | train |
v3 | Schema:
sales (alias: cif)(date, salary, type, amount)
requests(amount, id, status, salary)
Task: Find salary from sales where amount exceeds the total salary from requests for the same type.
SQL: | SELECT salary FROM sales AS cif
WHERE amount > (
SELECT SUM(salary) FROM requests AS ejof
WHERE ejof.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03792 | train |
v3 | Schema:
employees (alias: bev)(status, name, code, type)
staff(amount, code, value, type)
Task: Find value from employees where salary exceeds the average amount from staff for the same level.
SQL: | SELECT value FROM employees AS bev
WHERE salary > (
SELECT AVG(amount) FROM staff AS xnob
WHERE xnob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "staff",
"outer_alias": "bev",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03793 | train |
v3 | Schema:
invoices (alias: fal)(amount, salary, date, status)
staff(status, code, salary, date)
Task: Find amount from invoices where amount exceeds the count of salary from staff for the same code.
SQL: | SELECT amount FROM invoices AS fal
WHERE amount > (
SELECT COUNT(salary) FROM staff AS xnob
WHERE xnob.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03794 | train |
v2 | Schema:
items (alias: ikob)(level, type, value, code)
shipments(value, type, status, id)
Task: Retrieve amount from items that have at least one corresponding entry in shipments sharing the same level.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03795 | train |
v3 | Schema:
schedules (alias: vmob)(code, type, date, value)
projects(date, type, value, status)
Task: Retrieve code from schedules with amount above the MAX(value) of projects rows sharing the same id.
SQL: | SELECT code FROM schedules AS vmob
WHERE amount > (
SELECT MAX(value) FROM projects AS uliv
WHERE uliv.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "projects",
"outer_alias": "vmob",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03796 | train |
v2 | Schema:
categories (alias: egiv)(id, salary, type, status)
schedules(name, status, date, code)
Task: Retrieve amount from categories that have at least one corresponding entry in schedules sharing the same id.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03797 | train |
v1 | Schema:
projects (alias: uliv)(code, name, amount, id)
employees(status, level, salary, date)
Task: Retrieve name from projects whose id is found in employees rows where type matches the outer record.
SQL: | SELECT name FROM projects AS uliv
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "employees",
"outer_alias": "uliv",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03798 | train |
v2 | Schema:
managers (alias: hac)(name, value, amount, level)
tasks(code, name, status, id)
Task: Retrieve salary from managers that have at least one corresponding entry in tasks sharing the same code.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03799 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.