variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v2 | Schema:
categories (alias: egiv)(type, level, code, id)
invoices(code, status, salary, level)
Task: Find amount from categories where a matching record exists in invoices with the same type.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04400 | train |
v3 | Schema:
staff (alias: xnob)(date, name, type, status)
branches(status, name, value, date)
Task: Find amount from staff where value exceeds the average value from branches for the same code.
SQL: | SELECT amount FROM staff AS xnob
WHERE value > (
SELECT AVG(value) FROM branches AS agov
WHERE agov.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "branches",
"outer_alias": "xnob",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04401 | train |
v1 | Schema:
requests (alias: ejof)(level, name, salary, type)
tasks(name, level, type, amount)
Task: Select value from requests where code exists in tasks for the same code.
SQL: | SELECT value FROM requests AS ejof
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04402 | train |
v2 | Schema:
managers (alias: hac)(id, status, salary, name)
schedules(code, amount, level, value)
Task: Retrieve id from managers that have at least one corresponding entry in schedules sharing the same status.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "schedules",
"outer_alias": "hac",
"inner_alias": "vmob",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04403 | train |
v1 | Schema:
products (alias: nad)(code, amount, salary, level)
shipments(id, date, name, amount)
Task: Retrieve id from products whose code is found in shipments rows where status matches the outer record.
SQL: | SELECT id FROM products AS nad
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.status = nad.status
); | {
"outer_table": "products",
"inner_table": "shipments",
"outer_alias": "nad",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04404 | train |
v1 | Schema:
employees (alias: bev)(type, name, date, amount)
accounts(date, id, code, salary)
Task: Find amount from employees where id appears in accounts entries with matching code.
SQL: | SELECT amount FROM employees AS bev
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04405 | train |
v1 | Schema:
products (alias: nad)(code, value, name, salary)
requests(code, id, date, value)
Task: Select value from products where id exists in requests for the same code.
SQL: | SELECT value FROM products AS nad
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.code = nad.code
); | {
"outer_table": "products",
"inner_table": "requests",
"outer_alias": "nad",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04406 | train |
v3 | Schema:
tasks (alias: znob)(level, date, salary, name)
requests(salary, type, id, level)
Task: Find name from tasks where amount exceeds the minimum salary from requests for the same type.
SQL: | SELECT name FROM tasks AS znob
WHERE amount > (
SELECT MIN(salary) FROM requests AS ejof
WHERE ejof.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04407 | train |
v3 | Schema:
categories (alias: egiv)(name, amount, level, status)
regions(amount, status, type, id)
Task: Retrieve name from categories with salary above the AVG(salary) of regions rows sharing the same id.
SQL: | SELECT name FROM categories AS egiv
WHERE salary > (
SELECT AVG(salary) FROM regions AS okiv
WHERE okiv.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "regions",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04408 | train |
v1 | Schema:
departments (alias: dov)(name, type, value, code)
projects(type, name, date, status)
Task: Find value from departments where status appears in projects entries with matching type.
SQL: | SELECT value FROM departments AS dov
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "projects",
"outer_alias": "dov",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04409 | train |
v1 | Schema:
staff (alias: xnob)(type, id, status, amount)
projects(level, amount, value, date)
Task: Retrieve name from staff whose status is found in projects rows where code matches the outer record.
SQL: | SELECT name FROM staff AS xnob
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04410 | train |
v1 | Schema:
tasks (alias: znob)(code, type, salary, value)
invoices(level, id, date, salary)
Task: Retrieve salary from tasks whose status is found in invoices rows where type matches the outer record.
SQL: | SELECT salary FROM tasks AS znob
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04411 | train |
v3 | Schema:
departments (alias: dov)(code, salary, level, type)
invoices(date, amount, salary, value)
Task: Retrieve amount from departments with amount above the COUNT(value) of invoices rows sharing the same level.
SQL: | SELECT amount FROM departments AS dov
WHERE amount > (
SELECT COUNT(value) FROM invoices AS fal
WHERE fal.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04412 | train |
v2 | Schema:
departments (alias: dov)(value, name, salary, status)
transactions(date, value, code, salary)
Task: Retrieve amount from departments that have at least one corresponding entry in transactions sharing the same type.
SQL: | SELECT amount FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04413 | train |
v1 | Schema:
projects (alias: uliv)(status, code, date, name)
managers(salary, amount, type, date)
Task: Retrieve salary from projects whose code is found in managers rows where type matches the outer record.
SQL: | SELECT salary FROM projects AS uliv
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "managers",
"outer_alias": "uliv",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04414 | train |
v3 | Schema:
orders (alias: kab)(value, name, id, type)
products(amount, value, code, id)
Task: Find salary from orders where amount exceeds the minimum salary from products for the same type.
SQL: | SELECT salary FROM orders AS kab
WHERE amount > (
SELECT MIN(salary) FROM products AS nad
WHERE nad.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04415 | train |
v2 | Schema:
transactions (alias: gev)(code, value, status, name)
tasks(status, value, id, date)
Task: Find code from transactions where a matching record exists in tasks with the same id.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "tasks",
"outer_alias": "gev",
"inner_alias": "znob",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04416 | train |
v3 | Schema:
products (alias: nad)(amount, code, name, type)
categories(id, date, status, amount)
Task: Find code from products where amount exceeds the total value from categories for the same type.
SQL: | SELECT code FROM products AS nad
WHERE amount > (
SELECT SUM(value) FROM categories AS egiv
WHERE egiv.type = nad.type
); | {
"outer_table": "products",
"inner_table": "categories",
"outer_alias": "nad",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04417 | train |
v1 | Schema:
orders (alias: kab)(date, status, name, salary)
projects(code, salary, status, type)
Task: Retrieve id from orders whose id is found in projects rows where code matches the outer record.
SQL: | SELECT id FROM orders AS kab
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "projects",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04418 | train |
v3 | Schema:
sales (alias: cif)(name, code, type, status)
regions(name, id, value, date)
Task: Retrieve id from sales with value above the COUNT(salary) of regions rows sharing the same id.
SQL: | SELECT id FROM sales AS cif
WHERE value > (
SELECT COUNT(salary) FROM regions AS okiv
WHERE okiv.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04419 | train |
v1 | Schema:
customers (alias: lex)(value, date, amount, name)
invoices(date, id, code, status)
Task: Select salary from customers where code exists in invoices for the same status.
SQL: | SELECT salary FROM customers AS lex
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "lex",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04420 | train |
v2 | Schema:
items (alias: ikob)(status, date, level, type)
projects(date, salary, type, name)
Task: Retrieve id from items that have at least one corresponding entry in projects sharing the same status.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04421 | train |
v1 | Schema:
invoices (alias: fal)(value, code, amount, id)
customers(id, name, date, level)
Task: Select amount from invoices where code exists in customers for the same id.
SQL: | SELECT amount FROM invoices AS fal
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04422 | train |
v1 | Schema:
branches (alias: agov)(value, type, salary, code)
staff(id, type, salary, name)
Task: Find name from branches where code appears in staff entries with matching type.
SQL: | SELECT name FROM branches AS agov
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "staff",
"outer_alias": "agov",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04423 | train |
v2 | Schema:
staff (alias: xnob)(code, status, type, amount)
sales(level, salary, amount, type)
Task: Find id from staff where a matching record exists in sales with the same level.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "sales",
"outer_alias": "xnob",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04424 | train |
v3 | Schema:
items (alias: ikob)(name, code, id, type)
products(name, salary, date, id)
Task: Retrieve code from items with value above the AVG(salary) of products rows sharing the same id.
SQL: | SELECT code FROM items AS ikob
WHERE value > (
SELECT AVG(salary) FROM products AS nad
WHERE nad.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04425 | train |
v3 | Schema:
managers (alias: hac)(salary, id, type, status)
staff(status, salary, id, level)
Task: Find value from managers where amount exceeds the average salary from staff for the same type.
SQL: | SELECT value FROM managers AS hac
WHERE amount > (
SELECT AVG(salary) FROM staff AS xnob
WHERE xnob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "hac",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04426 | train |
v3 | Schema:
departments (alias: dov)(value, level, type, id)
requests(type, name, date, code)
Task: Retrieve amount from departments with amount above the AVG(value) of requests rows sharing the same code.
SQL: | SELECT amount FROM departments AS dov
WHERE amount > (
SELECT AVG(value) FROM requests AS ejof
WHERE ejof.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "requests",
"outer_alias": "dov",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04427 | train |
v2 | Schema:
categories (alias: egiv)(value, type, status, date)
staff(date, level, id, salary)
Task: Retrieve name from categories that have at least one corresponding entry in staff sharing the same type.
SQL: | SELECT name FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "egiv",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04428 | train |
v1 | Schema:
invoices (alias: fal)(id, code, salary, type)
staff(type, value, code, date)
Task: Select code from invoices where type exists in staff for the same status.
SQL: | SELECT code FROM invoices AS fal
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04429 | train |
v3 | Schema:
projects (alias: uliv)(code, id, value, level)
shipments(code, level, amount, date)
Task: Retrieve value from projects with salary above the SUM(amount) of shipments rows sharing the same level.
SQL: | SELECT value FROM projects AS uliv
WHERE salary > (
SELECT SUM(amount) FROM shipments AS vnob
WHERE vnob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "shipments",
"outer_alias": "uliv",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04430 | train |
v3 | Schema:
customers (alias: lex)(name, code, type, id)
managers(code, date, level, name)
Task: Retrieve code from customers with salary above the SUM(amount) of managers rows sharing the same code.
SQL: | SELECT code FROM customers AS lex
WHERE salary > (
SELECT SUM(amount) FROM managers AS hac
WHERE hac.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04431 | train |
v3 | Schema:
departments (alias: dov)(code, salary, id, level)
transactions(date, code, amount, value)
Task: Retrieve amount from departments with value above the MAX(value) of transactions rows sharing the same code.
SQL: | SELECT amount FROM departments AS dov
WHERE value > (
SELECT MAX(value) FROM transactions AS gev
WHERE gev.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04432 | train |
v3 | Schema:
invoices (alias: fal)(date, type, status, amount)
shipments(id, type, amount, name)
Task: Find amount from invoices where value exceeds the average value from shipments for the same id.
SQL: | SELECT amount FROM invoices AS fal
WHERE value > (
SELECT AVG(value) FROM shipments AS vnob
WHERE vnob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "fal",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04433 | train |
v2 | Schema:
shipments (alias: vnob)(status, code, name, date)
managers(id, type, salary, date)
Task: Retrieve name from shipments that have at least one corresponding entry in managers sharing the same code.
SQL: | SELECT name FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "managers",
"outer_alias": "vnob",
"inner_alias": "hac",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04434 | train |
v2 | Schema:
staff (alias: xnob)(date, value, name, code)
accounts(amount, status, level, value)
Task: Find code from staff where a matching record exists in accounts with the same type.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04435 | train |
v1 | Schema:
requests (alias: ejof)(code, level, status, date)
categories(level, id, code, name)
Task: Select id from requests where code exists in categories for the same code.
SQL: | SELECT id FROM requests AS ejof
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04436 | train |
v3 | Schema:
managers (alias: hac)(salary, id, code, value)
categories(salary, name, value, level)
Task: Retrieve salary from managers with amount above the MIN(amount) of categories rows sharing the same type.
SQL: | SELECT salary FROM managers AS hac
WHERE amount > (
SELECT MIN(amount) FROM categories AS egiv
WHERE egiv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04437 | train |
v3 | Schema:
staff (alias: xnob)(level, status, type, salary)
products(type, amount, value, name)
Task: Retrieve code from staff with amount above the MAX(amount) of products rows sharing the same level.
SQL: | SELECT code FROM staff AS xnob
WHERE amount > (
SELECT MAX(amount) FROM products AS nad
WHERE nad.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "products",
"outer_alias": "xnob",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04438 | train |
v1 | Schema:
sales (alias: cif)(status, salary, level, id)
departments(date, value, status, level)
Task: Retrieve amount from sales whose code is found in departments rows where type matches the outer record.
SQL: | SELECT amount FROM sales AS cif
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "departments",
"outer_alias": "cif",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04439 | train |
v1 | Schema:
shipments (alias: vnob)(value, type, date, code)
products(level, salary, id, status)
Task: Find amount from shipments where code appears in products entries with matching code.
SQL: | SELECT amount FROM shipments AS vnob
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "products",
"outer_alias": "vnob",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04440 | train |
v3 | Schema:
accounts (alias: jac)(value, code, status, name)
items(name, type, status, level)
Task: Find amount from accounts where value exceeds the count of salary from items for the same level.
SQL: | SELECT amount FROM accounts AS jac
WHERE value > (
SELECT COUNT(salary) FROM items AS ikob
WHERE ikob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04441 | train |
v2 | Schema:
projects (alias: uliv)(amount, type, level, date)
categories(date, name, amount, salary)
Task: Retrieve code from projects that have at least one corresponding entry in categories sharing the same status.
SQL: | SELECT code FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04442 | train |
v2 | Schema:
customers (alias: lex)(date, status, id, amount)
staff(name, status, value, amount)
Task: Find name from customers where a matching record exists in staff with the same level.
SQL: | SELECT name FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04443 | train |
v2 | Schema:
transactions (alias: gev)(amount, name, type, level)
categories(type, code, status, id)
Task: Retrieve amount from transactions that have at least one corresponding entry in categories sharing the same code.
SQL: | SELECT amount FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04444 | train |
v2 | Schema:
categories (alias: egiv)(date, name, value, type)
transactions(level, salary, type, amount)
Task: Find id from categories where a matching record exists in transactions with the same type.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "transactions",
"outer_alias": "egiv",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04445 | train |
v3 | Schema:
schedules (alias: vmob)(id, code, type, value)
managers(date, id, amount, code)
Task: Find code from schedules where salary exceeds the count of salary from managers for the same level.
SQL: | SELECT code FROM schedules AS vmob
WHERE salary > (
SELECT COUNT(salary) FROM managers AS hac
WHERE hac.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04446 | train |
v3 | Schema:
customers (alias: lex)(id, amount, code, date)
employees(salary, id, name, date)
Task: Retrieve value from customers with value above the AVG(value) of employees rows sharing the same level.
SQL: | SELECT value FROM customers AS lex
WHERE value > (
SELECT AVG(value) FROM employees AS bev
WHERE bev.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "employees",
"outer_alias": "lex",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04447 | train |
v1 | Schema:
invoices (alias: fal)(id, name, salary, amount)
accounts(id, value, status, type)
Task: Retrieve name from invoices whose id is found in accounts rows where code matches the outer record.
SQL: | SELECT name FROM invoices AS fal
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04448 | train |
v1 | Schema:
transactions (alias: gev)(level, type, id, value)
categories(code, id, salary, name)
Task: Select id from transactions where id exists in categories for the same level.
SQL: | SELECT id FROM transactions AS gev
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04449 | train |
v1 | Schema:
accounts (alias: jac)(salary, name, date, level)
regions(value, date, id, amount)
Task: Retrieve value from accounts whose code is found in regions rows where code matches the outer record.
SQL: | SELECT value FROM accounts AS jac
WHERE code IN (
SELECT code FROM regions AS okiv
WHERE okiv.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04450 | train |
v3 | Schema:
requests (alias: ejof)(id, date, name, salary)
staff(type, value, salary, code)
Task: Find value from requests where value exceeds the count of value from staff for the same code.
SQL: | SELECT value FROM requests AS ejof
WHERE value > (
SELECT COUNT(value) FROM staff AS xnob
WHERE xnob.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04451 | train |
v1 | Schema:
products (alias: nad)(name, date, value, code)
customers(date, name, code, status)
Task: Retrieve salary from products whose status is found in customers rows where level matches the outer record.
SQL: | SELECT salary FROM products AS nad
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.level = nad.level
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04452 | train |
v1 | Schema:
regions (alias: okiv)(amount, id, date, name)
categories(code, status, amount, level)
Task: Retrieve amount from regions whose status is found in categories rows where level matches the outer record.
SQL: | SELECT amount FROM regions AS okiv
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04453 | train |
v3 | Schema:
shipments (alias: vnob)(id, type, date, amount)
sales(date, status, value, salary)
Task: Find id from shipments where amount exceeds the minimum value from sales for the same status.
SQL: | SELECT id FROM shipments AS vnob
WHERE amount > (
SELECT MIN(value) FROM sales AS cif
WHERE cif.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04454 | train |
v1 | Schema:
transactions (alias: gev)(id, amount, type, value)
projects(value, type, id, status)
Task: Retrieve code from transactions whose level is found in projects rows where code matches the outer record.
SQL: | SELECT code FROM transactions AS gev
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04455 | train |
v1 | Schema:
staff (alias: xnob)(id, name, type, level)
projects(value, name, salary, code)
Task: Retrieve salary from staff whose type is found in projects rows where status matches the outer record.
SQL: | SELECT salary FROM staff AS xnob
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04456 | train |
v1 | Schema:
managers (alias: hac)(level, name, date, type)
customers(code, status, name, date)
Task: Select name from managers where type exists in customers for the same id.
SQL: | SELECT name FROM managers AS hac
WHERE type IN (
SELECT type FROM customers AS lex
WHERE lex.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04457 | train |
v3 | Schema:
managers (alias: hac)(salary, value, name, id)
departments(value, amount, level, name)
Task: Find amount from managers where amount exceeds the average salary from departments for the same id.
SQL: | SELECT amount FROM managers AS hac
WHERE amount > (
SELECT AVG(salary) FROM departments AS dov
WHERE dov.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "departments",
"outer_alias": "hac",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04458 | train |
v2 | Schema:
customers (alias: lex)(date, id, salary, type)
items(value, salary, status, id)
Task: Find amount from customers where a matching record exists in items with the same status.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04459 | train |
v3 | Schema:
shipments (alias: vnob)(date, amount, level, code)
regions(salary, name, level, amount)
Task: Find amount from shipments where value exceeds the minimum amount from regions for the same type.
SQL: | SELECT amount FROM shipments AS vnob
WHERE value > (
SELECT MIN(amount) FROM regions AS okiv
WHERE okiv.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04460 | train |
v2 | Schema:
transactions (alias: gev)(type, date, amount, salary)
accounts(id, level, value, amount)
Task: Retrieve amount from transactions that have at least one corresponding entry in accounts sharing the same type.
SQL: | SELECT amount FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "accounts",
"outer_alias": "gev",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04461 | train |
v1 | Schema:
sales (alias: cif)(name, code, date, level)
invoices(date, status, type, level)
Task: Find name from sales where type appears in invoices entries with matching status.
SQL: | SELECT name FROM sales AS cif
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04462 | train |
v1 | Schema:
accounts (alias: jac)(name, type, amount, id)
sales(level, id, name, status)
Task: Retrieve value from accounts whose id is found in sales rows where level matches the outer record.
SQL: | SELECT value FROM accounts AS jac
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04463 | train |
v1 | Schema:
items (alias: ikob)(value, salary, name, id)
sales(name, value, id, amount)
Task: Select code from items where level exists in sales for the same type.
SQL: | SELECT code FROM items AS ikob
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "sales",
"outer_alias": "ikob",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04464 | train |
v3 | Schema:
departments (alias: dov)(value, id, type, date)
sales(type, name, value, amount)
Task: Retrieve name from departments with value above the AVG(value) of sales rows sharing the same code.
SQL: | SELECT name FROM departments AS dov
WHERE value > (
SELECT AVG(value) FROM sales AS cif
WHERE cif.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04465 | train |
v3 | Schema:
schedules (alias: vmob)(status, id, code, name)
sales(id, code, name, amount)
Task: Find value from schedules where salary exceeds the maximum value from sales for the same level.
SQL: | SELECT value FROM schedules AS vmob
WHERE salary > (
SELECT MAX(value) FROM sales AS cif
WHERE cif.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04466 | train |
v2 | Schema:
orders (alias: kab)(level, status, salary, date)
categories(amount, status, code, date)
Task: Retrieve id from orders that have at least one corresponding entry in categories sharing the same type.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04467 | train |
v1 | Schema:
branches (alias: agov)(code, type, level, status)
customers(status, name, value, level)
Task: Find id from branches where code appears in customers entries with matching level.
SQL: | SELECT id FROM branches AS agov
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04468 | train |
v1 | Schema:
sales (alias: cif)(id, salary, value, level)
orders(value, name, code, level)
Task: Find id from sales where code appears in orders entries with matching type.
SQL: | SELECT id FROM sales AS cif
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "orders",
"outer_alias": "cif",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04469 | train |
v1 | Schema:
accounts (alias: jac)(salary, id, status, date)
employees(code, value, status, id)
Task: Select name from accounts where status exists in employees for the same id.
SQL: | SELECT name FROM accounts AS jac
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04470 | train |
v3 | Schema:
employees (alias: bev)(code, status, type, name)
accounts(amount, name, type, status)
Task: Find id from employees where value exceeds the average salary from accounts for the same code.
SQL: | SELECT id FROM employees AS bev
WHERE value > (
SELECT AVG(salary) FROM accounts AS jac
WHERE jac.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04471 | train |
v3 | Schema:
categories (alias: egiv)(status, id, value, date)
regions(value, type, code, level)
Task: Find id from categories where value exceeds the average salary from regions for the same id.
SQL: | SELECT id FROM categories AS egiv
WHERE value > (
SELECT AVG(salary) FROM regions AS okiv
WHERE okiv.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "regions",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04472 | train |
v2 | Schema:
branches (alias: agov)(id, salary, value, type)
requests(id, name, code, status)
Task: Find amount from branches where a matching record exists in requests with the same type.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "agov",
"inner_alias": "ejof",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04473 | train |
v1 | Schema:
employees (alias: bev)(type, value, level, salary)
managers(code, status, type, level)
Task: Select code from employees where code exists in managers for the same code.
SQL: | SELECT code FROM employees AS bev
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "managers",
"outer_alias": "bev",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04474 | train |
v2 | Schema:
sales (alias: cif)(date, level, code, value)
transactions(date, name, salary, code)
Task: Retrieve code from sales that have at least one corresponding entry in transactions sharing the same level.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04475 | train |
v3 | Schema:
sales (alias: cif)(status, type, id, date)
requests(name, status, amount, level)
Task: Retrieve amount from sales with amount above the MAX(value) of requests rows sharing the same code.
SQL: | SELECT amount FROM sales AS cif
WHERE amount > (
SELECT MAX(value) FROM requests AS ejof
WHERE ejof.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04476 | train |
v3 | Schema:
accounts (alias: jac)(amount, date, code, name)
staff(status, value, id, level)
Task: Find code from accounts where salary exceeds the minimum salary from staff for the same type.
SQL: | SELECT code FROM accounts AS jac
WHERE salary > (
SELECT MIN(salary) FROM staff AS xnob
WHERE xnob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04477 | train |
v3 | Schema:
categories (alias: egiv)(name, id, level, value)
requests(amount, code, id, level)
Task: Find salary from categories where value exceeds the maximum value from requests for the same level.
SQL: | SELECT salary FROM categories AS egiv
WHERE value > (
SELECT MAX(value) FROM requests AS ejof
WHERE ejof.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04478 | train |
v2 | Schema:
schedules (alias: vmob)(amount, value, date, salary)
customers(id, value, type, date)
Task: Retrieve code from schedules that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04479 | train |
v2 | Schema:
accounts (alias: jac)(date, id, code, name)
sales(salary, amount, type, name)
Task: Find salary from accounts where a matching record exists in sales with the same code.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04480 | train |
v1 | Schema:
products (alias: nad)(value, status, name, id)
categories(value, name, date, code)
Task: Select amount from products where id exists in categories for the same type.
SQL: | SELECT amount FROM products AS nad
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.type = nad.type
); | {
"outer_table": "products",
"inner_table": "categories",
"outer_alias": "nad",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04481 | train |
v3 | Schema:
tasks (alias: znob)(id, code, level, value)
schedules(level, date, name, value)
Task: Retrieve code from tasks with salary above the MIN(value) of schedules rows sharing the same id.
SQL: | SELECT code FROM tasks AS znob
WHERE salary > (
SELECT MIN(value) FROM schedules AS vmob
WHERE vmob.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "schedules",
"outer_alias": "znob",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04482 | train |
v3 | Schema:
employees (alias: bev)(type, level, name, status)
accounts(id, date, value, salary)
Task: Retrieve id from employees with amount above the MIN(amount) of accounts rows sharing the same type.
SQL: | SELECT id FROM employees AS bev
WHERE amount > (
SELECT MIN(amount) FROM accounts AS jac
WHERE jac.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04483 | train |
v1 | Schema:
orders (alias: kab)(code, amount, id, salary)
branches(code, name, status, salary)
Task: Find amount from orders where id appears in branches entries with matching level.
SQL: | SELECT amount FROM orders AS kab
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04484 | train |
v3 | Schema:
items (alias: ikob)(name, date, id, status)
branches(status, value, name, code)
Task: Find amount from items where amount exceeds the average value from branches for the same id.
SQL: | SELECT amount FROM items AS ikob
WHERE amount > (
SELECT AVG(value) FROM branches AS agov
WHERE agov.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "ikob",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04485 | train |
v3 | Schema:
products (alias: nad)(name, status, salary, amount)
tasks(level, amount, date, code)
Task: Find id from products where value exceeds the total value from tasks for the same code.
SQL: | SELECT id FROM products AS nad
WHERE value > (
SELECT SUM(value) FROM tasks AS znob
WHERE znob.code = nad.code
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "nad",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04486 | train |
v3 | Schema:
shipments (alias: vnob)(status, value, date, name)
accounts(name, type, value, amount)
Task: Find salary from shipments where salary exceeds the maximum salary from accounts for the same level.
SQL: | SELECT salary FROM shipments AS vnob
WHERE salary > (
SELECT MAX(salary) FROM accounts AS jac
WHERE jac.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04487 | train |
v2 | Schema:
accounts (alias: jac)(name, salary, status, value)
schedules(name, level, status, type)
Task: Find value from accounts where a matching record exists in schedules with the same code.
SQL: | SELECT value FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04488 | train |
v2 | Schema:
products (alias: nad)(id, code, name, status)
transactions(status, id, date, type)
Task: Retrieve salary from products that have at least one corresponding entry in transactions sharing the same code.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = nad.code
); | {
"outer_table": "products",
"inner_table": "transactions",
"outer_alias": "nad",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04489 | train |
v3 | Schema:
transactions (alias: gev)(date, code, type, value)
requests(value, name, date, status)
Task: Find name from transactions where value exceeds the total value from requests for the same code.
SQL: | SELECT name FROM transactions AS gev
WHERE value > (
SELECT SUM(value) FROM requests AS ejof
WHERE ejof.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04490 | train |
v3 | Schema:
staff (alias: xnob)(value, date, amount, level)
products(type, salary, date, id)
Task: Find id from staff where amount exceeds the minimum amount from products for the same level.
SQL: | SELECT id FROM staff AS xnob
WHERE amount > (
SELECT MIN(amount) FROM products AS nad
WHERE nad.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "products",
"outer_alias": "xnob",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04491 | train |
v2 | Schema:
transactions (alias: gev)(value, id, type, name)
staff(id, amount, type, salary)
Task: Find salary from transactions where a matching record exists in staff with the same code.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04492 | train |
v3 | Schema:
shipments (alias: vnob)(amount, date, id, code)
managers(level, amount, code, salary)
Task: Find value from shipments where amount exceeds the count of value from managers for the same level.
SQL: | SELECT value FROM shipments AS vnob
WHERE amount > (
SELECT COUNT(value) FROM managers AS hac
WHERE hac.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "managers",
"outer_alias": "vnob",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04493 | train |
v2 | Schema:
invoices (alias: fal)(code, type, date, id)
regions(code, date, value, name)
Task: Find amount from invoices where a matching record exists in regions with the same status.
SQL: | SELECT amount FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "regions",
"outer_alias": "fal",
"inner_alias": "okiv",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04494 | train |
v1 | Schema:
invoices (alias: fal)(value, salary, date, type)
accounts(id, amount, code, name)
Task: Select value from invoices where id exists in accounts for the same status.
SQL: | SELECT value FROM invoices AS fal
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04495 | train |
v2 | Schema:
departments (alias: dov)(name, type, code, amount)
employees(level, amount, status, salary)
Task: Retrieve code from departments that have at least one corresponding entry in employees sharing the same level.
SQL: | SELECT code FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "employees",
"outer_alias": "dov",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04496 | train |
v2 | Schema:
shipments (alias: vnob)(salary, level, code, type)
items(amount, type, level, status)
Task: Find value from shipments where a matching record exists in items with the same code.
SQL: | SELECT value FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "items",
"outer_alias": "vnob",
"inner_alias": "ikob",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04497 | train |
v1 | Schema:
categories (alias: egiv)(value, status, salary, level)
projects(date, type, level, id)
Task: Retrieve salary from categories whose status is found in projects rows where status matches the outer record.
SQL: | SELECT salary FROM categories AS egiv
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04498 | train |
v2 | Schema:
departments (alias: dov)(id, type, status, level)
categories(id, name, type, code)
Task: Retrieve salary from departments that have at least one corresponding entry in categories sharing the same type.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04499 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.