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 |
|---|---|---|---|---|---|---|
v1 | Schema:
accounts (alias: jac)(type, salary, date, value)
staff(type, salary, value, code)
Task: Retrieve amount from accounts whose status is found in staff rows where id matches the outer record.
SQL: | SELECT amount FROM accounts AS jac
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08400 | train |
v2 | Schema:
schedules (alias: vmob)(id, date, salary, amount)
transactions(type, status, amount, id)
Task: Find code from schedules where a matching record exists in transactions with the same type.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "transactions",
"outer_alias": "vmob",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08401 | train |
v1 | Schema:
orders (alias: kab)(status, code, date, type)
tasks(value, name, id, salary)
Task: Select salary from orders where level exists in tasks for the same id.
SQL: | SELECT salary FROM orders AS kab
WHERE level IN (
SELECT level FROM tasks AS znob
WHERE znob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "tasks",
"outer_alias": "kab",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08402 | train |
v3 | Schema:
managers (alias: hac)(value, amount, type, id)
employees(name, id, level, status)
Task: Find code from managers where salary exceeds the average salary from employees for the same level.
SQL: | SELECT code FROM managers AS hac
WHERE salary > (
SELECT AVG(salary) FROM employees AS bev
WHERE bev.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08403 | train |
v1 | Schema:
customers (alias: lex)(level, date, amount, value)
branches(name, status, value, level)
Task: Find name from customers where status appears in branches entries with matching code.
SQL: | SELECT name FROM customers AS lex
WHERE status IN (
SELECT status FROM branches AS agov
WHERE agov.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08404 | train |
v3 | Schema:
products (alias: nad)(value, level, name, code)
branches(status, code, name, id)
Task: Find salary from products where value exceeds the minimum amount from branches for the same type.
SQL: | SELECT salary FROM products AS nad
WHERE value > (
SELECT MIN(amount) FROM branches AS agov
WHERE agov.type = nad.type
); | {
"outer_table": "products",
"inner_table": "branches",
"outer_alias": "nad",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08405 | train |
v2 | Schema:
items (alias: ikob)(name, type, status, date)
shipments(value, date, id, status)
Task: Find value from items where a matching record exists in shipments with 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_08406 | train |
v2 | Schema:
accounts (alias: jac)(amount, date, status, value)
invoices(amount, id, salary, value)
Task: Find amount from accounts where a matching record exists in invoices with the same type.
SQL: | SELECT amount FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08407 | train |
v1 | Schema:
categories (alias: egiv)(salary, id, code, value)
schedules(code, name, salary, status)
Task: Retrieve code from categories whose status is found in schedules rows where id matches the outer record.
SQL: | SELECT code FROM categories AS egiv
WHERE status IN (
SELECT status FROM schedules AS vmob
WHERE vmob.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08408 | train |
v1 | Schema:
branches (alias: agov)(date, name, id, value)
sales(type, code, value, status)
Task: Select code from branches where type exists in sales for the same type.
SQL: | SELECT code FROM branches AS agov
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "sales",
"outer_alias": "agov",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08409 | train |
v1 | Schema:
shipments (alias: vnob)(date, status, id, code)
orders(id, date, code, level)
Task: Retrieve name from shipments whose id is found in orders rows where code matches the outer record.
SQL: | SELECT name FROM shipments AS vnob
WHERE id IN (
SELECT id FROM orders AS kab
WHERE kab.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08410 | train |
v3 | Schema:
requests (alias: ejof)(status, date, amount, name)
staff(code, value, level, date)
Task: Retrieve amount from requests with value above the COUNT(amount) of staff rows sharing the same status.
SQL: | SELECT amount FROM requests AS ejof
WHERE value > (
SELECT COUNT(amount) FROM staff AS xnob
WHERE xnob.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08411 | train |
v3 | Schema:
categories (alias: egiv)(level, code, status, amount)
invoices(salary, level, status, code)
Task: Retrieve name from categories with salary above the AVG(amount) of invoices rows sharing the same type.
SQL: | SELECT name FROM categories AS egiv
WHERE salary > (
SELECT AVG(amount) FROM invoices AS fal
WHERE fal.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08412 | train |
v2 | Schema:
transactions (alias: gev)(salary, value, level, status)
staff(id, status, name, amount)
Task: Find salary from transactions where a matching record exists in staff with the same status.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08413 | train |
v1 | Schema:
sales (alias: cif)(type, status, name, amount)
products(level, amount, status, code)
Task: Find salary from sales where id appears in products entries with matching status.
SQL: | SELECT salary FROM sales AS cif
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08414 | train |
v1 | Schema:
employees (alias: bev)(code, date, id, status)
projects(status, level, code, type)
Task: Find id from employees where id appears in projects entries with matching code.
SQL: | SELECT id FROM employees AS bev
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08415 | train |
v3 | Schema:
sales (alias: cif)(level, status, value, amount)
shipments(code, status, amount, value)
Task: Find salary from sales where value exceeds the count of amount from shipments for the same type.
SQL: | SELECT salary FROM sales AS cif
WHERE value > (
SELECT COUNT(amount) FROM shipments AS vnob
WHERE vnob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08416 | train |
v2 | Schema:
shipments (alias: vnob)(date, name, type, code)
transactions(status, type, date, salary)
Task: Retrieve id from shipments that have at least one corresponding entry in transactions sharing the same status.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08417 | train |
v1 | Schema:
customers (alias: lex)(date, level, code, type)
employees(status, code, name, salary)
Task: Select amount from customers where code exists in employees for the same level.
SQL: | SELECT amount FROM customers AS lex
WHERE code IN (
SELECT code FROM employees AS bev
WHERE bev.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "employees",
"outer_alias": "lex",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08418 | train |
v1 | Schema:
shipments (alias: vnob)(salary, code, value, status)
employees(id, salary, code, status)
Task: Find id from shipments where id appears in employees entries with matching level.
SQL: | SELECT id FROM shipments AS vnob
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "employees",
"outer_alias": "vnob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08419 | train |
v2 | Schema:
products (alias: nad)(amount, value, date, salary)
items(date, id, level, type)
Task: Find value from products where a matching record exists in items with the same code.
SQL: | SELECT value 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": "value",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08420 | train |
v3 | Schema:
managers (alias: hac)(level, value, type, date)
categories(name, type, date, id)
Task: Find code from managers where amount exceeds the maximum salary from categories for the same status.
SQL: | SELECT code FROM managers AS hac
WHERE amount > (
SELECT MAX(salary) FROM categories AS egiv
WHERE egiv.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08421 | train |
v1 | Schema:
sales (alias: cif)(level, name, salary, status)
staff(salary, status, level, date)
Task: Retrieve amount from sales whose level is found in staff rows where level matches the outer record.
SQL: | SELECT amount FROM sales AS cif
WHERE level IN (
SELECT level FROM staff AS xnob
WHERE xnob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "staff",
"outer_alias": "cif",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08422 | train |
v2 | Schema:
tasks (alias: znob)(id, salary, value, type)
customers(name, id, status, date)
Task: Retrieve value from tasks that have at least one corresponding entry in customers sharing the same level.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08423 | train |
v1 | Schema:
departments (alias: dov)(status, date, type, amount)
regions(type, level, value, status)
Task: Find code from departments where level appears in regions entries with matching status.
SQL: | SELECT code FROM departments AS dov
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "regions",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08424 | train |
v3 | Schema:
branches (alias: agov)(amount, name, salary, id)
staff(level, amount, status, code)
Task: Retrieve value from branches with salary above the MIN(salary) of staff rows sharing the same type.
SQL: | SELECT value FROM branches AS agov
WHERE salary > (
SELECT MIN(salary) FROM staff AS xnob
WHERE xnob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "staff",
"outer_alias": "agov",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08425 | train |
v2 | Schema:
branches (alias: agov)(id, level, amount, type)
tasks(salary, id, type, status)
Task: Find name from branches where a matching record exists in tasks with the same type.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "tasks",
"outer_alias": "agov",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08426 | train |
v1 | Schema:
managers (alias: hac)(type, amount, name, id)
employees(type, value, id, amount)
Task: Retrieve name from managers whose status is found in employees rows where id matches the outer record.
SQL: | SELECT name FROM managers AS hac
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08427 | train |
v2 | Schema:
tasks (alias: znob)(salary, code, id, amount)
accounts(name, level, amount, id)
Task: Find amount from tasks where a matching record exists in accounts with the same status.
SQL: | SELECT amount FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08428 | train |
v1 | Schema:
branches (alias: agov)(amount, id, status, salary)
departments(date, name, value, salary)
Task: Retrieve amount from branches whose status is found in departments rows where id matches the outer record.
SQL: | SELECT amount FROM branches AS agov
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "departments",
"outer_alias": "agov",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08429 | train |
v3 | Schema:
sales (alias: cif)(value, level, salary, status)
products(date, code, value, level)
Task: Retrieve value from sales with value above the MAX(salary) of products rows sharing the same status.
SQL: | SELECT value FROM sales AS cif
WHERE value > (
SELECT MAX(salary) FROM products AS nad
WHERE nad.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08430 | train |
v2 | Schema:
projects (alias: uliv)(status, level, type, salary)
managers(id, code, status, salary)
Task: Find value from projects where a matching record exists in managers with the same code.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "managers",
"outer_alias": "uliv",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08431 | train |
v3 | Schema:
customers (alias: lex)(value, amount, date, status)
employees(code, id, value, amount)
Task: Retrieve name from customers with amount above the MAX(value) of employees rows sharing the same status.
SQL: | SELECT name FROM customers AS lex
WHERE amount > (
SELECT MAX(value) FROM employees AS bev
WHERE bev.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "employees",
"outer_alias": "lex",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08432 | train |
v2 | Schema:
transactions (alias: gev)(salary, level, id, amount)
projects(status, level, salary, amount)
Task: Find value from transactions where a matching record exists in projects with the same status.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08433 | train |
v2 | Schema:
products (alias: nad)(code, date, type, value)
employees(salary, name, amount, type)
Task: Retrieve value from products that have at least one corresponding entry in employees sharing the same status.
SQL: | SELECT value FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.status = nad.status
); | {
"outer_table": "products",
"inner_table": "employees",
"outer_alias": "nad",
"inner_alias": "bev",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08434 | train |
v1 | Schema:
invoices (alias: fal)(amount, code, status, name)
sales(status, date, id, amount)
Task: Retrieve id from invoices whose level is found in sales rows where level matches the outer record.
SQL: | SELECT id FROM invoices AS fal
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "sales",
"outer_alias": "fal",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08435 | train |
v1 | Schema:
sales (alias: cif)(code, salary, date, type)
branches(salary, amount, status, value)
Task: Find salary from sales where level appears in branches entries with matching code.
SQL: | SELECT salary FROM sales AS cif
WHERE level IN (
SELECT level FROM branches AS agov
WHERE agov.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08436 | train |
v3 | Schema:
tasks (alias: znob)(value, name, level, code)
employees(value, id, type, code)
Task: Retrieve amount from tasks with salary above the COUNT(salary) of employees rows sharing the same level.
SQL: | SELECT amount FROM tasks AS znob
WHERE salary > (
SELECT COUNT(salary) FROM employees AS bev
WHERE bev.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08437 | train |
v1 | Schema:
invoices (alias: fal)(code, value, status, type)
employees(id, value, status, type)
Task: Retrieve code from invoices whose code is found in employees rows where status matches the outer record.
SQL: | SELECT code FROM invoices AS fal
WHERE code IN (
SELECT code FROM employees AS bev
WHERE bev.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08438 | train |
v2 | Schema:
invoices (alias: fal)(code, id, level, salary)
employees(level, status, value, id)
Task: Find amount from invoices where a matching record exists in employees with the same id.
SQL: | SELECT amount FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08439 | train |
v1 | Schema:
tasks (alias: znob)(level, salary, status, type)
sales(value, date, amount, code)
Task: Retrieve id from tasks whose level is found in sales rows where status matches the outer record.
SQL: | SELECT id FROM tasks AS znob
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08440 | train |
v3 | Schema:
sales (alias: cif)(amount, level, name, id)
tasks(id, code, name, amount)
Task: Retrieve code from sales with value above the AVG(salary) of tasks rows sharing the same level.
SQL: | SELECT code FROM sales AS cif
WHERE value > (
SELECT AVG(salary) FROM tasks AS znob
WHERE znob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "tasks",
"outer_alias": "cif",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08441 | train |
v2 | Schema:
customers (alias: lex)(salary, name, date, id)
sales(name, status, level, type)
Task: Find value from customers where a matching record exists in sales with the same id.
SQL: | SELECT value FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08442 | train |
v1 | Schema:
invoices (alias: fal)(date, salary, status, id)
orders(type, id, level, amount)
Task: Select code from invoices where level exists in orders for the same id.
SQL: | SELECT code FROM invoices AS fal
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08443 | train |
v3 | Schema:
categories (alias: egiv)(code, date, amount, type)
invoices(name, id, amount, date)
Task: Retrieve amount from categories with salary above the MAX(value) of invoices rows sharing the same type.
SQL: | SELECT amount FROM categories AS egiv
WHERE salary > (
SELECT MAX(value) FROM invoices AS fal
WHERE fal.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08444 | train |
v3 | Schema:
tasks (alias: znob)(name, salary, type, date)
employees(type, date, name, amount)
Task: Find code from tasks where salary exceeds the minimum amount from employees for the same code.
SQL: | SELECT code FROM tasks AS znob
WHERE salary > (
SELECT MIN(amount) FROM employees AS bev
WHERE bev.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08445 | train |
v3 | Schema:
requests (alias: ejof)(amount, code, level, status)
categories(name, level, salary, type)
Task: Retrieve code from requests with salary above the AVG(salary) of categories rows sharing the same type.
SQL: | SELECT code FROM requests AS ejof
WHERE salary > (
SELECT AVG(salary) FROM categories AS egiv
WHERE egiv.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08446 | train |
v2 | Schema:
branches (alias: agov)(level, code, amount, type)
orders(id, level, code, amount)
Task: Retrieve code from branches that have at least one corresponding entry in orders sharing the same type.
SQL: | SELECT code FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08447 | train |
v3 | Schema:
branches (alias: agov)(type, name, date, salary)
customers(status, salary, level, value)
Task: Find amount from branches where value exceeds the maximum amount from customers for the same type.
SQL: | SELECT amount FROM branches AS agov
WHERE value > (
SELECT MAX(amount) FROM customers AS lex
WHERE lex.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08448 | train |
v3 | Schema:
customers (alias: lex)(value, status, level, name)
projects(name, salary, status, value)
Task: Find salary from customers where amount exceeds the count of value from projects for the same id.
SQL: | SELECT salary FROM customers AS lex
WHERE amount > (
SELECT COUNT(value) FROM projects AS uliv
WHERE uliv.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08449 | train |
v3 | Schema:
items (alias: ikob)(id, salary, name, type)
schedules(status, amount, level, type)
Task: Find code from items where salary exceeds the count of salary from schedules for the same id.
SQL: | SELECT code FROM items AS ikob
WHERE salary > (
SELECT COUNT(salary) FROM schedules AS vmob
WHERE vmob.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_08450 | train |
v2 | Schema:
orders (alias: kab)(date, type, name, status)
requests(status, value, type, date)
Task: Find salary from orders where a matching record exists in requests with the same code.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "requests",
"outer_alias": "kab",
"inner_alias": "ejof",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08451 | train |
v2 | Schema:
categories (alias: egiv)(date, name, id, level)
requests(level, type, name, salary)
Task: Retrieve amount from categories that have at least one corresponding entry in requests sharing the same code.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08452 | train |
v1 | Schema:
requests (alias: ejof)(name, status, value, level)
tasks(value, name, amount, id)
Task: Select salary from requests where level exists in tasks for the same code.
SQL: | SELECT salary FROM requests AS ejof
WHERE level IN (
SELECT level FROM tasks AS znob
WHERE znob.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08453 | train |
v1 | Schema:
orders (alias: kab)(type, date, amount, salary)
sales(code, amount, salary, date)
Task: Select salary from orders where status exists in sales for the same type.
SQL: | SELECT salary FROM orders AS kab
WHERE status IN (
SELECT status FROM sales AS cif
WHERE cif.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "sales",
"outer_alias": "kab",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08454 | train |
v1 | Schema:
sales (alias: cif)(amount, type, salary, level)
items(value, salary, date, name)
Task: Retrieve salary from sales whose status is found in items rows where type matches the outer record.
SQL: | SELECT salary FROM sales AS cif
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08455 | train |
v2 | Schema:
sales (alias: cif)(salary, type, code, value)
tasks(salary, status, amount, date)
Task: Retrieve code from sales that have at least one corresponding entry in tasks sharing the same level.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "tasks",
"outer_alias": "cif",
"inner_alias": "znob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08456 | train |
v3 | Schema:
requests (alias: ejof)(id, code, salary, type)
items(name, status, code, date)
Task: Find id from requests where salary exceeds the maximum amount from items for the same type.
SQL: | SELECT id FROM requests AS ejof
WHERE salary > (
SELECT MAX(amount) FROM items AS ikob
WHERE ikob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ejof",
"inner_alias": "ikob",
"proj_col": "id",
"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_08457 | train |
v2 | Schema:
staff (alias: xnob)(code, status, value, id)
projects(type, id, salary, value)
Task: Find name from staff where a matching record exists in projects with the same level.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08458 | train |
v2 | Schema:
regions (alias: okiv)(amount, id, code, date)
employees(value, code, salary, status)
Task: Retrieve salary from regions that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "okiv",
"inner_alias": "bev",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08459 | train |
v1 | Schema:
employees (alias: bev)(value, code, date, id)
regions(type, id, level, date)
Task: Select amount from employees where code exists in regions for the same code.
SQL: | SELECT amount FROM employees AS bev
WHERE code IN (
SELECT code FROM regions AS okiv
WHERE okiv.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "regions",
"outer_alias": "bev",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08460 | train |
v1 | Schema:
regions (alias: okiv)(date, code, salary, level)
projects(value, type, name, id)
Task: Select name from regions where type exists in projects for the same level.
SQL: | SELECT name FROM regions AS okiv
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08461 | train |
v1 | Schema:
shipments (alias: vnob)(salary, status, value, code)
sales(salary, status, name, code)
Task: Retrieve name from shipments whose level is found in sales rows where code matches the outer record.
SQL: | SELECT name FROM shipments AS vnob
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08462 | train |
v2 | Schema:
invoices (alias: fal)(date, level, code, amount)
managers(level, code, name, value)
Task: Find amount from invoices where a matching record exists in managers with the same id.
SQL: | SELECT amount FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "managers",
"outer_alias": "fal",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08463 | train |
v2 | Schema:
transactions (alias: gev)(id, name, value, date)
shipments(value, level, date, status)
Task: Find id from transactions where a matching record exists in shipments with the same code.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "shipments",
"outer_alias": "gev",
"inner_alias": "vnob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08464 | train |
v2 | Schema:
regions (alias: okiv)(type, amount, status, value)
employees(name, id, type, level)
Task: Retrieve value from regions that have at least one corresponding entry in employees sharing the same type.
SQL: | SELECT value FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "okiv",
"inner_alias": "bev",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08465 | train |
v3 | Schema:
managers (alias: hac)(status, code, id, salary)
employees(type, salary, name, code)
Task: Retrieve code from managers with amount above the COUNT(value) of employees rows sharing the same code.
SQL: | SELECT code FROM managers AS hac
WHERE amount > (
SELECT COUNT(value) FROM employees AS bev
WHERE bev.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08466 | train |
v3 | Schema:
requests (alias: ejof)(code, salary, name, id)
branches(date, type, salary, code)
Task: Find value from requests where amount exceeds the total salary from branches for the same id.
SQL: | SELECT value FROM requests AS ejof
WHERE amount > (
SELECT SUM(salary) FROM branches AS agov
WHERE agov.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08467 | train |
v2 | Schema:
sales (alias: cif)(amount, value, status, salary)
products(type, name, code, level)
Task: Find id from sales where a matching record exists in products with the same level.
SQL: | SELECT id FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08468 | train |
v1 | Schema:
shipments (alias: vnob)(name, amount, id, value)
schedules(amount, code, salary, value)
Task: Retrieve value from shipments whose code is found in schedules rows where level matches the outer record.
SQL: | SELECT value FROM shipments AS vnob
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08469 | train |
v1 | Schema:
tasks (alias: znob)(date, level, type, salary)
departments(id, status, type, value)
Task: Retrieve name from tasks whose status is found in departments rows where code matches the outer record.
SQL: | SELECT name FROM tasks AS znob
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "departments",
"outer_alias": "znob",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08470 | train |
v3 | Schema:
regions (alias: okiv)(status, code, name, date)
items(date, amount, value, status)
Task: Retrieve amount from regions with salary above the AVG(salary) of items rows sharing the same level.
SQL: | SELECT amount FROM regions AS okiv
WHERE salary > (
SELECT AVG(salary) FROM items AS ikob
WHERE ikob.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "items",
"outer_alias": "okiv",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08471 | train |
v1 | Schema:
categories (alias: egiv)(date, amount, salary, level)
items(date, value, type, id)
Task: Find code from categories where level appears in items entries with matching code.
SQL: | SELECT code FROM categories AS egiv
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "items",
"outer_alias": "egiv",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08472 | train |
v1 | Schema:
managers (alias: hac)(id, name, salary, code)
items(type, amount, code, name)
Task: Retrieve id from managers whose code is found in items rows where code matches the outer record.
SQL: | SELECT id FROM managers AS hac
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08473 | train |
v1 | Schema:
requests (alias: ejof)(code, salary, name, level)
tasks(status, code, level, date)
Task: Retrieve code from requests whose type is found in tasks rows where status matches the outer record.
SQL: | SELECT code FROM requests AS ejof
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08474 | train |
v1 | Schema:
shipments (alias: vnob)(level, date, id, value)
customers(code, id, status, type)
Task: Select name from shipments where code exists in customers for the same type.
SQL: | SELECT name FROM shipments AS vnob
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08475 | train |
v3 | Schema:
departments (alias: dov)(code, level, salary, amount)
transactions(level, salary, type, value)
Task: Retrieve amount from departments with salary above the MIN(value) of transactions rows sharing the same id.
SQL: | SELECT amount FROM departments AS dov
WHERE salary > (
SELECT MIN(value) FROM transactions AS gev
WHERE gev.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08476 | train |
v2 | Schema:
categories (alias: egiv)(salary, type, date, value)
staff(salary, date, level, code)
Task: Find name from categories where a matching record exists in staff with the same status.
SQL: | SELECT name FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "egiv",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08477 | train |
v1 | Schema:
categories (alias: egiv)(code, amount, level, id)
branches(value, salary, code, name)
Task: Find name from categories where type appears in branches entries with matching status.
SQL: | SELECT name FROM categories AS egiv
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08478 | train |
v2 | Schema:
sales (alias: cif)(name, value, date, amount)
invoices(status, date, name, type)
Task: Retrieve name from sales that have at least one corresponding entry in invoices sharing the same level.
SQL: | SELECT name FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08479 | train |
v3 | Schema:
tasks (alias: znob)(name, level, status, type)
transactions(status, amount, code, name)
Task: Find id from tasks where value exceeds the maximum amount from transactions for the same level.
SQL: | SELECT id FROM tasks AS znob
WHERE value > (
SELECT MAX(amount) FROM transactions AS gev
WHERE gev.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08480 | train |
v2 | Schema:
accounts (alias: jac)(salary, status, value, amount)
items(value, amount, level, type)
Task: Retrieve salary from accounts that have at least one corresponding entry in items sharing the same status.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08481 | train |
v2 | Schema:
sales (alias: cif)(value, level, amount, type)
products(salary, value, name, level)
Task: Retrieve name from sales that have at least one corresponding entry in products sharing the same status.
SQL: | SELECT name FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08482 | train |
v3 | Schema:
sales (alias: cif)(id, level, status, amount)
invoices(salary, name, id, amount)
Task: Find amount from sales where amount exceeds the average amount from invoices for the same level.
SQL: | SELECT amount FROM sales AS cif
WHERE amount > (
SELECT AVG(amount) FROM invoices AS fal
WHERE fal.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08483 | train |
v2 | Schema:
projects (alias: uliv)(salary, amount, code, id)
accounts(date, salary, amount, value)
Task: Find name from projects where a matching record exists in accounts with the same status.
SQL: | SELECT name FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "accounts",
"outer_alias": "uliv",
"inner_alias": "jac",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08484 | train |
v3 | Schema:
products (alias: nad)(id, amount, date, name)
branches(name, type, status, date)
Task: Find amount from products where value exceeds the maximum amount from branches for the same status.
SQL: | SELECT amount FROM products AS nad
WHERE value > (
SELECT MAX(amount) FROM branches AS agov
WHERE agov.status = nad.status
); | {
"outer_table": "products",
"inner_table": "branches",
"outer_alias": "nad",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08485 | train |
v1 | Schema:
shipments (alias: vnob)(id, code, value, amount)
customers(status, id, salary, value)
Task: Retrieve code from shipments whose id is found in customers rows where status matches the outer record.
SQL: | SELECT code FROM shipments AS vnob
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08486 | train |
v2 | Schema:
categories (alias: egiv)(code, amount, salary, status)
customers(date, amount, type, code)
Task: Retrieve id from categories that have at least one corresponding entry in customers sharing the same status.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "customers",
"outer_alias": "egiv",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08487 | train |
v2 | Schema:
projects (alias: uliv)(value, level, id, name)
branches(id, status, type, salary)
Task: Retrieve name from projects that have at least one corresponding entry in branches sharing the same code.
SQL: | SELECT name FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "branches",
"outer_alias": "uliv",
"inner_alias": "agov",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08488 | train |
v3 | Schema:
orders (alias: kab)(type, salary, value, code)
regions(amount, salary, id, type)
Task: Find salary from orders where salary exceeds the average salary from regions for the same level.
SQL: | SELECT salary FROM orders AS kab
WHERE salary > (
SELECT AVG(salary) FROM regions AS okiv
WHERE okiv.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "regions",
"outer_alias": "kab",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08489 | train |
v1 | Schema:
regions (alias: okiv)(code, name, amount, salary)
schedules(code, amount, value, status)
Task: Retrieve salary from regions whose type is found in schedules rows where code matches the outer record.
SQL: | SELECT salary FROM regions AS okiv
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "schedules",
"outer_alias": "okiv",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08490 | train |
v1 | Schema:
schedules (alias: vmob)(date, level, type, id)
shipments(amount, type, date, value)
Task: Select value from schedules where level exists in shipments for the same id.
SQL: | SELECT value FROM schedules AS vmob
WHERE level IN (
SELECT level FROM shipments AS vnob
WHERE vnob.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08491 | train |
v2 | Schema:
schedules (alias: vmob)(code, name, value, date)
shipments(date, amount, salary, value)
Task: Retrieve name from schedules that have at least one corresponding entry in shipments sharing the same type.
SQL: | SELECT name FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08492 | train |
v1 | Schema:
accounts (alias: jac)(name, code, amount, status)
requests(amount, name, value, date)
Task: Select code from accounts where status exists in requests for the same type.
SQL: | SELECT code FROM accounts AS jac
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "requests",
"outer_alias": "jac",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08493 | train |
v1 | Schema:
tasks (alias: znob)(id, type, status, code)
sales(status, name, code, amount)
Task: Find code from tasks where id appears in sales entries with matching id.
SQL: | SELECT code FROM tasks AS znob
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08494 | train |
v1 | Schema:
customers (alias: lex)(date, type, value, level)
invoices(amount, id, type, name)
Task: Retrieve id from customers whose id is found in invoices rows where type matches the outer record.
SQL: | SELECT id FROM customers AS lex
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "lex",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08495 | train |
v2 | Schema:
schedules (alias: vmob)(code, date, type, salary)
categories(id, code, date, salary)
Task: Find salary from schedules where a matching record exists in categories with the same status.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08496 | train |
v3 | Schema:
items (alias: ikob)(amount, level, date, name)
customers(amount, code, salary, value)
Task: Retrieve amount from items with amount above the MIN(salary) of customers rows sharing the same status.
SQL: | SELECT amount FROM items AS ikob
WHERE amount > (
SELECT MIN(salary) FROM customers AS lex
WHERE lex.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_08497 | train |
v3 | Schema:
schedules (alias: vmob)(name, amount, type, level)
managers(value, id, date, status)
Task: Find code from schedules where salary exceeds the minimum value from managers for the same type.
SQL: | SELECT code FROM schedules AS vmob
WHERE salary > (
SELECT MIN(value) FROM managers AS hac
WHERE hac.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08498 | train |
v1 | Schema:
schedules (alias: vmob)(amount, type, status, level)
transactions(type, salary, status, level)
Task: Retrieve id from schedules whose level is found in transactions rows where code matches the outer record.
SQL: | SELECT id FROM schedules AS vmob
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "transactions",
"outer_alias": "vmob",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08499 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.