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:
branches (alias: agov)(code, date, amount, id)
categories(status, amount, level, salary)
Task: Retrieve id from branches whose code is found in categories rows where code matches the outer record.
SQL: | SELECT id FROM branches AS agov
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09800 | train |
v3 | Schema:
schedules (alias: vmob)(date, name, id, status)
orders(salary, name, id, value)
Task: Retrieve id from schedules with amount above the MAX(salary) of orders rows sharing the same code.
SQL: | SELECT id FROM schedules AS vmob
WHERE amount > (
SELECT MAX(salary) FROM orders AS kab
WHERE kab.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "orders",
"outer_alias": "vmob",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09801 | train |
v2 | Schema:
customers (alias: lex)(type, amount, level, id)
requests(level, amount, date, value)
Task: Find code from customers where a matching record exists in requests with the same level.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "lex",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09802 | train |
v1 | Schema:
orders (alias: kab)(value, status, id, code)
products(code, salary, value, amount)
Task: Retrieve amount from orders whose level is found in products rows where status matches the outer record.
SQL: | SELECT amount FROM orders AS kab
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09803 | train |
v3 | Schema:
regions (alias: okiv)(salary, level, date, name)
items(code, date, status, name)
Task: Find amount from regions where salary exceeds the maximum value from items for the same id.
SQL: | SELECT amount FROM regions AS okiv
WHERE salary > (
SELECT MAX(value) FROM items AS ikob
WHERE ikob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "items",
"outer_alias": "okiv",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09804 | train |
v2 | Schema:
projects (alias: uliv)(salary, name, level, value)
orders(level, amount, status, code)
Task: Find code from projects where a matching record exists in orders with the same id.
SQL: | SELECT code FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "orders",
"outer_alias": "uliv",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09805 | train |
v1 | Schema:
employees (alias: bev)(type, name, date, salary)
products(id, salary, level, code)
Task: Retrieve code from employees whose code is found in products rows where type matches the outer record.
SQL: | SELECT code FROM employees AS bev
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09806 | train |
v3 | Schema:
managers (alias: hac)(id, level, type, value)
employees(code, status, name, amount)
Task: Retrieve id from managers with value above the COUNT(amount) of employees rows sharing the same level.
SQL: | SELECT id FROM managers AS hac
WHERE value > (
SELECT COUNT(amount) FROM employees AS bev
WHERE bev.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09807 | train |
v3 | Schema:
employees (alias: bev)(date, level, amount, type)
invoices(code, amount, date, type)
Task: Retrieve code from employees with value above the MAX(value) of invoices rows sharing the same code.
SQL: | SELECT code FROM employees AS bev
WHERE value > (
SELECT MAX(value) FROM invoices AS fal
WHERE fal.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "invoices",
"outer_alias": "bev",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09808 | train |
v3 | Schema:
accounts (alias: jac)(salary, date, status, amount)
sales(date, salary, name, code)
Task: Find amount from accounts where amount exceeds the count of value from sales for the same status.
SQL: | SELECT amount FROM accounts AS jac
WHERE amount > (
SELECT COUNT(value) FROM sales AS cif
WHERE cif.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09809 | train |
v3 | Schema:
projects (alias: uliv)(level, date, type, code)
customers(salary, value, amount, level)
Task: Retrieve code from projects with salary above the COUNT(value) of customers rows sharing the same code.
SQL: | SELECT code FROM projects AS uliv
WHERE salary > (
SELECT COUNT(value) FROM customers AS lex
WHERE lex.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "customers",
"outer_alias": "uliv",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09810 | train |
v1 | Schema:
managers (alias: hac)(date, salary, type, level)
employees(status, salary, id, level)
Task: Select name from managers where status exists in employees for the same id.
SQL: | SELECT name FROM managers AS hac
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09811 | train |
v2 | Schema:
invoices (alias: fal)(code, amount, level, salary)
branches(status, date, salary, amount)
Task: Retrieve name from invoices that have at least one corresponding entry in branches sharing the same type.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "branches",
"outer_alias": "fal",
"inner_alias": "agov",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09812 | train |
v1 | Schema:
transactions (alias: gev)(date, status, id, salary)
tasks(code, status, value, date)
Task: Select name from transactions where type exists in tasks for the same code.
SQL: | SELECT name FROM transactions AS gev
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "tasks",
"outer_alias": "gev",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09813 | train |
v3 | Schema:
categories (alias: egiv)(id, status, salary, date)
requests(salary, id, date, name)
Task: Find salary from categories where amount exceeds the maximum salary from requests for the same id.
SQL: | SELECT salary FROM categories AS egiv
WHERE amount > (
SELECT MAX(salary) FROM requests AS ejof
WHERE ejof.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09814 | train |
v3 | Schema:
orders (alias: kab)(level, type, code, date)
transactions(status, value, code, date)
Task: Retrieve name from orders with value above the MAX(salary) of transactions rows sharing the same level.
SQL: | SELECT name FROM orders AS kab
WHERE value > (
SELECT MAX(salary) FROM transactions AS gev
WHERE gev.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09815 | train |
v2 | Schema:
employees (alias: bev)(id, value, level, amount)
schedules(value, id, amount, date)
Task: Find salary from employees where a matching record exists in schedules with the same code.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "schedules",
"outer_alias": "bev",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09816 | train |
v1 | Schema:
customers (alias: lex)(code, level, id, date)
schedules(salary, amount, status, id)
Task: Find name from customers where status appears in schedules entries with matching level.
SQL: | SELECT name FROM customers AS lex
WHERE status IN (
SELECT status FROM schedules AS vmob
WHERE vmob.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09817 | train |
v1 | Schema:
tasks (alias: znob)(code, value, salary, level)
categories(level, id, type, name)
Task: Select amount from tasks where code exists in categories for the same id.
SQL: | SELECT amount FROM tasks AS znob
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09818 | train |
v2 | Schema:
categories (alias: egiv)(amount, name, salary, value)
orders(id, value, name, date)
Task: Retrieve amount from categories that have at least one corresponding entry in orders sharing the same code.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09819 | train |
v2 | Schema:
departments (alias: dov)(code, name, value, amount)
sales(amount, date, value, id)
Task: Find code from departments where a matching record exists in sales with the same status.
SQL: | SELECT code FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09820 | train |
v3 | Schema:
departments (alias: dov)(status, type, name, value)
managers(amount, id, name, code)
Task: Find amount from departments where value exceeds the maximum value from managers for the same level.
SQL: | SELECT amount FROM departments AS dov
WHERE value > (
SELECT MAX(value) FROM managers AS hac
WHERE hac.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09821 | train |
v3 | Schema:
sales (alias: cif)(status, type, value, level)
items(level, status, salary, amount)
Task: Retrieve id from sales with value above the MIN(salary) of items rows sharing the same status.
SQL: | SELECT id FROM sales AS cif
WHERE value > (
SELECT MIN(salary) FROM items AS ikob
WHERE ikob.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09822 | train |
v2 | Schema:
schedules (alias: vmob)(type, date, code, id)
categories(status, level, type, amount)
Task: Find value from schedules where a matching record exists in categories with the same id.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09823 | train |
v1 | Schema:
orders (alias: kab)(name, id, salary, status)
shipments(amount, name, type, date)
Task: Retrieve salary from orders whose status is found in shipments rows where type matches the outer record.
SQL: | SELECT salary FROM orders AS kab
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09824 | train |
v3 | Schema:
regions (alias: okiv)(value, date, amount, salary)
schedules(amount, level, salary, value)
Task: Retrieve name from regions with value above the AVG(salary) of schedules rows sharing the same code.
SQL: | SELECT name FROM regions AS okiv
WHERE value > (
SELECT AVG(salary) FROM schedules AS vmob
WHERE vmob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "schedules",
"outer_alias": "okiv",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09825 | train |
v1 | Schema:
tasks (alias: znob)(salary, code, date, type)
requests(code, date, type, value)
Task: Find salary from tasks where type appears in requests entries with matching type.
SQL: | SELECT salary FROM tasks AS znob
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09826 | train |
v3 | Schema:
orders (alias: kab)(status, name, id, value)
requests(date, id, salary, value)
Task: Find code from orders where value exceeds the average value from requests for the same code.
SQL: | SELECT code FROM orders AS kab
WHERE value > (
SELECT AVG(value) FROM requests AS ejof
WHERE ejof.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "requests",
"outer_alias": "kab",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09827 | train |
v1 | Schema:
managers (alias: hac)(value, type, status, name)
departments(status, salary, date, value)
Task: Retrieve name from managers whose level is found in departments rows where id matches the outer record.
SQL: | SELECT name FROM managers AS hac
WHERE level IN (
SELECT level FROM departments AS dov
WHERE dov.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "departments",
"outer_alias": "hac",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09828 | train |
v1 | Schema:
requests (alias: ejof)(code, name, value, id)
sales(level, type, amount, date)
Task: Select salary from requests where level exists in sales for the same type.
SQL: | SELECT salary FROM requests AS ejof
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09829 | train |
v1 | Schema:
invoices (alias: fal)(id, type, date, salary)
customers(name, date, amount, code)
Task: Find salary from invoices where level appears in customers entries with matching type.
SQL: | SELECT salary FROM invoices AS fal
WHERE level IN (
SELECT level FROM customers AS lex
WHERE lex.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09830 | train |
v2 | Schema:
regions (alias: okiv)(name, id, code, type)
customers(date, value, amount, salary)
Task: Retrieve salary from regions that have at least one corresponding entry in customers sharing the same code.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09831 | train |
v2 | Schema:
branches (alias: agov)(level, type, name, salary)
staff(date, salary, value, amount)
Task: Find amount from branches where a matching record exists in staff with the same type.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "staff",
"outer_alias": "agov",
"inner_alias": "xnob",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09832 | train |
v3 | Schema:
requests (alias: ejof)(name, id, date, status)
staff(code, date, amount, level)
Task: Retrieve name from requests with salary above the MAX(salary) of staff rows sharing the same code.
SQL: | SELECT name FROM requests AS ejof
WHERE salary > (
SELECT MAX(salary) FROM staff AS xnob
WHERE xnob.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09833 | train |
v1 | Schema:
requests (alias: ejof)(salary, status, amount, type)
branches(status, salary, name, id)
Task: Select salary from requests where id exists in branches for the same level.
SQL: | SELECT salary FROM requests AS ejof
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09834 | train |
v2 | Schema:
staff (alias: xnob)(name, salary, type, amount)
tasks(salary, name, value, code)
Task: Retrieve name from staff that have at least one corresponding entry in tasks sharing the same type.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09835 | train |
v2 | Schema:
invoices (alias: fal)(level, value, name, amount)
categories(status, id, date, value)
Task: Retrieve code from invoices that have at least one corresponding entry in categories sharing the same id.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09836 | train |
v1 | Schema:
items (alias: ikob)(name, type, amount, date)
requests(status, value, code, salary)
Task: Find name from items where id appears in requests entries with matching id.
SQL: | SELECT name FROM items AS ikob
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "ikob",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09837 | train |
v1 | Schema:
requests (alias: ejof)(status, value, type, id)
employees(id, salary, amount, type)
Task: Retrieve value from requests whose code is found in employees rows where type matches the outer record.
SQL: | SELECT value FROM requests AS ejof
WHERE code IN (
SELECT code FROM employees AS bev
WHERE bev.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09838 | train |
v2 | Schema:
staff (alias: xnob)(value, level, status, date)
departments(type, date, value, name)
Task: Retrieve name from staff that have at least one corresponding entry in departments sharing the same id.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09839 | train |
v3 | Schema:
branches (alias: agov)(status, value, type, name)
managers(amount, type, salary, value)
Task: Retrieve name from branches with value above the COUNT(amount) of managers rows sharing the same code.
SQL: | SELECT name FROM branches AS agov
WHERE value > (
SELECT COUNT(amount) FROM managers AS hac
WHERE hac.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09840 | train |
v1 | Schema:
invoices (alias: fal)(date, status, code, salary)
orders(name, date, id, salary)
Task: Find salary from invoices where id appears in orders entries with matching type.
SQL: | SELECT salary FROM invoices AS fal
WHERE id IN (
SELECT id FROM orders AS kab
WHERE kab.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09841 | train |
v1 | Schema:
employees (alias: bev)(name, status, salary, amount)
projects(salary, value, id, type)
Task: Find salary from employees where status appears in projects entries with matching id.
SQL: | SELECT salary FROM employees AS bev
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09842 | train |
v2 | Schema:
items (alias: ikob)(name, salary, value, code)
categories(level, date, type, name)
Task: Find name from items where a matching record exists in categories with the same level.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "categories",
"outer_alias": "ikob",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09843 | train |
v1 | Schema:
departments (alias: dov)(id, amount, type, date)
categories(name, level, amount, status)
Task: Select value from departments where level exists in categories for the same type.
SQL: | SELECT value FROM departments AS dov
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09844 | train |
v1 | Schema:
categories (alias: egiv)(name, code, amount, type)
projects(level, type, name, value)
Task: Select salary from categories where status exists in projects for the same status.
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_09845 | train |
v2 | Schema:
requests (alias: ejof)(type, level, date, salary)
branches(id, code, date, level)
Task: Retrieve amount from requests that have at least one corresponding entry in branches sharing the same code.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09846 | train |
v2 | Schema:
schedules (alias: vmob)(amount, type, level, name)
accounts(value, level, status, id)
Task: Find id from schedules where a matching record exists in accounts with the same id.
SQL: | SELECT id FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09847 | train |
v1 | Schema:
accounts (alias: jac)(amount, level, value, date)
sales(date, name, value, code)
Task: Select name from accounts where type exists in sales for the same level.
SQL: | SELECT name FROM accounts AS jac
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09848 | train |
v3 | Schema:
categories (alias: egiv)(name, value, id, level)
schedules(level, date, type, salary)
Task: Find amount from categories where salary exceeds the total salary from schedules for the same id.
SQL: | SELECT amount FROM categories AS egiv
WHERE salary > (
SELECT SUM(salary) FROM schedules AS vmob
WHERE vmob.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09849 | train |
v1 | Schema:
requests (alias: ejof)(name, value, id, code)
projects(value, amount, code, level)
Task: Select code from requests where id exists in projects for the same status.
SQL: | SELECT code FROM requests AS ejof
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "projects",
"outer_alias": "ejof",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09850 | train |
v2 | Schema:
regions (alias: okiv)(name, status, id, salary)
products(date, salary, id, name)
Task: Retrieve code from regions that have at least one corresponding entry in products sharing the same id.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09851 | train |
v3 | Schema:
orders (alias: kab)(value, salary, status, type)
products(amount, status, date, id)
Task: Retrieve amount from orders with salary above the MIN(value) of products rows sharing the same type.
SQL: | SELECT amount FROM orders AS kab
WHERE salary > (
SELECT MIN(value) FROM products AS nad
WHERE nad.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09852 | train |
v2 | Schema:
regions (alias: okiv)(id, date, amount, name)
staff(amount, level, code, salary)
Task: Retrieve value from regions that have at least one corresponding entry in staff sharing the same id.
SQL: | SELECT value FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09853 | train |
v2 | Schema:
tasks (alias: znob)(value, status, type, amount)
employees(id, type, amount, name)
Task: Retrieve code from tasks that have at least one corresponding entry in employees sharing the same id.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09854 | train |
v1 | Schema:
employees (alias: bev)(code, type, id, amount)
customers(code, value, level, date)
Task: Select code from employees where level exists in customers for the same id.
SQL: | SELECT code FROM employees AS bev
WHERE level IN (
SELECT level FROM customers AS lex
WHERE lex.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09855 | train |
v3 | Schema:
sales (alias: cif)(code, value, name, amount)
accounts(type, name, code, salary)
Task: Find value from sales where salary exceeds the average value from accounts for the same code.
SQL: | SELECT value FROM sales AS cif
WHERE salary > (
SELECT AVG(value) FROM accounts AS jac
WHERE jac.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "accounts",
"outer_alias": "cif",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09856 | train |
v3 | Schema:
accounts (alias: jac)(date, name, code, type)
products(name, amount, value, status)
Task: Retrieve code from accounts with salary above the MIN(value) of products rows sharing the same code.
SQL: | SELECT code FROM accounts AS jac
WHERE salary > (
SELECT MIN(value) FROM products AS nad
WHERE nad.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "products",
"outer_alias": "jac",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09857 | train |
v2 | Schema:
branches (alias: agov)(level, name, amount, type)
regions(code, value, name, salary)
Task: Find value from branches where a matching record exists in regions with the same status.
SQL: | SELECT value FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09858 | train |
v2 | Schema:
projects (alias: uliv)(name, amount, date, type)
orders(value, status, id, name)
Task: Find id from projects where a matching record exists in orders with the same id.
SQL: | SELECT id FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "orders",
"outer_alias": "uliv",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09859 | train |
v3 | Schema:
staff (alias: xnob)(amount, name, status, id)
employees(salary, code, date, value)
Task: Retrieve code from staff with value above the AVG(amount) of employees rows sharing the same status.
SQL: | SELECT code FROM staff AS xnob
WHERE value > (
SELECT AVG(amount) FROM employees AS bev
WHERE bev.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "employees",
"outer_alias": "xnob",
"inner_alias": "bev",
"proj_col": "code",
"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_09860 | train |
v2 | Schema:
orders (alias: kab)(salary, amount, level, date)
items(level, date, amount, name)
Task: Find name from orders where a matching record exists in items with the same code.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "items",
"outer_alias": "kab",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09861 | train |
v3 | Schema:
categories (alias: egiv)(id, value, status, code)
requests(id, status, name, salary)
Task: Retrieve salary from categories with salary above the AVG(value) of requests rows sharing the same type.
SQL: | SELECT salary FROM categories AS egiv
WHERE salary > (
SELECT AVG(value) FROM requests AS ejof
WHERE ejof.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09862 | train |
v2 | Schema:
transactions (alias: gev)(code, id, level, status)
staff(name, date, code, value)
Task: Retrieve code from transactions that have at least one corresponding entry in staff sharing the same code.
SQL: | SELECT code 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": "code",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09863 | train |
v1 | Schema:
requests (alias: ejof)(code, status, value, salary)
regions(type, amount, salary, level)
Task: Retrieve id from requests whose status is found in regions rows where id matches the outer record.
SQL: | SELECT id FROM requests AS ejof
WHERE status IN (
SELECT status FROM regions AS okiv
WHERE okiv.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "regions",
"outer_alias": "ejof",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09864 | train |
v1 | Schema:
invoices (alias: fal)(date, amount, code, value)
requests(date, code, salary, name)
Task: Retrieve code from invoices whose id is found in requests rows where id matches the outer record.
SQL: | SELECT code FROM invoices AS fal
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "requests",
"outer_alias": "fal",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09865 | train |
v1 | Schema:
tasks (alias: znob)(type, date, name, value)
sales(level, value, type, date)
Task: Find name from tasks where id appears in sales entries with matching type.
SQL: | SELECT name FROM tasks AS znob
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09866 | train |
v1 | Schema:
tasks (alias: znob)(id, status, name, date)
products(value, name, salary, code)
Task: Retrieve value from tasks whose level is found in products rows where level matches the outer record.
SQL: | SELECT value FROM tasks AS znob
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09867 | train |
v2 | Schema:
requests (alias: ejof)(type, value, id, name)
schedules(name, type, id, status)
Task: Retrieve salary from requests that have at least one corresponding entry in schedules sharing the same level.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09868 | train |
v2 | Schema:
transactions (alias: gev)(type, status, code, amount)
customers(value, id, status, level)
Task: Find code from transactions where a matching record exists in customers with the same status.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09869 | train |
v3 | Schema:
orders (alias: kab)(level, id, salary, amount)
accounts(id, code, amount, date)
Task: Retrieve code from orders with amount above the AVG(salary) of accounts rows sharing the same id.
SQL: | SELECT code FROM orders AS kab
WHERE amount > (
SELECT AVG(salary) FROM accounts AS jac
WHERE jac.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09870 | train |
v3 | Schema:
categories (alias: egiv)(status, date, salary, code)
schedules(date, code, level, type)
Task: Find amount from categories where amount exceeds the total value from schedules for the same type.
SQL: | SELECT amount FROM categories AS egiv
WHERE amount > (
SELECT SUM(value) FROM schedules AS vmob
WHERE vmob.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09871 | train |
v2 | Schema:
requests (alias: ejof)(type, level, date, code)
employees(amount, status, name, date)
Task: Retrieve value from requests that have at least one corresponding entry in employees sharing the same type.
SQL: | SELECT value FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09872 | train |
v1 | Schema:
tasks (alias: znob)(name, status, type, code)
staff(date, type, id, salary)
Task: Find name from tasks where level appears in staff entries with matching code.
SQL: | SELECT name FROM tasks AS znob
WHERE level IN (
SELECT level FROM staff AS xnob
WHERE xnob.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09873 | train |
v1 | Schema:
managers (alias: hac)(id, name, code, type)
shipments(code, value, amount, level)
Task: Select salary from managers where type exists in shipments for the same type.
SQL: | SELECT salary FROM managers AS hac
WHERE type IN (
SELECT type FROM shipments AS vnob
WHERE vnob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "hac",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09874 | train |
v2 | Schema:
requests (alias: ejof)(type, level, value, amount)
invoices(salary, name, code, status)
Task: Find amount from requests where a matching record exists in invoices with the same type.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09875 | train |
v2 | Schema:
sales (alias: cif)(name, salary, level, id)
managers(level, amount, type, name)
Task: Find salary from sales where a matching record exists in managers with the same code.
SQL: | SELECT salary FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09876 | train |
v3 | Schema:
employees (alias: bev)(name, type, value, status)
managers(salary, status, code, id)
Task: Retrieve id from employees with amount above the AVG(value) of managers rows sharing the same type.
SQL: | SELECT id FROM employees AS bev
WHERE amount > (
SELECT AVG(value) FROM managers AS hac
WHERE hac.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "managers",
"outer_alias": "bev",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09877 | train |
v2 | Schema:
branches (alias: agov)(id, code, amount, name)
items(code, value, amount, salary)
Task: Retrieve name from branches that have at least one corresponding entry in items sharing the same level.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09878 | train |
v1 | Schema:
invoices (alias: fal)(status, level, id, salary)
transactions(date, salary, id, value)
Task: Retrieve salary from invoices whose level is found in transactions rows where status matches the outer record.
SQL: | SELECT salary FROM invoices AS fal
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09879 | train |
v1 | Schema:
invoices (alias: fal)(name, salary, type, code)
staff(type, code, amount, level)
Task: Select salary from invoices where type exists in staff for the same level.
SQL: | SELECT salary FROM invoices AS fal
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09880 | train |
v3 | Schema:
regions (alias: okiv)(name, id, salary, code)
items(id, date, code, type)
Task: Find value from regions where amount exceeds the average amount from items for the same code.
SQL: | SELECT value FROM regions AS okiv
WHERE amount > (
SELECT AVG(amount) FROM items AS ikob
WHERE ikob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "items",
"outer_alias": "okiv",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09881 | train |
v3 | Schema:
sales (alias: cif)(status, salary, type, name)
departments(type, name, date, amount)
Task: Retrieve value from sales with amount above the COUNT(value) of departments rows sharing the same type.
SQL: | SELECT value FROM sales AS cif
WHERE amount > (
SELECT COUNT(value) FROM departments AS dov
WHERE dov.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "departments",
"outer_alias": "cif",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09882 | train |
v1 | Schema:
employees (alias: bev)(level, code, amount, salary)
projects(type, id, level, date)
Task: Select amount from employees where type exists in projects for the same status.
SQL: | SELECT amount FROM employees AS bev
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09883 | train |
v2 | Schema:
customers (alias: lex)(date, status, name, code)
shipments(code, amount, date, status)
Task: Find salary from customers where a matching record exists in shipments with the same code.
SQL: | SELECT salary FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "shipments",
"outer_alias": "lex",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09884 | train |
v2 | Schema:
sales (alias: cif)(value, name, date, code)
branches(level, value, status, date)
Task: Retrieve name from sales that have at least one corresponding entry in branches sharing the same type.
SQL: | SELECT name 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": "name",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09885 | train |
v3 | Schema:
projects (alias: uliv)(id, type, name, code)
categories(type, date, salary, id)
Task: Find amount from projects where amount exceeds the maximum value from categories for the same status.
SQL: | SELECT amount FROM projects AS uliv
WHERE amount > (
SELECT MAX(value) FROM categories AS egiv
WHERE egiv.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09886 | train |
v2 | Schema:
transactions (alias: gev)(value, salary, amount, date)
staff(amount, code, name, type)
Task: Retrieve salary from transactions that have at least one corresponding entry in staff sharing 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_09887 | train |
v1 | Schema:
accounts (alias: jac)(amount, type, value, code)
categories(id, level, date, salary)
Task: Select name from accounts where type exists in categories for the same id.
SQL: | SELECT name FROM accounts AS jac
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09888 | train |
v1 | Schema:
transactions (alias: gev)(code, level, salary, id)
managers(status, type, amount, value)
Task: Select name from transactions where level exists in managers for the same code.
SQL: | SELECT name FROM transactions AS gev
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "managers",
"outer_alias": "gev",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09889 | train |
v3 | Schema:
products (alias: nad)(type, level, name, status)
customers(date, amount, name, value)
Task: Retrieve id from products with amount above the MIN(amount) of customers rows sharing the same level.
SQL: | SELECT id FROM products AS nad
WHERE amount > (
SELECT MIN(amount) FROM customers AS lex
WHERE lex.level = nad.level
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09890 | train |
v3 | Schema:
orders (alias: kab)(status, name, level, type)
items(type, value, level, amount)
Task: Retrieve id from orders with salary above the MAX(salary) of items rows sharing the same code.
SQL: | SELECT id FROM orders AS kab
WHERE salary > (
SELECT MAX(salary) FROM items AS ikob
WHERE ikob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "items",
"outer_alias": "kab",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09891 | train |
v1 | Schema:
categories (alias: egiv)(amount, level, name, code)
branches(date, status, amount, value)
Task: Retrieve amount from categories whose id is found in branches rows where status matches the outer record.
SQL: | SELECT amount FROM categories AS egiv
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09892 | train |
v1 | Schema:
orders (alias: kab)(code, date, level, value)
customers(status, name, value, code)
Task: Retrieve value from orders whose id is found in customers rows where type matches the outer record.
SQL: | SELECT value FROM orders AS kab
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "customers",
"outer_alias": "kab",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09893 | train |
v1 | Schema:
orders (alias: kab)(id, date, code, name)
departments(level, value, type, name)
Task: Find name from orders where status appears in departments entries with matching level.
SQL: | SELECT name FROM orders AS kab
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09894 | train |
v3 | Schema:
staff (alias: xnob)(date, id, status, salary)
customers(amount, level, value, name)
Task: Retrieve id from staff with amount above the COUNT(amount) of customers rows sharing the same code.
SQL: | SELECT id FROM staff AS xnob
WHERE amount > (
SELECT COUNT(amount) FROM customers AS lex
WHERE lex.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09895 | train |
v3 | Schema:
sales (alias: cif)(date, code, salary, name)
shipments(code, level, status, value)
Task: Find amount from sales where salary exceeds the minimum amount from shipments for the same id.
SQL: | SELECT amount FROM sales AS cif
WHERE salary > (
SELECT MIN(amount) FROM shipments AS vnob
WHERE vnob.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09896 | train |
v3 | Schema:
customers (alias: lex)(salary, type, date, id)
regions(id, date, type, value)
Task: Retrieve salary from customers with value above the MIN(salary) of regions rows sharing the same level.
SQL: | SELECT salary FROM customers AS lex
WHERE value > (
SELECT MIN(salary) FROM regions AS okiv
WHERE okiv.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "regions",
"outer_alias": "lex",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09897 | train |
v3 | Schema:
employees (alias: bev)(status, date, amount, type)
schedules(salary, id, value, date)
Task: Find salary from employees where value exceeds the maximum amount from schedules for the same code.
SQL: | SELECT salary FROM employees AS bev
WHERE value > (
SELECT MAX(amount) FROM schedules AS vmob
WHERE vmob.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "schedules",
"outer_alias": "bev",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09898 | train |
v3 | Schema:
branches (alias: agov)(id, status, level, type)
regions(id, level, value, code)
Task: Retrieve name from branches with value above the SUM(value) of regions rows sharing the same status.
SQL: | SELECT name FROM branches AS agov
WHERE value > (
SELECT SUM(value) FROM regions AS okiv
WHERE okiv.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09899 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.