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:
orders (alias: kab)(date, name, status, value)
projects(date, name, value, salary)
Task: Select value from orders where status exists in projects for the same code.
SQL: | SELECT value FROM orders AS kab
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "projects",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05400 | train |
v2 | Schema:
employees (alias: bev)(value, id, code, amount)
requests(code, value, salary, type)
Task: Find id from employees where a matching record exists in requests with the same id.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "requests",
"outer_alias": "bev",
"inner_alias": "ejof",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05401 | train |
v1 | Schema:
invoices (alias: fal)(code, value, name, salary)
transactions(date, salary, status, level)
Task: Select salary from invoices where type exists in transactions for the same code.
SQL: | SELECT salary FROM invoices AS fal
WHERE type IN (
SELECT type FROM transactions AS gev
WHERE gev.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05402 | train |
v2 | Schema:
projects (alias: uliv)(name, type, code, amount)
staff(amount, type, date, value)
Task: Retrieve salary from projects that have at least one corresponding entry in staff sharing the same status.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05403 | train |
v1 | Schema:
items (alias: ikob)(status, amount, date, code)
staff(status, name, id, level)
Task: Retrieve amount from items whose status is found in staff rows where status matches the outer record.
SQL: | SELECT amount FROM items AS ikob
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05404 | train |
v3 | Schema:
customers (alias: lex)(status, value, level, amount)
sales(amount, level, id, code)
Task: Find id from customers where amount exceeds the average amount from sales for the same code.
SQL: | SELECT id FROM customers AS lex
WHERE amount > (
SELECT AVG(amount) FROM sales AS cif
WHERE cif.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05405 | train |
v3 | Schema:
managers (alias: hac)(status, type, salary, code)
products(type, code, salary, date)
Task: Find value from managers where value exceeds the maximum amount from products for the same id.
SQL: | SELECT value FROM managers AS hac
WHERE value > (
SELECT MAX(amount) FROM products AS nad
WHERE nad.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "products",
"outer_alias": "hac",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05406 | train |
v3 | Schema:
schedules (alias: vmob)(status, level, salary, value)
requests(amount, date, id, name)
Task: Find name from schedules where value exceeds the count of salary from requests for the same id.
SQL: | SELECT name FROM schedules AS vmob
WHERE value > (
SELECT COUNT(salary) FROM requests AS ejof
WHERE ejof.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "requests",
"outer_alias": "vmob",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05407 | train |
v3 | Schema:
transactions (alias: gev)(name, salary, level, value)
products(amount, name, date, level)
Task: Find salary from transactions where value exceeds the maximum amount from products for the same type.
SQL: | SELECT salary FROM transactions AS gev
WHERE value > (
SELECT MAX(amount) FROM products AS nad
WHERE nad.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "gev",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05408 | train |
v1 | Schema:
managers (alias: hac)(name, salary, id, type)
accounts(amount, status, id, level)
Task: Select id from managers where status exists in accounts for the same level.
SQL: | SELECT id FROM managers AS hac
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "accounts",
"outer_alias": "hac",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05409 | train |
v3 | Schema:
projects (alias: uliv)(id, salary, type, status)
customers(id, salary, status, code)
Task: Retrieve id from projects with value above the COUNT(value) of customers rows sharing the same id.
SQL: | SELECT id FROM projects AS uliv
WHERE value > (
SELECT COUNT(value) FROM customers AS lex
WHERE lex.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "customers",
"outer_alias": "uliv",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05410 | train |
v2 | Schema:
staff (alias: xnob)(date, level, type, amount)
accounts(level, id, code, name)
Task: Retrieve code from staff that have at least one corresponding entry in accounts sharing the same status.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05411 | train |
v2 | Schema:
products (alias: nad)(date, type, id, name)
regions(status, type, value, code)
Task: Find name from products where a matching record exists in regions with the same id.
SQL: | SELECT name FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = nad.id
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05412 | train |
v3 | Schema:
items (alias: ikob)(id, code, amount, type)
transactions(level, status, name, amount)
Task: Find salary from items where salary exceeds the count of amount from transactions for the same status.
SQL: | SELECT salary FROM items AS ikob
WHERE salary > (
SELECT COUNT(amount) FROM transactions AS gev
WHERE gev.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "transactions",
"outer_alias": "ikob",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05413 | train |
v3 | Schema:
accounts (alias: jac)(level, status, code, date)
items(status, code, id, level)
Task: Find value from accounts where value exceeds the minimum value from items for the same code.
SQL: | SELECT value FROM accounts AS jac
WHERE value > (
SELECT MIN(value) FROM items AS ikob
WHERE ikob.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05414 | train |
v3 | Schema:
projects (alias: uliv)(amount, date, status, code)
sales(level, status, value, amount)
Task: Retrieve code from projects with value above the COUNT(amount) of sales rows sharing the same status.
SQL: | SELECT code FROM projects AS uliv
WHERE value > (
SELECT COUNT(amount) FROM sales AS cif
WHERE cif.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05415 | train |
v1 | Schema:
customers (alias: lex)(id, salary, status, type)
staff(status, name, salary, amount)
Task: Find value from customers where code appears in staff entries with matching id.
SQL: | SELECT value FROM customers AS lex
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05416 | train |
v1 | Schema:
transactions (alias: gev)(amount, salary, name, code)
categories(salary, amount, code, type)
Task: Retrieve id from transactions whose status is found in categories rows where status matches the outer record.
SQL: | SELECT id FROM transactions AS gev
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05417 | train |
v1 | Schema:
customers (alias: lex)(code, status, level, amount)
branches(name, level, code, date)
Task: Select amount from customers where code exists in branches for the same code.
SQL: | SELECT amount FROM customers AS lex
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05418 | train |
v2 | Schema:
managers (alias: hac)(name, status, value, salary)
transactions(status, salary, id, code)
Task: Find id from managers where a matching record exists in transactions with the same code.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05419 | train |
v2 | Schema:
sales (alias: cif)(code, amount, status, name)
branches(value, name, id, salary)
Task: Retrieve code from sales that have at least one corresponding entry in branches sharing the same type.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05420 | train |
v1 | Schema:
tasks (alias: znob)(level, status, amount, code)
products(date, id, amount, code)
Task: Find salary from tasks where code appears in products entries with matching code.
SQL: | SELECT salary FROM tasks AS znob
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05421 | train |
v2 | Schema:
categories (alias: egiv)(date, status, value, name)
requests(id, level, code, amount)
Task: Retrieve id from categories that have at least one corresponding entry in requests sharing the same status.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05422 | train |
v2 | Schema:
shipments (alias: vnob)(status, level, salary, name)
managers(id, level, salary, status)
Task: Find value from shipments where a matching record exists in managers with the same id.
SQL: | SELECT value FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "managers",
"outer_alias": "vnob",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05423 | train |
v2 | Schema:
shipments (alias: vnob)(level, salary, id, type)
accounts(type, code, amount, name)
Task: Find code from shipments where a matching record exists in accounts with the same type.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05424 | train |
v1 | Schema:
projects (alias: uliv)(type, amount, value, date)
orders(code, id, date, salary)
Task: Select code from projects where type exists in orders for the same code.
SQL: | SELECT code FROM projects AS uliv
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "orders",
"outer_alias": "uliv",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05425 | train |
v3 | Schema:
staff (alias: xnob)(code, id, name, status)
departments(name, date, amount, status)
Task: Retrieve amount from staff with value above the AVG(salary) of departments rows sharing the same id.
SQL: | SELECT amount FROM staff AS xnob
WHERE value > (
SELECT AVG(salary) FROM departments AS dov
WHERE dov.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05426 | train |
v1 | Schema:
customers (alias: lex)(salary, type, date, amount)
managers(amount, name, code, id)
Task: Retrieve id from customers whose status is found in managers rows where id matches the outer record.
SQL: | SELECT id FROM customers AS lex
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05427 | train |
v3 | Schema:
requests (alias: ejof)(type, date, salary, id)
sales(status, value, date, salary)
Task: Find amount from requests where value exceeds the count of value from sales for the same status.
SQL: | SELECT amount FROM requests AS ejof
WHERE value > (
SELECT COUNT(value) FROM sales AS cif
WHERE cif.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05428 | train |
v1 | Schema:
regions (alias: okiv)(date, amount, level, type)
tasks(type, amount, salary, date)
Task: Find value from regions where type appears in tasks entries with matching status.
SQL: | SELECT value FROM regions AS okiv
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05429 | train |
v3 | Schema:
tasks (alias: znob)(code, status, id, amount)
transactions(type, amount, id, name)
Task: Find amount from tasks where salary exceeds the total salary from transactions for the same level.
SQL: | SELECT amount FROM tasks AS znob
WHERE salary > (
SELECT SUM(salary) FROM transactions AS gev
WHERE gev.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05430 | train |
v1 | Schema:
schedules (alias: vmob)(code, name, status, type)
staff(code, status, value, type)
Task: Select id from schedules where id exists in staff for the same code.
SQL: | SELECT id FROM schedules AS vmob
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "staff",
"outer_alias": "vmob",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05431 | train |
v3 | Schema:
branches (alias: agov)(code, amount, date, name)
departments(amount, code, id, name)
Task: Find code from branches where salary exceeds the total value from departments for the same id.
SQL: | SELECT code FROM branches AS agov
WHERE salary > (
SELECT SUM(value) FROM departments AS dov
WHERE dov.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "departments",
"outer_alias": "agov",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05432 | train |
v1 | Schema:
employees (alias: bev)(status, name, level, salary)
schedules(code, salary, name, date)
Task: Select id from employees where type exists in schedules for the same status.
SQL: | SELECT id FROM employees AS bev
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "schedules",
"outer_alias": "bev",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05433 | train |
v2 | Schema:
products (alias: nad)(salary, id, name, value)
sales(amount, date, code, value)
Task: Retrieve id from products that have at least one corresponding entry in sales sharing the same type.
SQL: | SELECT id FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = nad.type
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "nad",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05434 | train |
v1 | Schema:
staff (alias: xnob)(amount, value, level, type)
accounts(status, level, date, salary)
Task: Find salary from staff where code appears in accounts entries with matching code.
SQL: | SELECT salary FROM staff AS xnob
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05435 | train |
v2 | Schema:
sales (alias: cif)(type, date, level, name)
schedules(salary, type, date, id)
Task: Find value from sales where a matching record exists in schedules with the same code.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "schedules",
"outer_alias": "cif",
"inner_alias": "vmob",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05436 | train |
v3 | Schema:
regions (alias: okiv)(name, amount, salary, date)
categories(level, name, status, salary)
Task: Find code from regions where value exceeds the average amount from categories for the same status.
SQL: | SELECT code FROM regions AS okiv
WHERE value > (
SELECT AVG(amount) FROM categories AS egiv
WHERE egiv.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05437 | train |
v1 | Schema:
customers (alias: lex)(value, status, salary, code)
managers(date, salary, name, level)
Task: Find code from customers where level appears in managers entries with matching level.
SQL: | SELECT code FROM customers AS lex
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05438 | train |
v2 | Schema:
sales (alias: cif)(name, status, date, value)
transactions(date, id, status, level)
Task: Find salary from sales where a matching record exists in transactions with the same type.
SQL: | SELECT salary FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05439 | train |
v3 | Schema:
sales (alias: cif)(value, level, salary, amount)
categories(value, status, salary, id)
Task: Find salary from sales where value exceeds the count of value from categories for the same type.
SQL: | SELECT salary FROM sales AS cif
WHERE value > (
SELECT COUNT(value) FROM categories AS egiv
WHERE egiv.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05440 | train |
v1 | Schema:
shipments (alias: vnob)(date, amount, type, id)
tasks(level, code, salary, date)
Task: Retrieve code from shipments whose status is found in tasks rows where type matches the outer record.
SQL: | SELECT code FROM shipments AS vnob
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "tasks",
"outer_alias": "vnob",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05441 | train |
v2 | Schema:
departments (alias: dov)(code, salary, name, type)
transactions(code, amount, name, salary)
Task: Retrieve name from departments that have at least one corresponding entry in transactions sharing the same id.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05442 | train |
v2 | Schema:
schedules (alias: vmob)(name, type, amount, status)
categories(level, date, code, name)
Task: Find id from schedules where a matching record exists in categories with the same status.
SQL: | SELECT id 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": "id",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05443 | train |
v3 | Schema:
branches (alias: agov)(salary, amount, level, date)
accounts(type, code, id, level)
Task: Find salary from branches where value exceeds the maximum amount from accounts for the same type.
SQL: | SELECT salary FROM branches AS agov
WHERE value > (
SELECT MAX(amount) FROM accounts AS jac
WHERE jac.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "salary",
"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_05444 | train |
v3 | Schema:
orders (alias: kab)(date, type, code, salary)
regions(amount, status, code, level)
Task: Retrieve amount from orders with amount above the MIN(amount) of regions rows sharing the same id.
SQL: | SELECT amount FROM orders AS kab
WHERE amount > (
SELECT MIN(amount) FROM regions AS okiv
WHERE okiv.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "regions",
"outer_alias": "kab",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05445 | train |
v3 | Schema:
sales (alias: cif)(type, amount, status, id)
customers(date, salary, status, level)
Task: Retrieve salary from sales with amount above the SUM(salary) of customers rows sharing the same id.
SQL: | SELECT salary FROM sales AS cif
WHERE amount > (
SELECT SUM(salary) FROM customers AS lex
WHERE lex.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "cif",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05446 | train |
v3 | Schema:
items (alias: ikob)(id, code, amount, name)
requests(status, type, code, date)
Task: Retrieve amount from items with salary above the AVG(salary) of requests rows sharing the same code.
SQL: | SELECT amount FROM items AS ikob
WHERE salary > (
SELECT AVG(salary) FROM requests AS ejof
WHERE ejof.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "ikob",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05447 | train |
v2 | Schema:
shipments (alias: vnob)(type, value, level, date)
schedules(code, id, level, name)
Task: Find id from shipments where a matching record exists in schedules with the same level.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05448 | train |
v3 | Schema:
transactions (alias: gev)(level, date, code, value)
departments(id, date, type, level)
Task: Find salary from transactions where amount exceeds the count of value from departments for the same status.
SQL: | SELECT salary FROM transactions AS gev
WHERE amount > (
SELECT COUNT(value) FROM departments AS dov
WHERE dov.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05449 | train |
v1 | Schema:
items (alias: ikob)(code, status, amount, level)
projects(date, status, level, name)
Task: Retrieve code from items whose id is found in projects rows where level matches the outer record.
SQL: | SELECT code FROM items AS ikob
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05450 | train |
v2 | Schema:
staff (alias: xnob)(name, amount, code, level)
projects(status, amount, code, value)
Task: Find salary from staff where a matching record exists in projects with the same id.
SQL: | SELECT salary FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05451 | train |
v2 | Schema:
shipments (alias: vnob)(code, id, level, status)
accounts(status, level, date, salary)
Task: Find id from shipments where a matching record exists in accounts with the same type.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05452 | train |
v3 | Schema:
invoices (alias: fal)(date, status, code, type)
categories(name, code, date, salary)
Task: Find code from invoices where amount exceeds the minimum amount from categories for the same code.
SQL: | SELECT code FROM invoices AS fal
WHERE amount > (
SELECT MIN(amount) FROM categories AS egiv
WHERE egiv.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05453 | train |
v2 | Schema:
requests (alias: ejof)(type, date, code, status)
accounts(level, name, date, id)
Task: Retrieve amount from requests that have at least one corresponding entry in accounts sharing the same level.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05454 | train |
v1 | Schema:
categories (alias: egiv)(amount, code, id, type)
accounts(amount, salary, level, code)
Task: Select amount from categories where id exists in accounts for the same level.
SQL: | SELECT amount FROM categories AS egiv
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05455 | train |
v3 | Schema:
accounts (alias: jac)(type, code, level, status)
departments(name, level, id, salary)
Task: Retrieve amount from accounts with salary above the SUM(value) of departments rows sharing the same level.
SQL: | SELECT amount FROM accounts AS jac
WHERE salary > (
SELECT SUM(value) FROM departments AS dov
WHERE dov.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "departments",
"outer_alias": "jac",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05456 | train |
v2 | Schema:
products (alias: nad)(id, amount, type, salary)
branches(value, level, date, name)
Task: Find value from products where a matching record exists in branches with the same type.
SQL: | SELECT value FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = nad.type
); | {
"outer_table": "products",
"inner_table": "branches",
"outer_alias": "nad",
"inner_alias": "agov",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05457 | train |
v3 | Schema:
schedules (alias: vmob)(type, level, date, amount)
managers(code, date, type, value)
Task: Find code from schedules where salary exceeds the average value from managers for the same id.
SQL: | SELECT code FROM schedules AS vmob
WHERE salary > (
SELECT AVG(value) FROM managers AS hac
WHERE hac.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05458 | train |
v3 | Schema:
tasks (alias: znob)(code, status, type, salary)
customers(value, name, id, salary)
Task: Retrieve amount from tasks with value above the MIN(value) of customers rows sharing the same level.
SQL: | SELECT amount FROM tasks AS znob
WHERE value > (
SELECT MIN(value) FROM customers AS lex
WHERE lex.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05459 | train |
v3 | Schema:
customers (alias: lex)(id, value, name, status)
tasks(id, code, name, level)
Task: Retrieve code from customers with salary above the COUNT(amount) of tasks rows sharing the same type.
SQL: | SELECT code FROM customers AS lex
WHERE salary > (
SELECT COUNT(amount) FROM tasks AS znob
WHERE znob.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "tasks",
"outer_alias": "lex",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05460 | train |
v1 | Schema:
items (alias: ikob)(salary, status, name, value)
branches(amount, status, date, value)
Task: Select id from items where id exists in branches for the same id.
SQL: | SELECT id FROM items AS ikob
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "ikob",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05461 | train |
v3 | Schema:
accounts (alias: jac)(type, value, id, level)
managers(date, id, type, level)
Task: Find amount from accounts where amount exceeds the minimum amount from managers for the same type.
SQL: | SELECT amount FROM accounts AS jac
WHERE amount > (
SELECT MIN(amount) FROM managers AS hac
WHERE hac.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "managers",
"outer_alias": "jac",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05462 | train |
v1 | Schema:
requests (alias: ejof)(id, amount, date, salary)
branches(salary, name, id, type)
Task: Retrieve id from requests whose type is found in branches rows where type matches the outer record.
SQL: | SELECT id FROM requests AS ejof
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05463 | train |
v3 | Schema:
requests (alias: ejof)(type, level, amount, id)
categories(id, salary, name, status)
Task: Find name from requests where value exceeds the minimum salary from categories for the same code.
SQL: | SELECT name FROM requests AS ejof
WHERE value > (
SELECT MIN(salary) FROM categories AS egiv
WHERE egiv.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05464 | train |
v1 | Schema:
departments (alias: dov)(status, salary, amount, date)
accounts(name, id, value, code)
Task: Retrieve name from departments whose type is found in accounts rows where status matches the outer record.
SQL: | SELECT name FROM departments AS dov
WHERE type IN (
SELECT type FROM accounts AS jac
WHERE jac.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "accounts",
"outer_alias": "dov",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05465 | train |
v1 | Schema:
managers (alias: hac)(level, value, code, type)
branches(amount, date, value, level)
Task: Retrieve code from managers whose status is found in branches rows where level matches the outer record.
SQL: | SELECT code FROM managers AS hac
WHERE status IN (
SELECT status FROM branches AS agov
WHERE agov.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "branches",
"outer_alias": "hac",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05466 | train |
v1 | Schema:
shipments (alias: vnob)(amount, status, code, name)
items(amount, name, salary, value)
Task: Select value from shipments where status exists in items for the same code.
SQL: | SELECT value FROM shipments AS vnob
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "items",
"outer_alias": "vnob",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05467 | train |
v1 | Schema:
regions (alias: okiv)(amount, id, code, date)
shipments(status, date, code, name)
Task: Retrieve salary from regions whose status is found in shipments rows where type matches the outer record.
SQL: | SELECT salary FROM regions AS okiv
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "shipments",
"outer_alias": "okiv",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05468 | train |
v3 | Schema:
projects (alias: uliv)(salary, type, level, id)
customers(level, code, salary, status)
Task: Retrieve value from projects with value above the COUNT(value) of customers rows sharing the same id.
SQL: | SELECT value FROM projects AS uliv
WHERE value > (
SELECT COUNT(value) FROM customers AS lex
WHERE lex.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "customers",
"outer_alias": "uliv",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05469 | train |
v2 | Schema:
customers (alias: lex)(level, type, id, salary)
managers(id, code, date, salary)
Task: Find amount from customers where a matching record exists in managers with the same type.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05470 | train |
v1 | Schema:
schedules (alias: vmob)(amount, code, salary, status)
tasks(status, code, type, amount)
Task: Find id from schedules where level appears in tasks entries with matching status.
SQL: | SELECT id FROM schedules AS vmob
WHERE level IN (
SELECT level FROM tasks AS znob
WHERE znob.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "tasks",
"outer_alias": "vmob",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05471 | train |
v3 | Schema:
employees (alias: bev)(salary, level, value, id)
staff(status, value, level, name)
Task: Find id from employees where amount exceeds the average salary from staff for the same level.
SQL: | SELECT id FROM employees AS bev
WHERE amount > (
SELECT AVG(salary) FROM staff AS xnob
WHERE xnob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "staff",
"outer_alias": "bev",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05472 | train |
v2 | Schema:
regions (alias: okiv)(date, salary, type, status)
staff(amount, level, code, name)
Task: Retrieve code from regions that have at least one corresponding entry in staff sharing the same code.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05473 | train |
v3 | Schema:
sales (alias: cif)(type, code, id, amount)
products(name, amount, id, type)
Task: Retrieve name from sales with value above the SUM(amount) of products rows sharing the same id.
SQL: | SELECT name FROM sales AS cif
WHERE value > (
SELECT SUM(amount) FROM products AS nad
WHERE nad.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05474 | train |
v3 | Schema:
departments (alias: dov)(level, amount, type, id)
projects(amount, code, level, date)
Task: Find value from departments where salary exceeds the count of value from projects for the same id.
SQL: | SELECT value FROM departments AS dov
WHERE salary > (
SELECT COUNT(value) FROM projects AS uliv
WHERE uliv.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "projects",
"outer_alias": "dov",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05475 | train |
v3 | Schema:
schedules (alias: vmob)(status, date, level, code)
departments(date, type, id, level)
Task: Retrieve id from schedules with salary above the MIN(value) of departments rows sharing the same status.
SQL: | SELECT id FROM schedules AS vmob
WHERE salary > (
SELECT MIN(value) FROM departments AS dov
WHERE dov.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "vmob",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05476 | train |
v1 | Schema:
branches (alias: agov)(type, level, id, value)
transactions(status, level, salary, date)
Task: Select salary from branches where id exists in transactions for the same id.
SQL: | SELECT salary FROM branches AS agov
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05477 | train |
v2 | Schema:
staff (alias: xnob)(amount, status, type, value)
accounts(level, name, value, salary)
Task: Find id from staff where a matching record exists in accounts with the same status.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05478 | train |
v2 | Schema:
requests (alias: ejof)(date, code, status, id)
orders(id, salary, status, date)
Task: Retrieve salary from requests that have at least one corresponding entry in orders sharing the same id.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05479 | train |
v2 | Schema:
projects (alias: uliv)(level, value, date, amount)
staff(value, level, date, id)
Task: Retrieve id from projects that have at least one corresponding entry in staff sharing the same code.
SQL: | SELECT id FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05480 | train |
v3 | Schema:
categories (alias: egiv)(type, id, value, name)
orders(date, type, code, salary)
Task: Retrieve code from categories with value above the MAX(value) of orders rows sharing the same status.
SQL: | SELECT code FROM categories AS egiv
WHERE value > (
SELECT MAX(value) FROM orders AS kab
WHERE kab.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05481 | train |
v2 | Schema:
sales (alias: cif)(amount, type, code, id)
projects(date, type, name, id)
Task: Find value from sales where a matching record exists in projects with the same code.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05482 | train |
v1 | Schema:
projects (alias: uliv)(code, id, amount, status)
sales(status, id, name, type)
Task: Find name from projects where type appears in sales entries with matching id.
SQL: | SELECT name FROM projects AS uliv
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05483 | train |
v1 | Schema:
items (alias: ikob)(type, amount, date, value)
requests(date, salary, amount, name)
Task: Retrieve salary from items whose level is found in requests rows where type matches the outer record.
SQL: | SELECT salary FROM items AS ikob
WHERE level IN (
SELECT level FROM requests AS ejof
WHERE ejof.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "ikob",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05484 | train |
v2 | Schema:
employees (alias: bev)(salary, name, id, status)
managers(status, date, amount, type)
Task: Find amount from employees where a matching record exists in managers with the same type.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "managers",
"outer_alias": "bev",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05485 | train |
v1 | Schema:
branches (alias: agov)(salary, status, code, date)
regions(amount, level, id, value)
Task: Retrieve id from branches whose type is found in regions rows where type matches the outer record.
SQL: | SELECT id FROM branches AS agov
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05486 | train |
v1 | Schema:
tasks (alias: znob)(name, amount, id, status)
shipments(level, name, code, amount)
Task: Retrieve value from tasks whose id is found in shipments rows where level matches the outer record.
SQL: | SELECT value FROM tasks AS znob
WHERE id IN (
SELECT id FROM shipments AS vnob
WHERE vnob.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "shipments",
"outer_alias": "znob",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05487 | train |
v1 | Schema:
shipments (alias: vnob)(level, status, salary, type)
departments(value, level, amount, code)
Task: Find salary from shipments where code appears in departments entries with matching code.
SQL: | SELECT salary FROM shipments AS vnob
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "departments",
"outer_alias": "vnob",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05488 | train |
v3 | Schema:
shipments (alias: vnob)(code, date, salary, level)
categories(value, code, amount, level)
Task: Find amount from shipments where salary exceeds the count of salary from categories for the same id.
SQL: | SELECT amount FROM shipments AS vnob
WHERE salary > (
SELECT COUNT(salary) FROM categories AS egiv
WHERE egiv.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "categories",
"outer_alias": "vnob",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05489 | train |
v3 | Schema:
transactions (alias: gev)(type, code, amount, status)
categories(amount, level, id, status)
Task: Retrieve id from transactions with value above the MIN(value) of categories rows sharing the same type.
SQL: | SELECT id FROM transactions AS gev
WHERE value > (
SELECT MIN(value) FROM categories AS egiv
WHERE egiv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05490 | train |
v3 | Schema:
items (alias: ikob)(code, id, salary, level)
customers(date, id, amount, status)
Task: Find code from items where amount exceeds the maximum amount from customers for the same level.
SQL: | SELECT code FROM items AS ikob
WHERE amount > (
SELECT MAX(amount) FROM customers AS lex
WHERE lex.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05491 | train |
v1 | Schema:
branches (alias: agov)(value, level, date, amount)
products(value, code, salary, name)
Task: Find amount from branches where level appears in products entries with matching type.
SQL: | SELECT amount FROM branches AS agov
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05492 | train |
v1 | Schema:
categories (alias: egiv)(salary, id, type, value)
regions(type, status, salary, name)
Task: Find id from categories where type appears in regions entries with matching code.
SQL: | SELECT id FROM categories AS egiv
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "regions",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05493 | train |
v1 | Schema:
departments (alias: dov)(value, amount, id, salary)
accounts(salary, value, status, type)
Task: Find value from departments where code appears in accounts entries with matching code.
SQL: | SELECT value FROM departments AS dov
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "accounts",
"outer_alias": "dov",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05494 | train |
v2 | Schema:
transactions (alias: gev)(amount, level, date, value)
requests(level, type, date, status)
Task: Find code from transactions where a matching record exists in requests with the same code.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05495 | train |
v2 | Schema:
branches (alias: agov)(date, code, id, status)
employees(salary, code, date, level)
Task: Find value from branches where a matching record exists in employees with the same level.
SQL: | SELECT value FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "employees",
"outer_alias": "agov",
"inner_alias": "bev",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05496 | train |
v3 | Schema:
staff (alias: xnob)(amount, date, code, type)
sales(level, salary, name, value)
Task: Retrieve id from staff with value above the AVG(amount) of sales rows sharing the same status.
SQL: | SELECT id FROM staff AS xnob
WHERE value > (
SELECT AVG(amount) FROM sales AS cif
WHERE cif.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "sales",
"outer_alias": "xnob",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05497 | train |
v3 | Schema:
regions (alias: okiv)(id, level, salary, date)
accounts(amount, status, name, salary)
Task: Retrieve name from regions with salary above the SUM(value) of accounts rows sharing the same id.
SQL: | SELECT name FROM regions AS okiv
WHERE salary > (
SELECT SUM(value) FROM accounts AS jac
WHERE jac.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "accounts",
"outer_alias": "okiv",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05498 | train |
v2 | Schema:
schedules (alias: vmob)(salary, name, value, amount)
transactions(id, name, date, code)
Task: Find value from schedules where a matching record exists in transactions with the same id.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "transactions",
"outer_alias": "vmob",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05499 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.