variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v3 | Schema:
projects (alias: uliv)(salary, status, name, code)
transactions(date, status, code, salary)
Task: Retrieve amount from projects with salary above the MAX(amount) of transactions rows sharing the same level.
SQL: | SELECT amount FROM projects AS uliv
WHERE salary > (
SELECT MAX(amount) FROM transactions AS gev
WHERE gev.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01800 | train |
v1 | Schema:
categories (alias: egiv)(type, date, code, level)
items(name, id, type, status)
Task: Retrieve amount from categories whose level is found in items rows where code matches the outer record.
SQL: | SELECT amount FROM categories AS egiv
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "items",
"outer_alias": "egiv",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01801 | train |
v2 | Schema:
accounts (alias: jac)(value, id, code, date)
regions(value, code, date, name)
Task: Find id from accounts where a matching record exists in regions with the same type.
SQL: | SELECT id FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01802 | train |
v3 | Schema:
shipments (alias: vnob)(level, value, date, name)
customers(id, amount, status, value)
Task: Retrieve value from shipments with salary above the AVG(amount) of customers rows sharing the same id.
SQL: | SELECT value FROM shipments AS vnob
WHERE salary > (
SELECT AVG(amount) FROM customers AS lex
WHERE lex.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01803 | train |
v2 | Schema:
categories (alias: egiv)(level, type, value, salary)
transactions(type, date, level, salary)
Task: Retrieve amount from categories that have at least one corresponding entry in transactions sharing the same level.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "transactions",
"outer_alias": "egiv",
"inner_alias": "gev",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01804 | train |
v1 | Schema:
orders (alias: kab)(code, amount, name, salary)
branches(code, salary, amount, id)
Task: Select code from orders where status exists in branches for the same type.
SQL: | SELECT code FROM orders AS kab
WHERE status IN (
SELECT status FROM branches AS agov
WHERE agov.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01805 | train |
v3 | Schema:
tasks (alias: znob)(date, amount, value, salary)
departments(status, date, name, type)
Task: Retrieve salary from tasks with salary above the MIN(salary) of departments rows sharing the same status.
SQL: | SELECT salary FROM tasks AS znob
WHERE salary > (
SELECT MIN(salary) FROM departments AS dov
WHERE dov.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "departments",
"outer_alias": "znob",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01806 | train |
v2 | Schema:
requests (alias: ejof)(status, value, code, id)
products(date, salary, code, id)
Task: Retrieve code from requests that have at least one corresponding entry in products sharing the same code.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ejof",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01807 | train |
v3 | Schema:
customers (alias: lex)(id, value, salary, name)
projects(amount, type, salary, status)
Task: Find amount from customers where amount exceeds the total salary from projects for the same id.
SQL: | SELECT amount FROM customers AS lex
WHERE amount > (
SELECT SUM(salary) FROM projects AS uliv
WHERE uliv.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01808 | train |
v2 | Schema:
requests (alias: ejof)(code, name, date, amount)
customers(type, amount, date, status)
Task: Retrieve id from requests that have at least one corresponding entry in customers sharing the same type.
SQL: | SELECT id FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "customers",
"outer_alias": "ejof",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01809 | train |
v1 | Schema:
managers (alias: hac)(id, type, value, status)
staff(salary, amount, level, status)
Task: Select code from managers where code exists in staff for the same status.
SQL: | SELECT code FROM managers AS hac
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "hac",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01810 | train |
v3 | Schema:
transactions (alias: gev)(code, amount, status, name)
accounts(level, type, amount, code)
Task: Retrieve code from transactions with amount above the MAX(value) of accounts rows sharing the same id.
SQL: | SELECT code FROM transactions AS gev
WHERE amount > (
SELECT MAX(value) FROM accounts AS jac
WHERE jac.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "accounts",
"outer_alias": "gev",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01811 | train |
v3 | Schema:
projects (alias: uliv)(id, level, code, type)
invoices(name, amount, status, id)
Task: Retrieve amount from projects with salary above the MAX(value) of invoices rows sharing the same id.
SQL: | SELECT amount FROM projects AS uliv
WHERE salary > (
SELECT MAX(value) FROM invoices AS fal
WHERE fal.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "invoices",
"outer_alias": "uliv",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01812 | train |
v2 | Schema:
transactions (alias: gev)(level, salary, status, code)
projects(level, amount, id, date)
Task: Find name from transactions where a matching record exists in projects with the same type.
SQL: | SELECT name FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01813 | train |
v2 | Schema:
requests (alias: ejof)(salary, value, amount, status)
transactions(salary, value, amount, level)
Task: Retrieve salary from requests that have at least one corresponding entry in transactions sharing the same id.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "transactions",
"outer_alias": "ejof",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01814 | train |
v2 | Schema:
tasks (alias: znob)(value, amount, salary, level)
requests(amount, level, id, date)
Task: Retrieve value from tasks that have at least one corresponding entry in requests sharing the same type.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01815 | train |
v3 | Schema:
projects (alias: uliv)(code, status, amount, value)
customers(level, status, type, amount)
Task: Find value from projects where amount exceeds the count of value from customers for the same status.
SQL: | SELECT value FROM projects AS uliv
WHERE amount > (
SELECT COUNT(value) FROM customers AS lex
WHERE lex.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "customers",
"outer_alias": "uliv",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01816 | train |
v3 | Schema:
categories (alias: egiv)(date, level, id, name)
orders(name, salary, level, type)
Task: Retrieve amount from categories with amount above the MIN(amount) of orders rows sharing the same id.
SQL: | SELECT amount FROM categories AS egiv
WHERE amount > (
SELECT MIN(amount) FROM orders AS kab
WHERE kab.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01817 | train |
v1 | Schema:
transactions (alias: gev)(type, value, amount, level)
shipments(id, amount, status, code)
Task: Find value from transactions where code appears in shipments entries with matching status.
SQL: | SELECT value FROM transactions AS gev
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "shipments",
"outer_alias": "gev",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01818 | train |
v3 | Schema:
branches (alias: agov)(amount, type, code, status)
orders(id, value, amount, status)
Task: Retrieve code from branches with salary above the SUM(amount) of orders rows sharing the same type.
SQL: | SELECT code FROM branches AS agov
WHERE salary > (
SELECT SUM(amount) FROM orders AS kab
WHERE kab.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01819 | train |
v2 | Schema:
staff (alias: xnob)(date, level, name, value)
managers(value, amount, salary, status)
Task: Find value from staff where a matching record exists in managers with the same type.
SQL: | SELECT value FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "managers",
"outer_alias": "xnob",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01820 | train |
v1 | Schema:
requests (alias: ejof)(name, code, level, salary)
tasks(amount, date, name, salary)
Task: Retrieve code from requests whose code is found in tasks rows where level matches the outer record.
SQL: | SELECT code FROM requests AS ejof
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01821 | train |
v1 | Schema:
transactions (alias: gev)(name, salary, amount, status)
products(amount, name, code, salary)
Task: Retrieve code from transactions whose status is found in products rows where type matches the outer record.
SQL: | SELECT code FROM transactions AS gev
WHERE status IN (
SELECT status FROM products AS nad
WHERE nad.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "gev",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01822 | train |
v2 | Schema:
projects (alias: uliv)(date, id, type, status)
categories(amount, type, salary, name)
Task: Find amount from projects where a matching record exists in categories with the same level.
SQL: | SELECT amount FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01823 | train |
v1 | Schema:
projects (alias: uliv)(salary, level, type, value)
categories(code, salary, status, date)
Task: Retrieve id from projects whose id is found in categories rows where id matches the outer record.
SQL: | SELECT id FROM projects AS uliv
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01824 | train |
v1 | Schema:
orders (alias: kab)(id, date, amount, code)
transactions(date, level, amount, id)
Task: Find id from orders where id appears in transactions entries with matching type.
SQL: | SELECT id FROM orders AS kab
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01825 | train |
v2 | Schema:
sales (alias: cif)(type, level, amount, value)
requests(date, level, id, name)
Task: Retrieve amount from sales that have at least one corresponding entry in requests sharing the same status.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01826 | train |
v3 | Schema:
orders (alias: kab)(code, value, type, id)
shipments(amount, salary, level, id)
Task: Retrieve code from orders with value above the SUM(amount) of shipments rows sharing the same type.
SQL: | SELECT code FROM orders AS kab
WHERE value > (
SELECT SUM(amount) FROM shipments AS vnob
WHERE vnob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01827 | train |
v1 | Schema:
tasks (alias: znob)(name, date, id, amount)
sales(id, amount, status, level)
Task: Select id from tasks where id exists in sales for the same status.
SQL: | SELECT id FROM tasks AS znob
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01828 | train |
v3 | Schema:
invoices (alias: fal)(salary, id, name, code)
items(code, type, salary, status)
Task: Find value from invoices where salary exceeds the average value from items for the same id.
SQL: | SELECT value FROM invoices AS fal
WHERE salary > (
SELECT AVG(value) FROM items AS ikob
WHERE ikob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "fal",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01829 | train |
v2 | Schema:
accounts (alias: jac)(salary, amount, date, code)
orders(status, value, date, code)
Task: Find id from accounts where a matching record exists in orders with the same code.
SQL: | SELECT id FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "orders",
"outer_alias": "jac",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01830 | train |
v3 | Schema:
shipments (alias: vnob)(amount, name, type, code)
managers(date, salary, value, amount)
Task: Retrieve id from shipments with value above the AVG(amount) of managers rows sharing the same id.
SQL: | SELECT id FROM shipments AS vnob
WHERE value > (
SELECT AVG(amount) FROM managers AS hac
WHERE hac.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "managers",
"outer_alias": "vnob",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01831 | train |
v1 | Schema:
branches (alias: agov)(name, level, code, type)
managers(id, code, date, status)
Task: Find code from branches where level appears in managers entries with matching type.
SQL: | SELECT code FROM branches AS agov
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01832 | train |
v1 | Schema:
customers (alias: lex)(date, level, code, id)
categories(level, type, amount, code)
Task: Retrieve id from customers whose level is found in categories rows where level matches the outer record.
SQL: | SELECT id FROM customers AS lex
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "categories",
"outer_alias": "lex",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01833 | train |
v2 | Schema:
regions (alias: okiv)(status, id, code, salary)
items(amount, value, date, salary)
Task: Retrieve code from regions that have at least one corresponding entry in items sharing the same type.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "items",
"outer_alias": "okiv",
"inner_alias": "ikob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01834 | train |
v1 | Schema:
sales (alias: cif)(level, salary, type, code)
invoices(level, code, value, type)
Task: Select code from sales where level exists in invoices for the same id.
SQL: | SELECT code FROM sales AS cif
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01835 | train |
v2 | Schema:
items (alias: ikob)(name, amount, salary, status)
branches(amount, name, level, id)
Task: Retrieve salary from items that have at least one corresponding entry in branches sharing the same type.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "ikob",
"inner_alias": "agov",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01836 | train |
v2 | Schema:
categories (alias: egiv)(date, level, amount, salary)
branches(status, type, code, id)
Task: Retrieve name from categories that have at least one corresponding entry in branches sharing the same code.
SQL: | SELECT name FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01837 | train |
v3 | Schema:
transactions (alias: gev)(status, salary, amount, code)
invoices(level, code, date, type)
Task: Find salary from transactions where value exceeds the total salary from invoices for the same type.
SQL: | SELECT salary FROM transactions AS gev
WHERE value > (
SELECT SUM(salary) FROM invoices AS fal
WHERE fal.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "gev",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01838 | train |
v2 | Schema:
transactions (alias: gev)(amount, date, salary, value)
shipments(amount, salary, type, value)
Task: Find value from transactions where a matching record exists in shipments with the same type.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "shipments",
"outer_alias": "gev",
"inner_alias": "vnob",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01839 | train |
v2 | Schema:
orders (alias: kab)(type, status, value, salary)
branches(name, date, status, code)
Task: Find value from orders where a matching record exists in branches with the same id.
SQL: | SELECT value FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01840 | train |
v3 | Schema:
staff (alias: xnob)(name, date, status, level)
orders(amount, code, salary, type)
Task: Retrieve salary from staff with value above the COUNT(value) of orders rows sharing the same level.
SQL: | SELECT salary FROM staff AS xnob
WHERE value > (
SELECT COUNT(value) FROM orders AS kab
WHERE kab.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "orders",
"outer_alias": "xnob",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01841 | train |
v1 | Schema:
products (alias: nad)(type, status, amount, code)
customers(value, id, type, code)
Task: Find code from products where code appears in customers entries with matching code.
SQL: | SELECT code FROM products AS nad
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.code = nad.code
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01842 | train |
v2 | Schema:
invoices (alias: fal)(amount, name, salary, type)
shipments(level, date, status, code)
Task: Find salary from invoices where a matching record exists in shipments with the same level.
SQL: | SELECT salary FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "fal",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01843 | train |
v3 | Schema:
departments (alias: dov)(level, value, salary, name)
invoices(amount, level, date, status)
Task: Retrieve salary from departments with salary above the COUNT(value) of invoices rows sharing the same status.
SQL: | SELECT salary FROM departments AS dov
WHERE salary > (
SELECT COUNT(value) FROM invoices AS fal
WHERE fal.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01844 | train |
v3 | Schema:
managers (alias: hac)(salary, name, date, level)
projects(salary, code, date, id)
Task: Retrieve salary from managers with value above the MIN(amount) of projects rows sharing the same code.
SQL: | SELECT salary FROM managers AS hac
WHERE value > (
SELECT MIN(amount) FROM projects AS uliv
WHERE uliv.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "projects",
"outer_alias": "hac",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01845 | train |
v2 | Schema:
branches (alias: agov)(type, date, amount, value)
shipments(id, salary, name, code)
Task: Retrieve amount from branches that have at least one corresponding entry in shipments sharing the same level.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01846 | train |
v1 | Schema:
orders (alias: kab)(name, salary, amount, code)
categories(amount, id, value, salary)
Task: Select id from orders where code exists in categories for the same code.
SQL: | SELECT id FROM orders AS kab
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01847 | train |
v1 | Schema:
managers (alias: hac)(date, id, value, code)
schedules(amount, code, type, status)
Task: Find name from managers where level appears in schedules entries with matching code.
SQL: | SELECT name FROM managers AS hac
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "schedules",
"outer_alias": "hac",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01848 | train |
v1 | Schema:
invoices (alias: fal)(type, amount, date, code)
projects(type, date, status, id)
Task: Retrieve amount from invoices whose status is found in projects rows where code matches the outer record.
SQL: | SELECT amount FROM invoices AS fal
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "projects",
"outer_alias": "fal",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01849 | train |
v1 | Schema:
shipments (alias: vnob)(value, code, level, salary)
customers(type, code, amount, status)
Task: Retrieve amount from shipments whose level is found in customers rows where type matches the outer record.
SQL: | SELECT amount FROM shipments AS vnob
WHERE level IN (
SELECT level FROM customers AS lex
WHERE lex.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01850 | train |
v2 | Schema:
transactions (alias: gev)(status, id, code, type)
managers(salary, amount, date, id)
Task: Retrieve name from transactions that have at least one corresponding entry in managers sharing the same id.
SQL: | SELECT name FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "managers",
"outer_alias": "gev",
"inner_alias": "hac",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01851 | train |
v1 | Schema:
sales (alias: cif)(salary, date, id, level)
requests(salary, level, type, name)
Task: Retrieve name from sales whose level is found in requests rows where level matches the outer record.
SQL: | SELECT name FROM sales AS cif
WHERE level IN (
SELECT level FROM requests AS ejof
WHERE ejof.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01852 | train |
v2 | Schema:
products (alias: nad)(date, status, name, value)
transactions(date, name, level, id)
Task: Find value from products where a matching record exists in transactions with the same code.
SQL: | SELECT value FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = nad.code
); | {
"outer_table": "products",
"inner_table": "transactions",
"outer_alias": "nad",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01853 | train |
v3 | Schema:
orders (alias: kab)(type, name, id, level)
branches(salary, name, status, code)
Task: Retrieve code from orders with salary above the MAX(amount) of branches rows sharing the same code.
SQL: | SELECT code FROM orders AS kab
WHERE salary > (
SELECT MAX(amount) FROM branches AS agov
WHERE agov.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01854 | train |
v2 | Schema:
regions (alias: okiv)(salary, date, value, id)
shipments(level, type, amount, date)
Task: Find id from regions where a matching record exists in shipments with the same code.
SQL: | SELECT id FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "shipments",
"outer_alias": "okiv",
"inner_alias": "vnob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01855 | train |
v3 | Schema:
regions (alias: okiv)(id, amount, type, code)
orders(salary, value, code, date)
Task: Find salary from regions where amount exceeds the maximum salary from orders for the same code.
SQL: | SELECT salary FROM regions AS okiv
WHERE amount > (
SELECT MAX(salary) FROM orders AS kab
WHERE kab.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01856 | train |
v1 | Schema:
orders (alias: kab)(level, code, amount, date)
employees(status, level, type, amount)
Task: Select name from orders where type exists in employees for the same code.
SQL: | SELECT name FROM orders AS kab
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "employees",
"outer_alias": "kab",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01857 | train |
v3 | Schema:
invoices (alias: fal)(id, salary, name, level)
items(status, name, value, date)
Task: Find id from invoices where amount exceeds the count of value from items for the same status.
SQL: | SELECT id FROM invoices AS fal
WHERE amount > (
SELECT COUNT(value) FROM items AS ikob
WHERE ikob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "fal",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01858 | train |
v1 | Schema:
products (alias: nad)(type, name, code, level)
orders(value, salary, type, date)
Task: Find code from products where level appears in orders entries with matching id.
SQL: | SELECT code FROM products AS nad
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.id = nad.id
); | {
"outer_table": "products",
"inner_table": "orders",
"outer_alias": "nad",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01859 | train |
v1 | Schema:
schedules (alias: vmob)(amount, date, level, name)
items(amount, code, name, salary)
Task: Retrieve name from schedules whose status is found in items rows where code matches the outer record.
SQL: | SELECT name FROM schedules AS vmob
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "items",
"outer_alias": "vmob",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01860 | train |
v3 | Schema:
schedules (alias: vmob)(date, id, code, status)
transactions(amount, salary, name, date)
Task: Retrieve value from schedules with salary above the AVG(amount) of transactions rows sharing the same status.
SQL: | SELECT value FROM schedules AS vmob
WHERE salary > (
SELECT AVG(amount) FROM transactions AS gev
WHERE gev.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "transactions",
"outer_alias": "vmob",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01861 | train |
v3 | Schema:
shipments (alias: vnob)(salary, type, value, name)
accounts(type, level, date, salary)
Task: Find value from shipments where salary exceeds the minimum value from accounts for the same status.
SQL: | SELECT value FROM shipments AS vnob
WHERE salary > (
SELECT MIN(value) FROM accounts AS jac
WHERE jac.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01862 | train |
v2 | Schema:
requests (alias: ejof)(salary, amount, name, value)
managers(salary, status, amount, name)
Task: Retrieve name from requests that have at least one corresponding entry in managers sharing the same type.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01863 | train |
v1 | Schema:
sales (alias: cif)(date, amount, status, type)
items(level, date, status, code)
Task: Find salary from sales where level appears in items entries with matching level.
SQL: | SELECT salary FROM sales AS cif
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01864 | train |
v3 | Schema:
employees (alias: bev)(salary, value, name, code)
branches(amount, name, id, level)
Task: Find name from employees where salary exceeds the average amount from branches for the same status.
SQL: | SELECT name FROM employees AS bev
WHERE salary > (
SELECT AVG(amount) FROM branches AS agov
WHERE agov.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01865 | train |
v2 | Schema:
branches (alias: agov)(type, level, name, amount)
tasks(salary, code, amount, value)
Task: Find amount from branches where a matching record exists in tasks with the same code.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "tasks",
"outer_alias": "agov",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01866 | train |
v3 | Schema:
projects (alias: uliv)(date, name, id, amount)
invoices(status, id, value, salary)
Task: Find name from projects where salary exceeds the count of value from invoices for the same level.
SQL: | SELECT name FROM projects AS uliv
WHERE salary > (
SELECT COUNT(value) FROM invoices AS fal
WHERE fal.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "invoices",
"outer_alias": "uliv",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01867 | train |
v3 | Schema:
shipments (alias: vnob)(id, status, date, type)
customers(level, status, type, amount)
Task: Retrieve code from shipments with salary above the COUNT(salary) of customers rows sharing the same status.
SQL: | SELECT code FROM shipments AS vnob
WHERE salary > (
SELECT COUNT(salary) FROM customers AS lex
WHERE lex.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01868 | train |
v1 | Schema:
schedules (alias: vmob)(salary, date, value, name)
invoices(status, type, date, salary)
Task: Select name from schedules where type exists in invoices for the same code.
SQL: | SELECT name FROM schedules AS vmob
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "invoices",
"outer_alias": "vmob",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01869 | train |
v3 | Schema:
managers (alias: hac)(value, salary, date, status)
employees(id, salary, type, level)
Task: Retrieve amount from managers with amount above the COUNT(amount) of employees rows sharing the same id.
SQL: | SELECT amount FROM managers AS hac
WHERE amount > (
SELECT COUNT(amount) FROM employees AS bev
WHERE bev.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01870 | train |
v1 | Schema:
staff (alias: xnob)(type, level, value, name)
departments(id, code, status, date)
Task: Retrieve code from staff whose level is found in departments rows where status matches the outer record.
SQL: | SELECT code FROM staff AS xnob
WHERE level IN (
SELECT level FROM departments AS dov
WHERE dov.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01871 | train |
v3 | Schema:
customers (alias: lex)(status, id, type, date)
items(code, date, type, id)
Task: Retrieve salary from customers with salary above the MAX(amount) of items rows sharing the same type.
SQL: | SELECT salary FROM customers AS lex
WHERE salary > (
SELECT MAX(amount) FROM items AS ikob
WHERE ikob.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01872 | train |
v2 | Schema:
branches (alias: agov)(status, date, salary, name)
tasks(amount, level, code, type)
Task: Retrieve amount from branches that have at least one corresponding entry in tasks sharing the same status.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "tasks",
"outer_alias": "agov",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01873 | train |
v1 | Schema:
requests (alias: ejof)(value, status, code, salary)
staff(level, type, salary, code)
Task: Retrieve code from requests whose status is found in staff rows where id matches the outer record.
SQL: | SELECT code FROM requests AS ejof
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01874 | train |
v3 | Schema:
orders (alias: kab)(type, name, status, id)
invoices(salary, value, level, name)
Task: Retrieve salary from orders with value above the MAX(value) of invoices rows sharing the same type.
SQL: | SELECT salary FROM orders AS kab
WHERE value > (
SELECT MAX(value) FROM invoices AS fal
WHERE fal.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01875 | train |
v2 | Schema:
branches (alias: agov)(level, code, date, type)
shipments(amount, id, date, status)
Task: Find name from branches where a matching record exists in shipments with the same status.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01876 | train |
v3 | Schema:
branches (alias: agov)(date, status, code, level)
schedules(value, type, id, date)
Task: Find salary from branches where value exceeds the count of amount from schedules for the same level.
SQL: | SELECT salary FROM branches AS agov
WHERE value > (
SELECT COUNT(amount) FROM schedules AS vmob
WHERE vmob.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "schedules",
"outer_alias": "agov",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01877 | train |
v3 | Schema:
requests (alias: ejof)(date, type, salary, level)
regions(salary, name, status, code)
Task: Find id from requests where amount exceeds the minimum value from regions for the same type.
SQL: | SELECT id FROM requests AS ejof
WHERE amount > (
SELECT MIN(value) FROM regions AS okiv
WHERE okiv.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "regions",
"outer_alias": "ejof",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01878 | train |
v2 | Schema:
invoices (alias: fal)(date, type, level, salary)
accounts(code, type, amount, status)
Task: Retrieve code from invoices that have at least one corresponding entry in accounts sharing the same type.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01879 | train |
v2 | Schema:
shipments (alias: vnob)(salary, value, code, status)
orders(amount, status, level, date)
Task: Find name from shipments where a matching record exists in orders with the same type.
SQL: | SELECT name FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01880 | train |
v1 | Schema:
accounts (alias: jac)(salary, status, name, code)
requests(status, name, value, code)
Task: Select amount from accounts where level exists in requests for the same id.
SQL: | SELECT amount FROM accounts AS jac
WHERE level IN (
SELECT level FROM requests AS ejof
WHERE ejof.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "requests",
"outer_alias": "jac",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01881 | train |
v3 | Schema:
staff (alias: xnob)(status, type, id, date)
employees(code, id, value, name)
Task: Retrieve name from staff with salary above the SUM(salary) of employees rows sharing the same status.
SQL: | SELECT name FROM staff AS xnob
WHERE salary > (
SELECT SUM(salary) FROM employees AS bev
WHERE bev.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "employees",
"outer_alias": "xnob",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01882 | train |
v3 | Schema:
managers (alias: hac)(status, date, salary, amount)
products(value, level, salary, id)
Task: Retrieve name from managers with salary above the AVG(salary) of products rows sharing the same level.
SQL: | SELECT name FROM managers AS hac
WHERE salary > (
SELECT AVG(salary) FROM products AS nad
WHERE nad.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "products",
"outer_alias": "hac",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01883 | train |
v1 | Schema:
categories (alias: egiv)(level, name, value, type)
invoices(salary, id, amount, type)
Task: Find amount from categories where type appears in invoices entries with matching level.
SQL: | SELECT amount FROM categories AS egiv
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01884 | train |
v1 | Schema:
schedules (alias: vmob)(amount, level, name, id)
employees(value, level, type, code)
Task: Retrieve value from schedules whose level is found in employees rows where code matches the outer record.
SQL: | SELECT value FROM schedules AS vmob
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "employees",
"outer_alias": "vmob",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01885 | train |
v1 | Schema:
transactions (alias: gev)(level, salary, type, amount)
invoices(date, salary, status, amount)
Task: Retrieve id from transactions whose status is found in invoices rows where level matches the outer record.
SQL: | SELECT id FROM transactions AS gev
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "gev",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01886 | train |
v1 | Schema:
projects (alias: uliv)(name, date, status, code)
categories(name, status, salary, type)
Task: Retrieve value from projects whose id is found in categories rows where code matches the outer record.
SQL: | SELECT value FROM projects AS uliv
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01887 | train |
v3 | Schema:
accounts (alias: jac)(type, status, date, id)
staff(code, name, type, status)
Task: Retrieve id from accounts with salary above the AVG(amount) of staff rows sharing the same type.
SQL: | SELECT id FROM accounts AS jac
WHERE salary > (
SELECT AVG(amount) FROM staff AS xnob
WHERE xnob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01888 | train |
v2 | Schema:
staff (alias: xnob)(status, id, level, date)
products(level, type, status, code)
Task: Find amount from staff where a matching record exists in products with the same status.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "products",
"outer_alias": "xnob",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01889 | train |
v1 | Schema:
sales (alias: cif)(type, salary, value, name)
departments(value, date, code, level)
Task: Select salary from sales where code exists in departments for the same type.
SQL: | SELECT salary FROM sales AS cif
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "departments",
"outer_alias": "cif",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01890 | train |
v2 | Schema:
invoices (alias: fal)(status, name, id, salary)
schedules(level, code, amount, salary)
Task: Retrieve value from invoices that have at least one corresponding entry in schedules sharing the same type.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "vmob",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01891 | train |
v3 | Schema:
managers (alias: hac)(level, value, id, status)
departments(type, id, date, name)
Task: Retrieve code from managers with amount above the MIN(value) of departments rows sharing the same type.
SQL: | SELECT code FROM managers AS hac
WHERE amount > (
SELECT MIN(value) FROM departments AS dov
WHERE dov.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "departments",
"outer_alias": "hac",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01892 | train |
v1 | Schema:
branches (alias: agov)(id, amount, status, date)
requests(date, status, value, amount)
Task: Retrieve name from branches whose type is found in requests rows where level matches the outer record.
SQL: | SELECT name FROM branches AS agov
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "agov",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01893 | train |
v2 | Schema:
departments (alias: dov)(name, level, code, date)
managers(date, amount, value, salary)
Task: Find code from departments where a matching record exists in managers with the same code.
SQL: | SELECT code FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01894 | train |
v2 | Schema:
products (alias: nad)(value, id, name, amount)
requests(id, amount, type, salary)
Task: Find amount from products where a matching record exists in requests with the same status.
SQL: | SELECT amount FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = nad.status
); | {
"outer_table": "products",
"inner_table": "requests",
"outer_alias": "nad",
"inner_alias": "ejof",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01895 | train |
v1 | Schema:
tasks (alias: znob)(name, salary, status, code)
accounts(id, name, status, date)
Task: Select amount from tasks where id exists in accounts for the same level.
SQL: | SELECT amount FROM tasks AS znob
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01896 | train |
v3 | Schema:
schedules (alias: vmob)(date, level, id, status)
regions(amount, value, id, name)
Task: Retrieve name from schedules with amount above the MIN(amount) of regions rows sharing the same code.
SQL: | SELECT name FROM schedules AS vmob
WHERE amount > (
SELECT MIN(amount) FROM regions AS okiv
WHERE okiv.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "regions",
"outer_alias": "vmob",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01897 | train |
v2 | Schema:
transactions (alias: gev)(amount, level, id, value)
departments(status, type, level, id)
Task: Find code from transactions where a matching record exists in departments with the same status.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01898 | train |
v1 | Schema:
regions (alias: okiv)(level, type, date, id)
staff(status, level, value, code)
Task: Find name from regions where id appears in staff entries with matching id.
SQL: | SELECT name FROM regions AS okiv
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01899 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.