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:
schedules (alias: vmob)(date, value, level, amount)
accounts(amount, id, status, code)
Task: Retrieve value from schedules with amount above the COUNT(salary) of accounts rows sharing the same code.
SQL: | SELECT value FROM schedules AS vmob
WHERE amount > (
SELECT COUNT(salary) FROM accounts AS jac
WHERE jac.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08000 | train |
v1 | Schema:
departments (alias: dov)(value, id, name, type)
managers(id, code, level, salary)
Task: Retrieve code from departments whose code is found in managers rows where status matches the outer record.
SQL: | SELECT code FROM departments AS dov
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08001 | train |
v1 | Schema:
schedules (alias: vmob)(type, code, date, value)
shipments(type, level, salary, code)
Task: Find code from schedules where status appears in shipments entries with matching level.
SQL: | SELECT code FROM schedules AS vmob
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08002 | train |
v2 | Schema:
staff (alias: xnob)(type, date, amount, value)
employees(status, amount, salary, level)
Task: Retrieve value from staff that have at least one corresponding entry in employees sharing the same level.
SQL: | SELECT value FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "employees",
"outer_alias": "xnob",
"inner_alias": "bev",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08003 | train |
v2 | Schema:
schedules (alias: vmob)(salary, value, name, level)
managers(salary, status, value, level)
Task: Retrieve code from schedules that have at least one corresponding entry in managers sharing the same status.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08004 | train |
v1 | Schema:
tasks (alias: znob)(code, id, level, salary)
departments(type, id, code, date)
Task: Retrieve value from tasks whose status is found in departments rows where type matches the outer record.
SQL: | SELECT value FROM tasks AS znob
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "departments",
"outer_alias": "znob",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08005 | train |
v1 | Schema:
projects (alias: uliv)(salary, id, code, level)
categories(name, code, level, amount)
Task: Retrieve salary from projects whose status is found in categories rows where type matches the outer record.
SQL: | SELECT salary FROM projects AS uliv
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08006 | train |
v3 | Schema:
categories (alias: egiv)(value, level, id, name)
items(status, id, code, name)
Task: Retrieve amount from categories with value above the SUM(amount) of items rows sharing the same level.
SQL: | SELECT amount FROM categories AS egiv
WHERE value > (
SELECT SUM(amount) FROM items AS ikob
WHERE ikob.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "items",
"outer_alias": "egiv",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08007 | train |
v3 | Schema:
staff (alias: xnob)(value, id, amount, level)
orders(name, level, salary, date)
Task: Retrieve name from staff with salary above the COUNT(salary) of orders rows sharing the same type.
SQL: | SELECT name FROM staff AS xnob
WHERE salary > (
SELECT COUNT(salary) FROM orders AS kab
WHERE kab.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "orders",
"outer_alias": "xnob",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08008 | train |
v3 | Schema:
accounts (alias: jac)(value, status, id, date)
transactions(level, name, status, date)
Task: Find salary from accounts where salary exceeds the total salary from transactions for the same type.
SQL: | SELECT salary FROM accounts AS jac
WHERE salary > (
SELECT SUM(salary) FROM transactions AS gev
WHERE gev.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08009 | train |
v2 | Schema:
items (alias: ikob)(id, name, level, date)
shipments(level, type, id, amount)
Task: Find salary from items where a matching record exists in shipments with the same status.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_08010 | train |
v1 | Schema:
sales (alias: cif)(level, id, type, code)
shipments(amount, code, level, date)
Task: Retrieve id from sales whose id is found in shipments rows where id matches the outer record.
SQL: | SELECT id FROM sales AS cif
WHERE id IN (
SELECT id FROM shipments AS vnob
WHERE vnob.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08011 | train |
v2 | Schema:
schedules (alias: vmob)(value, level, status, type)
invoices(type, date, level, code)
Task: Find id from schedules where a matching record exists in invoices with the same level.
SQL: | SELECT id FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "invoices",
"outer_alias": "vmob",
"inner_alias": "fal",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08012 | train |
v2 | Schema:
tasks (alias: znob)(code, date, type, name)
sales(level, code, type, amount)
Task: Find value from tasks where a matching record exists in sales with the same level.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08013 | train |
v2 | Schema:
regions (alias: okiv)(date, id, status, type)
employees(code, id, amount, status)
Task: Retrieve amount from regions that have at least one corresponding entry in employees sharing the same id.
SQL: | SELECT amount FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "okiv",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08014 | train |
v1 | Schema:
managers (alias: hac)(name, code, status, type)
orders(value, level, id, date)
Task: Find id from managers where id appears in orders entries with matching code.
SQL: | SELECT id FROM managers AS hac
WHERE id IN (
SELECT id FROM orders AS kab
WHERE kab.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "orders",
"outer_alias": "hac",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08015 | train |
v2 | Schema:
transactions (alias: gev)(id, value, name, type)
customers(value, amount, id, type)
Task: Retrieve id from transactions that have at least one corresponding entry in customers sharing the same type.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08016 | train |
v3 | Schema:
branches (alias: agov)(salary, id, type, level)
categories(salary, amount, name, code)
Task: Find code from branches where amount exceeds the average amount from categories for the same type.
SQL: | SELECT code FROM branches AS agov
WHERE amount > (
SELECT AVG(amount) FROM categories AS egiv
WHERE egiv.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08017 | train |
v2 | Schema:
managers (alias: hac)(status, date, amount, code)
items(amount, salary, date, value)
Task: Find salary from managers where a matching record exists in items with the same level.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08018 | train |
v2 | Schema:
products (alias: nad)(status, salary, id, name)
tasks(amount, level, status, type)
Task: Retrieve value from products that have at least one corresponding entry in tasks sharing the same code.
SQL: | SELECT value FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = nad.code
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "nad",
"inner_alias": "znob",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08019 | train |
v1 | Schema:
schedules (alias: vmob)(code, value, date, id)
projects(type, id, salary, amount)
Task: Select name from schedules where type exists in projects for the same id.
SQL: | SELECT name FROM schedules AS vmob
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "projects",
"outer_alias": "vmob",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08020 | train |
v1 | Schema:
invoices (alias: fal)(code, level, name, date)
customers(level, type, code, value)
Task: Retrieve name from invoices whose status is found in customers rows where status matches the outer record.
SQL: | SELECT name FROM invoices AS fal
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08021 | train |
v1 | Schema:
accounts (alias: jac)(id, value, level, date)
projects(id, level, salary, type)
Task: Find id from accounts where type appears in projects entries with matching type.
SQL: | SELECT id FROM accounts AS jac
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08022 | train |
v3 | Schema:
branches (alias: agov)(status, code, salary, id)
customers(salary, name, code, type)
Task: Find id from branches where value exceeds the count of amount from customers for the same id.
SQL: | SELECT id FROM branches AS agov
WHERE value > (
SELECT COUNT(amount) FROM customers AS lex
WHERE lex.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08023 | train |
v2 | Schema:
managers (alias: hac)(name, id, level, value)
items(salary, id, amount, date)
Task: Find name from managers where a matching record exists in items with the same type.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08024 | train |
v3 | Schema:
managers (alias: hac)(level, date, name, salary)
sales(level, type, status, value)
Task: Find code from managers where amount exceeds the total amount from sales for the same level.
SQL: | SELECT code FROM managers AS hac
WHERE amount > (
SELECT SUM(amount) FROM sales AS cif
WHERE cif.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08025 | train |
v2 | Schema:
managers (alias: hac)(salary, level, amount, code)
sales(type, amount, name, level)
Task: Find name from managers where a matching record exists in sales with the same code.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08026 | train |
v1 | Schema:
departments (alias: dov)(amount, id, value, code)
items(name, code, level, id)
Task: Retrieve code from departments whose level is found in items rows where id matches the outer record.
SQL: | SELECT code FROM departments AS dov
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08027 | train |
v2 | Schema:
staff (alias: xnob)(id, name, value, code)
shipments(status, name, type, value)
Task: Find id from staff where a matching record exists in shipments with the same type.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "xnob",
"inner_alias": "vnob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08028 | train |
v2 | Schema:
shipments (alias: vnob)(amount, status, value, level)
schedules(value, date, id, amount)
Task: Find id from shipments where a matching record exists in schedules with the same type.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08029 | train |
v2 | Schema:
requests (alias: ejof)(type, level, value, code)
regions(status, level, value, salary)
Task: Retrieve id from requests that have at least one corresponding entry in regions sharing the same code.
SQL: | SELECT id FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "regions",
"outer_alias": "ejof",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08030 | train |
v2 | Schema:
regions (alias: okiv)(value, amount, code, level)
projects(status, salary, value, date)
Task: Find name from regions where a matching record exists in projects with the same code.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08031 | train |
v2 | Schema:
transactions (alias: gev)(name, id, level, salary)
regions(type, id, salary, date)
Task: Retrieve value from transactions that have at least one corresponding entry in regions sharing the same type.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08032 | train |
v1 | Schema:
items (alias: ikob)(type, value, salary, date)
regions(type, level, value, code)
Task: Find salary from items where type appears in regions entries with matching level.
SQL: | SELECT salary FROM items AS ikob
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "regions",
"outer_alias": "ikob",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_08033 | train |
v1 | Schema:
regions (alias: okiv)(value, id, level, name)
managers(name, code, date, id)
Task: Find amount from regions where level appears in managers entries with matching level.
SQL: | SELECT amount FROM regions AS okiv
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "managers",
"outer_alias": "okiv",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08034 | train |
v2 | Schema:
items (alias: ikob)(code, id, status, type)
departments(name, value, id, amount)
Task: Retrieve id from items that have at least one corresponding entry in departments sharing the same level.
SQL: | SELECT id 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": "id",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_08035 | train |
v2 | Schema:
invoices (alias: fal)(amount, level, status, id)
shipments(type, status, level, salary)
Task: Find code from invoices where a matching record exists in shipments with the same id.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "fal",
"inner_alias": "vnob",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08036 | train |
v1 | Schema:
branches (alias: agov)(name, date, amount, code)
managers(type, name, date, value)
Task: Find id from branches where id appears in managers entries with matching status.
SQL: | SELECT id FROM branches AS agov
WHERE id IN (
SELECT id FROM managers AS hac
WHERE hac.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08037 | train |
v3 | Schema:
products (alias: nad)(date, amount, name, code)
customers(id, level, name, code)
Task: Find salary from products where salary exceeds the count of amount from customers for the same type.
SQL: | SELECT salary FROM products AS nad
WHERE salary > (
SELECT COUNT(amount) FROM customers AS lex
WHERE lex.type = nad.type
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08038 | train |
v1 | Schema:
customers (alias: lex)(code, level, id, value)
requests(code, type, id, value)
Task: Find code from customers where status appears in requests entries with matching level.
SQL: | SELECT code FROM customers AS lex
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "lex",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08039 | train |
v3 | Schema:
employees (alias: bev)(salary, status, level, amount)
departments(salary, name, level, status)
Task: Retrieve code from employees with amount above the SUM(value) of departments rows sharing the same type.
SQL: | SELECT code FROM employees AS bev
WHERE amount > (
SELECT SUM(value) FROM departments AS dov
WHERE dov.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08040 | train |
v2 | Schema:
staff (alias: xnob)(code, level, type, status)
departments(salary, type, amount, level)
Task: Find id from staff where a matching record exists in departments with the same id.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08041 | train |
v1 | Schema:
categories (alias: egiv)(amount, salary, value, name)
regions(status, type, date, id)
Task: Retrieve code from categories whose status is found in regions rows where type matches the outer record.
SQL: | SELECT code FROM categories AS egiv
WHERE status IN (
SELECT status FROM regions AS okiv
WHERE okiv.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "regions",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08042 | train |
v2 | Schema:
sales (alias: cif)(value, level, id, code)
staff(value, date, type, id)
Task: Retrieve id from sales that have at least one corresponding entry in staff sharing the same code.
SQL: | SELECT id FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "staff",
"outer_alias": "cif",
"inner_alias": "xnob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08043 | train |
v3 | Schema:
orders (alias: kab)(code, date, status, level)
employees(name, type, amount, value)
Task: Retrieve code from orders with amount above the MAX(salary) of employees rows sharing the same id.
SQL: | SELECT code FROM orders AS kab
WHERE amount > (
SELECT MAX(salary) FROM employees AS bev
WHERE bev.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "employees",
"outer_alias": "kab",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08044 | train |
v2 | Schema:
managers (alias: hac)(salary, value, type, date)
items(level, type, value, code)
Task: Find name from managers where a matching record exists in items with the same id.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08045 | train |
v3 | Schema:
projects (alias: uliv)(code, type, amount, value)
branches(status, amount, level, name)
Task: Retrieve value from projects with amount above the COUNT(amount) of branches rows sharing the same code.
SQL: | SELECT value FROM projects AS uliv
WHERE amount > (
SELECT COUNT(amount) FROM branches AS agov
WHERE agov.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "branches",
"outer_alias": "uliv",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08046 | train |
v2 | Schema:
regions (alias: okiv)(id, name, date, salary)
invoices(name, value, date, level)
Task: Retrieve id from regions that have at least one corresponding entry in invoices sharing the same level.
SQL: | SELECT id FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "invoices",
"outer_alias": "okiv",
"inner_alias": "fal",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08047 | train |
v1 | Schema:
departments (alias: dov)(amount, id, date, type)
managers(type, level, name, id)
Task: Find value from departments where status appears in managers entries with matching type.
SQL: | SELECT value FROM departments AS dov
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08048 | train |
v3 | Schema:
items (alias: ikob)(code, date, status, value)
tasks(name, type, level, status)
Task: Retrieve name from items with amount above the SUM(amount) of tasks rows sharing the same id.
SQL: | SELECT name FROM items AS ikob
WHERE amount > (
SELECT SUM(amount) FROM tasks AS znob
WHERE znob.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "tasks",
"outer_alias": "ikob",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_08049 | train |
v2 | Schema:
employees (alias: bev)(amount, status, level, code)
schedules(salary, code, type, value)
Task: Find value from employees where a matching record exists in schedules with the same status.
SQL: | SELECT value FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "schedules",
"outer_alias": "bev",
"inner_alias": "vmob",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08050 | train |
v2 | Schema:
invoices (alias: fal)(code, id, type, amount)
accounts(value, level, id, name)
Task: Find code from invoices where a matching record exists in accounts with the same status.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08051 | train |
v3 | Schema:
projects (alias: uliv)(salary, status, type, amount)
shipments(date, status, name, code)
Task: Find code from projects where amount exceeds the maximum value from shipments for the same code.
SQL: | SELECT code FROM projects AS uliv
WHERE amount > (
SELECT MAX(value) FROM shipments AS vnob
WHERE vnob.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "shipments",
"outer_alias": "uliv",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08052 | train |
v1 | Schema:
staff (alias: xnob)(value, status, date, code)
departments(salary, code, value, status)
Task: Select code from staff where id exists in departments for the same code.
SQL: | SELECT code FROM staff AS xnob
WHERE id IN (
SELECT id FROM departments AS dov
WHERE dov.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08053 | train |
v2 | Schema:
requests (alias: ejof)(name, amount, date, id)
products(name, salary, amount, value)
Task: Retrieve name from requests that have at least one corresponding entry in products sharing the same id.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ejof",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08054 | train |
v2 | Schema:
departments (alias: dov)(level, status, name, value)
invoices(value, date, salary, status)
Task: Retrieve code from departments that have at least one corresponding entry in invoices sharing the same id.
SQL: | SELECT code FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08055 | train |
v1 | Schema:
branches (alias: agov)(type, value, level, date)
items(type, salary, code, level)
Task: Retrieve code from branches whose status is found in items rows where id matches the outer record.
SQL: | SELECT code FROM branches AS agov
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08056 | train |
v1 | Schema:
managers (alias: hac)(type, value, level, date)
branches(status, name, value, id)
Task: Find id from managers where code appears in branches entries with matching status.
SQL: | SELECT id FROM managers AS hac
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "branches",
"outer_alias": "hac",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08057 | train |
v2 | Schema:
products (alias: nad)(salary, level, amount, status)
branches(name, salary, amount, level)
Task: Retrieve name from products that have at least one corresponding entry in branches sharing the same level.
SQL: | SELECT name FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.level = nad.level
); | {
"outer_table": "products",
"inner_table": "branches",
"outer_alias": "nad",
"inner_alias": "agov",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08058 | train |
v3 | Schema:
transactions (alias: gev)(date, name, salary, level)
accounts(amount, id, code, date)
Task: Find name from transactions where amount exceeds the total value from accounts for the same code.
SQL: | SELECT name FROM transactions AS gev
WHERE amount > (
SELECT SUM(value) FROM accounts AS jac
WHERE jac.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "accounts",
"outer_alias": "gev",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08059 | train |
v1 | Schema:
categories (alias: egiv)(type, date, name, value)
invoices(level, salary, amount, type)
Task: Retrieve code from categories whose id is found in invoices rows where id matches the outer record.
SQL: | SELECT code FROM categories AS egiv
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08060 | train |
v1 | Schema:
sales (alias: cif)(code, salary, level, status)
items(date, status, code, level)
Task: Find amount from sales where code appears in items entries with matching level.
SQL: | SELECT amount FROM sales AS cif
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08061 | train |
v1 | Schema:
customers (alias: lex)(amount, id, code, level)
projects(date, level, code, status)
Task: Find value from customers where id appears in projects entries with matching id.
SQL: | SELECT value FROM customers AS lex
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08062 | train |
v1 | Schema:
branches (alias: agov)(type, salary, code, name)
invoices(level, date, code, value)
Task: Select name from branches where type exists in invoices for the same type.
SQL: | SELECT name FROM branches AS agov
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "invoices",
"outer_alias": "agov",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08063 | train |
v1 | Schema:
orders (alias: kab)(date, value, type, salary)
staff(amount, salary, value, level)
Task: Retrieve code from orders whose code is found in staff rows where status matches the outer record.
SQL: | SELECT code FROM orders AS kab
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08064 | train |
v1 | Schema:
orders (alias: kab)(amount, salary, type, value)
staff(value, code, id, level)
Task: Select code from orders where level exists in staff for the same level.
SQL: | SELECT code FROM orders AS kab
WHERE level IN (
SELECT level FROM staff AS xnob
WHERE xnob.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08065 | train |
v2 | Schema:
departments (alias: dov)(status, name, id, level)
regions(value, code, salary, status)
Task: Retrieve value from departments that have at least one corresponding entry in regions sharing the same status.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "regions",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08066 | train |
v3 | Schema:
categories (alias: egiv)(salary, level, name, date)
schedules(name, amount, status, salary)
Task: Find name from categories where value exceeds the maximum value from schedules for the same code.
SQL: | SELECT name FROM categories AS egiv
WHERE value > (
SELECT MAX(value) FROM schedules AS vmob
WHERE vmob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08067 | train |
v2 | Schema:
sales (alias: cif)(type, status, value, salary)
shipments(name, value, amount, salary)
Task: Find amount from sales where a matching record exists in shipments with the same code.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08068 | train |
v1 | Schema:
employees (alias: bev)(salary, name, type, id)
shipments(salary, name, code, value)
Task: Find amount from employees where id appears in shipments entries with matching id.
SQL: | SELECT amount FROM employees AS bev
WHERE id IN (
SELECT id FROM shipments AS vnob
WHERE vnob.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08069 | train |
v1 | Schema:
requests (alias: ejof)(value, name, amount, code)
staff(status, value, amount, code)
Task: Select value from requests where code exists in staff for the same status.
SQL: | SELECT value FROM requests AS ejof
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08070 | train |
v2 | Schema:
employees (alias: bev)(id, code, date, amount)
departments(level, value, name, salary)
Task: Find name from employees where a matching record exists in departments with the same id.
SQL: | SELECT name FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08071 | train |
v3 | Schema:
accounts (alias: jac)(value, amount, code, type)
schedules(status, code, amount, date)
Task: Find salary from accounts where salary exceeds the count of salary from schedules for the same id.
SQL: | SELECT salary FROM accounts AS jac
WHERE salary > (
SELECT COUNT(salary) FROM schedules AS vmob
WHERE vmob.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08072 | train |
v3 | Schema:
projects (alias: uliv)(salary, amount, level, code)
tasks(value, level, status, id)
Task: Find salary from projects where amount exceeds the count of value from tasks for the same id.
SQL: | SELECT salary FROM projects AS uliv
WHERE amount > (
SELECT COUNT(value) FROM tasks AS znob
WHERE znob.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08073 | train |
v3 | Schema:
employees (alias: bev)(date, name, value, code)
tasks(status, type, name, value)
Task: Retrieve salary from employees with salary above the SUM(amount) of tasks rows sharing the same code.
SQL: | SELECT salary FROM employees AS bev
WHERE salary > (
SELECT SUM(amount) FROM tasks AS znob
WHERE znob.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "tasks",
"outer_alias": "bev",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08074 | train |
v3 | Schema:
managers (alias: hac)(amount, code, name, date)
customers(status, code, amount, id)
Task: Find value from managers where amount exceeds the minimum value from customers for the same level.
SQL: | SELECT value FROM managers AS hac
WHERE amount > (
SELECT MIN(value) FROM customers AS lex
WHERE lex.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08075 | train |
v3 | Schema:
sales (alias: cif)(value, code, type, salary)
requests(amount, code, level, id)
Task: Find code from sales where amount exceeds the total value from requests for the same type.
SQL: | SELECT code FROM sales AS cif
WHERE amount > (
SELECT SUM(value) FROM requests AS ejof
WHERE ejof.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08076 | train |
v3 | Schema:
customers (alias: lex)(code, type, date, salary)
requests(value, amount, code, level)
Task: Retrieve name from customers with value above the MIN(salary) of requests rows sharing the same type.
SQL: | SELECT name FROM customers AS lex
WHERE value > (
SELECT MIN(salary) FROM requests AS ejof
WHERE ejof.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "lex",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08077 | train |
v2 | Schema:
schedules (alias: vmob)(type, date, value, status)
items(code, amount, id, date)
Task: Retrieve id from schedules that have at least one corresponding entry in items sharing the same type.
SQL: | SELECT id FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "items",
"outer_alias": "vmob",
"inner_alias": "ikob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08078 | train |
v3 | Schema:
branches (alias: agov)(amount, type, level, name)
projects(id, salary, level, status)
Task: Retrieve name from branches with salary above the SUM(value) of projects rows sharing the same id.
SQL: | SELECT name FROM branches AS agov
WHERE salary > (
SELECT SUM(value) FROM projects AS uliv
WHERE uliv.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "projects",
"outer_alias": "agov",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08079 | train |
v1 | Schema:
requests (alias: ejof)(date, name, type, code)
items(name, code, type, date)
Task: Find code from requests where level appears in items entries with matching type.
SQL: | SELECT code FROM requests AS ejof
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ejof",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08080 | train |
v2 | Schema:
branches (alias: agov)(amount, id, value, name)
requests(amount, id, name, value)
Task: Find value from branches where a matching record exists in requests with the same id.
SQL: | SELECT value FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "agov",
"inner_alias": "ejof",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08081 | train |
v3 | Schema:
products (alias: nad)(id, amount, name, salary)
regions(value, id, code, status)
Task: Find salary from products where value exceeds the count of value from regions for the same type.
SQL: | SELECT salary FROM products AS nad
WHERE value > (
SELECT COUNT(value) FROM regions AS okiv
WHERE okiv.type = nad.type
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08082 | train |
v1 | Schema:
regions (alias: okiv)(status, date, amount, level)
transactions(date, value, name, type)
Task: Find amount from regions where id appears in transactions entries with matching code.
SQL: | SELECT amount FROM regions AS okiv
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "transactions",
"outer_alias": "okiv",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08083 | train |
v3 | Schema:
departments (alias: dov)(type, level, value, code)
schedules(level, value, date, id)
Task: Find value from departments where value exceeds the count of value from schedules for the same type.
SQL: | SELECT value FROM departments AS dov
WHERE value > (
SELECT COUNT(value) FROM schedules AS vmob
WHERE vmob.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "schedules",
"outer_alias": "dov",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08084 | train |
v3 | Schema:
managers (alias: hac)(date, name, salary, value)
schedules(amount, name, status, type)
Task: Find amount from managers where salary exceeds the count of salary from schedules for the same level.
SQL: | SELECT amount FROM managers AS hac
WHERE salary > (
SELECT COUNT(salary) FROM schedules AS vmob
WHERE vmob.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "schedules",
"outer_alias": "hac",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08085 | train |
v1 | Schema:
requests (alias: ejof)(amount, status, date, salary)
transactions(value, name, salary, level)
Task: Select id from requests where id exists in transactions for the same level.
SQL: | SELECT id FROM requests AS ejof
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "transactions",
"outer_alias": "ejof",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08086 | train |
v1 | Schema:
staff (alias: xnob)(id, date, level, value)
tasks(amount, level, id, code)
Task: Find name from staff where status appears in tasks entries with matching code.
SQL: | SELECT name FROM staff AS xnob
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08087 | train |
v3 | Schema:
shipments (alias: vnob)(date, level, status, name)
requests(amount, status, code, date)
Task: Retrieve value from shipments with salary above the MAX(amount) of requests rows sharing the same status.
SQL: | SELECT value FROM shipments AS vnob
WHERE salary > (
SELECT MAX(amount) FROM requests AS ejof
WHERE ejof.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08088 | train |
v3 | Schema:
requests (alias: ejof)(level, amount, value, salary)
departments(code, type, status, name)
Task: Find id from requests where value exceeds the total salary from departments for the same code.
SQL: | SELECT id FROM requests AS ejof
WHERE value > (
SELECT SUM(salary) FROM departments AS dov
WHERE dov.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "departments",
"outer_alias": "ejof",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08089 | train |
v3 | Schema:
requests (alias: ejof)(status, amount, id, name)
orders(date, value, level, salary)
Task: Find id from requests where amount exceeds the minimum salary from orders for the same id.
SQL: | SELECT id FROM requests AS ejof
WHERE amount > (
SELECT MIN(salary) FROM orders AS kab
WHERE kab.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08090 | train |
v2 | Schema:
managers (alias: hac)(status, type, value, code)
requests(value, status, name, date)
Task: Find value from managers where a matching record exists in requests with the same code.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "requests",
"outer_alias": "hac",
"inner_alias": "ejof",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08091 | train |
v2 | Schema:
requests (alias: ejof)(salary, value, status, code)
employees(name, date, id, type)
Task: Retrieve value from requests that have at least one corresponding entry in employees sharing the same type.
SQL: | SELECT value FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08092 | train |
v2 | Schema:
customers (alias: lex)(name, value, code, level)
tasks(status, name, date, id)
Task: Find amount from customers where a matching record exists in tasks with 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_08093 | train |
v3 | Schema:
staff (alias: xnob)(value, name, id, status)
shipments(name, id, amount, salary)
Task: Find id from staff where amount exceeds the minimum value from shipments for the same type.
SQL: | SELECT id FROM staff AS xnob
WHERE amount > (
SELECT MIN(value) FROM shipments AS vnob
WHERE vnob.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "xnob",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08094 | train |
v3 | Schema:
requests (alias: ejof)(type, level, id, amount)
orders(value, status, id, amount)
Task: Retrieve amount from requests with salary above the MAX(amount) of orders rows sharing the same type.
SQL: | SELECT amount FROM requests AS ejof
WHERE salary > (
SELECT MAX(amount) FROM orders AS kab
WHERE kab.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08095 | train |
v1 | Schema:
customers (alias: lex)(level, id, value, name)
staff(date, value, name, code)
Task: Select code from customers where type exists in staff for the same code.
SQL: | SELECT code FROM customers AS lex
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08096 | train |
v1 | Schema:
projects (alias: uliv)(type, code, id, level)
categories(amount, salary, value, code)
Task: Find id from projects where id appears in categories entries with matching type.
SQL: | SELECT id FROM projects AS uliv
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08097 | train |
v3 | Schema:
schedules (alias: vmob)(id, type, value, level)
staff(date, status, code, type)
Task: Find amount from schedules where salary exceeds the total value from staff for the same status.
SQL: | SELECT amount FROM schedules AS vmob
WHERE salary > (
SELECT SUM(value) FROM staff AS xnob
WHERE xnob.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "staff",
"outer_alias": "vmob",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08098 | train |
v2 | Schema:
departments (alias: dov)(value, id, code, name)
customers(amount, date, level, value)
Task: Find amount from departments where a matching record exists in customers with the same code.
SQL: | SELECT amount FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "customers",
"outer_alias": "dov",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08099 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.