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:
regions (alias: okiv)(value, salary, code, level)
departments(id, date, amount, type)
Task: Retrieve name from regions with amount above the SUM(amount) of departments rows sharing the same code.
SQL: | SELECT name FROM regions AS okiv
WHERE amount > (
SELECT SUM(amount) FROM departments AS dov
WHERE dov.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_06100 | train |
v1 | Schema:
requests (alias: ejof)(type, amount, name, salary)
accounts(name, type, level, id)
Task: Select name from requests where level exists in accounts for the same level.
SQL: | SELECT name FROM requests AS ejof
WHERE level IN (
SELECT level FROM accounts AS jac
WHERE jac.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_06101 | train |
v1 | Schema:
categories (alias: egiv)(status, id, level, salary)
accounts(status, type, level, id)
Task: Find value from categories where id appears in accounts entries with matching id.
SQL: | SELECT value FROM categories AS egiv
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_06102 | train |
v3 | Schema:
orders (alias: kab)(salary, amount, value, name)
products(date, code, type, value)
Task: Retrieve id from orders with value above the MIN(amount) of products rows sharing the same level.
SQL: | SELECT id FROM orders AS kab
WHERE value > (
SELECT MIN(amount) FROM products AS nad
WHERE nad.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06103 | train |
v1 | Schema:
schedules (alias: vmob)(type, date, id, amount)
invoices(name, salary, id, code)
Task: Select amount from schedules where code exists in invoices for the same code.
SQL: | SELECT amount FROM schedules AS vmob
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "invoices",
"outer_alias": "vmob",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_06104 | train |
v2 | Schema:
regions (alias: okiv)(amount, status, type, date)
products(id, name, amount, date)
Task: Find salary from regions where a matching record exists in products with the same level.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_06105 | train |
v2 | Schema:
branches (alias: agov)(code, type, date, salary)
employees(name, amount, salary, type)
Task: Find code from branches where a matching record exists in employees with the same id.
SQL: | SELECT code FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "employees",
"outer_alias": "agov",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_06106 | train |
v1 | Schema:
sales (alias: cif)(id, name, status, amount)
projects(level, value, date, type)
Task: Retrieve name from sales whose code is found in projects rows where id matches the outer record.
SQL: | SELECT name FROM sales AS cif
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06107 | train |
v2 | Schema:
orders (alias: kab)(type, level, amount, value)
projects(code, id, date, name)
Task: Find code from orders where a matching record exists in projects with the same level.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "projects",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06108 | train |
v3 | Schema:
schedules (alias: vmob)(level, amount, name, salary)
sales(status, date, code, id)
Task: Retrieve code from schedules with amount above the MAX(amount) of sales rows sharing the same status.
SQL: | SELECT code FROM schedules AS vmob
WHERE amount > (
SELECT MAX(amount) FROM sales AS cif
WHERE cif.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_06109 | train |
v2 | Schema:
categories (alias: egiv)(status, salary, name, date)
projects(id, code, name, level)
Task: Retrieve code from categories that have at least one corresponding entry in projects sharing the same status.
SQL: | SELECT code FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_06110 | train |
v1 | Schema:
employees (alias: bev)(code, id, amount, value)
sales(type, level, date, code)
Task: Find salary from employees where type appears in sales entries with matching status.
SQL: | SELECT salary FROM employees AS bev
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "sales",
"outer_alias": "bev",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06111 | train |
v2 | Schema:
tasks (alias: znob)(type, value, name, level)
schedules(value, date, type, status)
Task: Find amount from tasks where a matching record exists in schedules with the same type.
SQL: | SELECT amount FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "schedules",
"outer_alias": "znob",
"inner_alias": "vmob",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_06112 | train |
v1 | Schema:
items (alias: ikob)(amount, date, type, code)
products(salary, type, code, level)
Task: Select code from items where code exists in products for the same status.
SQL: | SELECT code FROM items AS ikob
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_06113 | train |
v2 | Schema:
items (alias: ikob)(salary, amount, type, value)
projects(value, id, name, code)
Task: Find name from items where a matching record exists in projects with the same status.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_06114 | train |
v2 | Schema:
products (alias: nad)(level, amount, status, value)
regions(level, id, value, type)
Task: Find id from products where a matching record exists in regions with the same type.
SQL: | SELECT id FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = nad.type
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06115 | train |
v2 | Schema:
managers (alias: hac)(type, id, code, name)
schedules(amount, id, date, value)
Task: Retrieve salary from managers that have at least one corresponding entry in schedules sharing the same status.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "schedules",
"outer_alias": "hac",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06116 | train |
v3 | Schema:
projects (alias: uliv)(salary, value, name, level)
transactions(name, status, level, date)
Task: Find amount from projects where salary exceeds the count of amount from transactions for the same code.
SQL: | SELECT amount FROM projects AS uliv
WHERE salary > (
SELECT COUNT(amount) FROM transactions AS gev
WHERE gev.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_06117 | train |
v3 | Schema:
products (alias: nad)(name, status, type, amount)
items(date, value, salary, id)
Task: Find code from products where value exceeds the count of amount from items for the same level.
SQL: | SELECT code FROM products AS nad
WHERE value > (
SELECT COUNT(amount) FROM items AS ikob
WHERE ikob.level = nad.level
); | {
"outer_table": "products",
"inner_table": "items",
"outer_alias": "nad",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06118 | train |
v2 | Schema:
branches (alias: agov)(status, id, date, code)
transactions(amount, level, date, type)
Task: Retrieve id from branches that have at least one corresponding entry in transactions sharing the same id.
SQL: | SELECT id FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_06119 | train |
v1 | Schema:
customers (alias: lex)(value, date, name, level)
orders(code, value, level, status)
Task: Retrieve code from customers whose status is found in orders rows where code matches the outer record.
SQL: | SELECT code FROM customers AS lex
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "orders",
"outer_alias": "lex",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06120 | train |
v2 | Schema:
orders (alias: kab)(name, date, id, salary)
requests(value, status, level, date)
Task: Retrieve code from orders that have at least one corresponding entry in requests sharing the same id.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "requests",
"outer_alias": "kab",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06121 | train |
v2 | Schema:
employees (alias: bev)(amount, type, value, id)
staff(value, status, type, salary)
Task: Find salary from employees where a matching record exists in staff with the same type.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "staff",
"outer_alias": "bev",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06122 | train |
v1 | Schema:
managers (alias: hac)(value, status, salary, date)
products(name, amount, salary, code)
Task: Retrieve amount from managers whose type is found in products rows where type matches the outer record.
SQL: | SELECT amount FROM managers AS hac
WHERE type IN (
SELECT type FROM products AS nad
WHERE nad.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "products",
"outer_alias": "hac",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06123 | train |
v1 | Schema:
transactions (alias: gev)(value, date, type, amount)
customers(value, amount, salary, name)
Task: Select value from transactions where status exists in customers for the same status.
SQL: | SELECT value FROM transactions AS gev
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06124 | train |
v1 | Schema:
orders (alias: kab)(amount, type, code, value)
regions(status, code, type, date)
Task: Retrieve code from orders whose type is found in regions rows where level matches the outer record.
SQL: | SELECT code FROM orders AS kab
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "regions",
"outer_alias": "kab",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06125 | train |
v3 | Schema:
transactions (alias: gev)(name, status, salary, code)
orders(id, type, name, code)
Task: Find amount from transactions where amount exceeds the total salary from orders for the same code.
SQL: | SELECT amount FROM transactions AS gev
WHERE amount > (
SELECT SUM(salary) FROM orders AS kab
WHERE kab.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06126 | train |
v2 | Schema:
regions (alias: okiv)(id, name, salary, amount)
projects(name, level, code, id)
Task: Retrieve name from regions that have at least one corresponding entry in projects sharing the same code.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_06127 | train |
v2 | Schema:
invoices (alias: fal)(amount, type, code, value)
projects(amount, date, status, type)
Task: Find salary from invoices where a matching record exists in projects with the same code.
SQL: | SELECT salary FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "projects",
"outer_alias": "fal",
"inner_alias": "uliv",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06128 | train |
v3 | Schema:
schedules (alias: vmob)(date, status, value, code)
shipments(code, name, date, value)
Task: Retrieve name from schedules with value above the COUNT(value) of shipments rows sharing the same level.
SQL: | SELECT name FROM schedules AS vmob
WHERE value > (
SELECT COUNT(value) FROM shipments AS vnob
WHERE vnob.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_06129 | train |
v2 | Schema:
branches (alias: agov)(date, id, level, code)
managers(level, value, code, date)
Task: Retrieve code from branches that have at least one corresponding entry in managers sharing the same type.
SQL: | SELECT code FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_06130 | train |
v1 | Schema:
requests (alias: ejof)(salary, level, id, amount)
invoices(amount, type, name, value)
Task: Select amount from requests where status exists in invoices for the same type.
SQL: | SELECT amount FROM requests AS ejof
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_06131 | train |
v2 | Schema:
regions (alias: okiv)(type, salary, id, date)
departments(value, level, date, id)
Task: Find value from regions where a matching record exists in departments with the same type.
SQL: | SELECT value FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_06132 | train |
v1 | Schema:
projects (alias: uliv)(amount, name, id, date)
branches(name, id, value, amount)
Task: Select code from projects where type exists in branches for the same id.
SQL: | SELECT code FROM projects AS uliv
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "branches",
"outer_alias": "uliv",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_06133 | train |
v2 | Schema:
invoices (alias: fal)(date, value, code, id)
orders(salary, status, name, level)
Task: Retrieve name from invoices that have at least one corresponding entry in orders sharing the same type.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06134 | train |
v3 | Schema:
employees (alias: bev)(value, id, status, type)
staff(id, amount, salary, type)
Task: Retrieve value from employees with salary above the SUM(salary) of staff rows sharing the same code.
SQL: | SELECT value FROM employees AS bev
WHERE salary > (
SELECT SUM(salary) FROM staff AS xnob
WHERE xnob.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "staff",
"outer_alias": "bev",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06135 | train |
v3 | Schema:
orders (alias: kab)(id, date, code, type)
staff(status, date, salary, value)
Task: Retrieve id from orders with value above the SUM(value) of staff rows sharing the same code.
SQL: | SELECT id FROM orders AS kab
WHERE value > (
SELECT SUM(value) FROM staff AS xnob
WHERE xnob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06136 | train |
v3 | Schema:
items (alias: ikob)(date, salary, id, type)
branches(amount, level, id, salary)
Task: Retrieve code from items with value above the MAX(value) of branches rows sharing the same level.
SQL: | SELECT code FROM items AS ikob
WHERE value > (
SELECT MAX(value) FROM branches AS agov
WHERE agov.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "ikob",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_06137 | train |
v1 | Schema:
staff (alias: xnob)(status, value, id, date)
projects(id, value, status, amount)
Task: Retrieve code from staff whose level is found in projects rows where level matches the outer record.
SQL: | SELECT code FROM staff AS xnob
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_06138 | train |
v1 | Schema:
regions (alias: okiv)(amount, status, id, value)
tasks(name, salary, status, level)
Task: Select salary from regions where code exists in tasks for the same id.
SQL: | SELECT salary FROM regions AS okiv
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_06139 | train |
v2 | Schema:
customers (alias: lex)(id, level, value, date)
sales(amount, salary, level, date)
Task: Find salary from customers where a matching record exists in sales with the same id.
SQL: | SELECT salary FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06140 | train |
v2 | Schema:
categories (alias: egiv)(amount, type, value, id)
employees(code, level, id, amount)
Task: Retrieve code from categories that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT code FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "employees",
"outer_alias": "egiv",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_06141 | train |
v3 | Schema:
items (alias: ikob)(amount, level, status, name)
customers(status, id, name, type)
Task: Find code from items where salary exceeds the minimum amount from customers for the same status.
SQL: | SELECT code FROM items AS ikob
WHERE salary > (
SELECT MIN(amount) FROM customers AS lex
WHERE lex.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_06142 | train |
v3 | Schema:
branches (alias: agov)(salary, amount, code, type)
regions(date, salary, status, type)
Task: Retrieve amount from branches with salary above the MIN(amount) of regions rows sharing the same id.
SQL: | SELECT amount FROM branches AS agov
WHERE salary > (
SELECT MIN(amount) FROM regions AS okiv
WHERE okiv.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_06143 | train |
v3 | Schema:
shipments (alias: vnob)(id, status, level, salary)
projects(amount, salary, id, type)
Task: Find value from shipments where amount exceeds the minimum amount from projects for the same type.
SQL: | SELECT value FROM shipments AS vnob
WHERE amount > (
SELECT MIN(amount) FROM projects AS uliv
WHERE uliv.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "projects",
"outer_alias": "vnob",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_06144 | train |
v3 | Schema:
customers (alias: lex)(code, date, status, id)
accounts(date, salary, value, name)
Task: Find value from customers where value exceeds the count of value from accounts for the same status.
SQL: | SELECT value FROM customers AS lex
WHERE value > (
SELECT COUNT(value) FROM accounts AS jac
WHERE jac.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06145 | train |
v3 | Schema:
shipments (alias: vnob)(date, level, type, name)
departments(date, amount, status, id)
Task: Find salary from shipments where amount exceeds the average amount from departments for the same code.
SQL: | SELECT salary FROM shipments AS vnob
WHERE amount > (
SELECT AVG(amount) FROM departments AS dov
WHERE dov.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "departments",
"outer_alias": "vnob",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_06146 | train |
v2 | Schema:
departments (alias: dov)(value, amount, date, type)
requests(date, value, level, salary)
Task: Retrieve salary from departments that have at least one corresponding entry in requests sharing the same status.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "requests",
"outer_alias": "dov",
"inner_alias": "ejof",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06147 | train |
v2 | Schema:
tasks (alias: znob)(status, code, id, amount)
shipments(id, date, amount, code)
Task: Find name from tasks where a matching record exists in shipments with the same code.
SQL: | SELECT name FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "shipments",
"outer_alias": "znob",
"inner_alias": "vnob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_06148 | train |
v1 | Schema:
employees (alias: bev)(status, level, date, value)
projects(value, name, type, code)
Task: Retrieve code from employees whose level is found in projects rows where status matches the outer record.
SQL: | SELECT code FROM employees AS bev
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06149 | train |
v3 | Schema:
transactions (alias: gev)(id, amount, salary, name)
regions(id, level, type, value)
Task: Retrieve code from transactions with salary above the AVG(amount) of regions rows sharing the same id.
SQL: | SELECT code FROM transactions AS gev
WHERE salary > (
SELECT AVG(amount) FROM regions AS okiv
WHERE okiv.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06150 | train |
v2 | Schema:
products (alias: nad)(value, date, type, code)
items(name, id, type, level)
Task: Find name from products where a matching record exists in items with the same id.
SQL: | SELECT name FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = nad.id
); | {
"outer_table": "products",
"inner_table": "items",
"outer_alias": "nad",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06151 | train |
v2 | Schema:
items (alias: ikob)(salary, id, value, date)
branches(type, id, salary, date)
Task: Find salary from items where a matching record exists in branches with the same id.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "ikob",
"inner_alias": "agov",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_06152 | train |
v2 | Schema:
departments (alias: dov)(status, code, id, salary)
products(date, name, code, amount)
Task: Find salary from departments where a matching record exists in products with the same code.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "products",
"outer_alias": "dov",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06153 | train |
v1 | Schema:
employees (alias: bev)(amount, code, value, name)
departments(amount, salary, value, code)
Task: Select amount from employees where id exists in departments for the same code.
SQL: | SELECT amount FROM employees AS bev
WHERE id IN (
SELECT id FROM departments AS dov
WHERE dov.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06154 | train |
v3 | Schema:
transactions (alias: gev)(level, type, code, date)
regions(name, type, amount, id)
Task: Retrieve name from transactions with amount above the SUM(amount) of regions rows sharing the same code.
SQL: | SELECT name FROM transactions AS gev
WHERE amount > (
SELECT SUM(amount) FROM regions AS okiv
WHERE okiv.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06155 | train |
v3 | Schema:
categories (alias: egiv)(salary, date, id, status)
transactions(date, code, type, amount)
Task: Retrieve value from categories with amount above the SUM(salary) of transactions rows sharing the same status.
SQL: | SELECT value FROM categories AS egiv
WHERE amount > (
SELECT SUM(salary) FROM transactions AS gev
WHERE gev.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "transactions",
"outer_alias": "egiv",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_06156 | train |
v1 | Schema:
invoices (alias: fal)(code, value, salary, id)
customers(level, date, status, name)
Task: Select amount from invoices where code exists in customers for the same id.
SQL: | SELECT amount FROM invoices AS fal
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06157 | train |
v2 | Schema:
categories (alias: egiv)(salary, date, value, name)
products(amount, value, status, date)
Task: Retrieve value from categories that have at least one corresponding entry in products sharing the same id.
SQL: | SELECT value FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "products",
"outer_alias": "egiv",
"inner_alias": "nad",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_06158 | train |
v3 | Schema:
departments (alias: dov)(date, level, code, salary)
products(level, status, id, date)
Task: Retrieve amount from departments with value above the MAX(amount) of products rows sharing the same level.
SQL: | SELECT amount FROM departments AS dov
WHERE value > (
SELECT MAX(amount) FROM products AS nad
WHERE nad.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "products",
"outer_alias": "dov",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06159 | train |
v1 | Schema:
managers (alias: hac)(value, name, amount, id)
orders(status, id, salary, date)
Task: Find value from managers where level appears in orders entries with matching code.
SQL: | SELECT value FROM managers AS hac
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "orders",
"outer_alias": "hac",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06160 | train |
v3 | Schema:
items (alias: ikob)(type, value, code, amount)
schedules(status, id, level, type)
Task: Retrieve value from items with value above the AVG(value) of schedules rows sharing the same level.
SQL: | SELECT value FROM items AS ikob
WHERE value > (
SELECT AVG(value) FROM schedules AS vmob
WHERE vmob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_06161 | train |
v1 | Schema:
shipments (alias: vnob)(salary, amount, date, level)
sales(id, date, value, status)
Task: Find salary from shipments where id appears in sales entries with matching id.
SQL: | SELECT salary FROM shipments AS vnob
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_06162 | train |
v1 | Schema:
schedules (alias: vmob)(id, name, amount, level)
products(date, name, id, code)
Task: Select code from schedules where status exists in products for the same type.
SQL: | SELECT code FROM schedules AS vmob
WHERE status IN (
SELECT status FROM products AS nad
WHERE nad.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "products",
"outer_alias": "vmob",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_06163 | train |
v3 | Schema:
tasks (alias: znob)(name, amount, id, level)
categories(salary, level, name, type)
Task: Find name from tasks where salary exceeds the average value from categories for the same code.
SQL: | SELECT name FROM tasks AS znob
WHERE salary > (
SELECT AVG(value) FROM categories AS egiv
WHERE egiv.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_06164 | train |
v3 | Schema:
schedules (alias: vmob)(salary, level, amount, code)
customers(value, code, salary, level)
Task: Find salary from schedules where value exceeds the count of value from customers for the same code.
SQL: | SELECT salary FROM schedules AS vmob
WHERE value > (
SELECT COUNT(value) FROM customers AS lex
WHERE lex.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_06165 | train |
v2 | Schema:
products (alias: nad)(status, salary, id, name)
invoices(status, amount, date, name)
Task: Find code from products where a matching record exists in invoices with the same id.
SQL: | SELECT code FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = nad.id
); | {
"outer_table": "products",
"inner_table": "invoices",
"outer_alias": "nad",
"inner_alias": "fal",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06166 | train |
v1 | Schema:
regions (alias: okiv)(salary, type, level, date)
categories(date, name, amount, type)
Task: Find amount from regions where id appears in categories entries with matching id.
SQL: | SELECT amount FROM regions AS okiv
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_06167 | train |
v1 | Schema:
transactions (alias: gev)(type, value, salary, amount)
requests(code, level, type, salary)
Task: Retrieve id from transactions whose type is found in requests rows where type matches the outer record.
SQL: | SELECT id FROM transactions AS gev
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06168 | train |
v1 | Schema:
transactions (alias: gev)(date, code, status, type)
employees(name, amount, id, value)
Task: Find salary from transactions where id appears in employees entries with matching code.
SQL: | SELECT salary FROM transactions AS gev
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "employees",
"outer_alias": "gev",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06169 | train |
v3 | Schema:
products (alias: nad)(code, amount, status, type)
departments(level, salary, id, code)
Task: Retrieve code from products with salary above the SUM(value) of departments rows sharing the same type.
SQL: | SELECT code FROM products AS nad
WHERE salary > (
SELECT SUM(value) FROM departments AS dov
WHERE dov.type = nad.type
); | {
"outer_table": "products",
"inner_table": "departments",
"outer_alias": "nad",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06170 | train |
v3 | Schema:
sales (alias: cif)(salary, date, amount, type)
invoices(name, code, level, status)
Task: Find amount from sales where amount exceeds the minimum value from invoices for the same type.
SQL: | SELECT amount FROM sales AS cif
WHERE amount > (
SELECT MIN(value) FROM invoices AS fal
WHERE fal.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06171 | train |
v1 | Schema:
categories (alias: egiv)(amount, level, date, value)
orders(value, code, salary, amount)
Task: Find code from categories where id appears in orders entries with matching level.
SQL: | SELECT code FROM categories AS egiv
WHERE id IN (
SELECT id FROM orders AS kab
WHERE kab.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_06172 | train |
v1 | Schema:
customers (alias: lex)(value, date, code, amount)
staff(level, date, id, value)
Task: Find id from customers where id appears in staff entries with matching id.
SQL: | SELECT id FROM customers AS lex
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06173 | train |
v3 | Schema:
departments (alias: dov)(amount, value, date, status)
invoices(date, level, status, code)
Task: Find salary from departments where salary exceeds the maximum value from invoices for the same level.
SQL: | SELECT salary FROM departments AS dov
WHERE salary > (
SELECT MAX(value) FROM invoices AS fal
WHERE fal.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06174 | train |
v2 | Schema:
requests (alias: ejof)(type, value, name, id)
tasks(salary, code, status, value)
Task: Find code from requests where a matching record exists in tasks with the same level.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_06175 | train |
v1 | Schema:
orders (alias: kab)(salary, value, code, name)
departments(name, id, level, code)
Task: Retrieve code from orders whose type is found in departments rows where type matches the outer record.
SQL: | SELECT code FROM orders AS kab
WHERE type IN (
SELECT type FROM departments AS dov
WHERE dov.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06176 | train |
v3 | Schema:
products (alias: nad)(name, code, date, type)
managers(level, salary, value, id)
Task: Retrieve salary from products with salary above the SUM(amount) of managers rows sharing the same code.
SQL: | SELECT salary FROM products AS nad
WHERE salary > (
SELECT SUM(amount) FROM managers AS hac
WHERE hac.code = nad.code
); | {
"outer_table": "products",
"inner_table": "managers",
"outer_alias": "nad",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06177 | train |
v1 | Schema:
tasks (alias: znob)(level, name, date, salary)
schedules(level, amount, status, value)
Task: Find amount from tasks where id appears in schedules entries with matching level.
SQL: | SELECT amount FROM tasks AS znob
WHERE id IN (
SELECT id FROM schedules AS vmob
WHERE vmob.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "schedules",
"outer_alias": "znob",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_06178 | train |
v3 | Schema:
transactions (alias: gev)(type, salary, name, level)
staff(salary, date, amount, value)
Task: Retrieve value from transactions with salary above the AVG(salary) of staff rows sharing the same id.
SQL: | SELECT value FROM transactions AS gev
WHERE salary > (
SELECT AVG(salary) FROM staff AS xnob
WHERE xnob.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06179 | train |
v3 | Schema:
branches (alias: agov)(salary, level, id, type)
regions(date, id, code, status)
Task: Find amount from branches where amount exceeds the total amount from regions for the same code.
SQL: | SELECT amount FROM branches AS agov
WHERE amount > (
SELECT SUM(amount) FROM regions AS okiv
WHERE okiv.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_06180 | train |
v2 | Schema:
items (alias: ikob)(id, type, code, name)
products(amount, type, id, date)
Task: Retrieve code from items that have at least one corresponding entry in products sharing the same level.
SQL: | SELECT code FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_06181 | train |
v2 | Schema:
orders (alias: kab)(date, value, status, amount)
accounts(date, salary, name, status)
Task: Retrieve name from orders that have at least one corresponding entry in accounts sharing the same status.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06182 | train |
v1 | Schema:
accounts (alias: jac)(salary, amount, date, id)
customers(amount, name, value, level)
Task: Select amount from accounts where id exists in customers for the same status.
SQL: | SELECT amount FROM accounts AS jac
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06183 | train |
v3 | Schema:
tasks (alias: znob)(name, id, level, status)
categories(date, salary, value, level)
Task: Find id from tasks where value exceeds the minimum salary from categories for the same status.
SQL: | SELECT id FROM tasks AS znob
WHERE value > (
SELECT MIN(salary) FROM categories AS egiv
WHERE egiv.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_06184 | train |
v2 | Schema:
requests (alias: ejof)(level, type, code, date)
projects(id, code, date, status)
Task: Retrieve value from requests that have at least one corresponding entry in projects sharing the same code.
SQL: | SELECT value FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "projects",
"outer_alias": "ejof",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_06185 | train |
v3 | Schema:
employees (alias: bev)(salary, date, code, type)
invoices(type, id, amount, date)
Task: Retrieve value from employees with value above the SUM(salary) of invoices rows sharing the same type.
SQL: | SELECT value FROM employees AS bev
WHERE value > (
SELECT SUM(salary) FROM invoices AS fal
WHERE fal.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "invoices",
"outer_alias": "bev",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06186 | train |
v1 | Schema:
customers (alias: lex)(level, status, date, amount)
regions(salary, id, amount, level)
Task: Select code from customers where status exists in regions for the same type.
SQL: | SELECT code FROM customers AS lex
WHERE status IN (
SELECT status FROM regions AS okiv
WHERE okiv.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "regions",
"outer_alias": "lex",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06187 | train |
v2 | Schema:
transactions (alias: gev)(level, date, name, salary)
departments(amount, date, id, code)
Task: Retrieve name from transactions that have at least one corresponding entry in departments sharing the same code.
SQL: | SELECT name FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06188 | train |
v3 | Schema:
regions (alias: okiv)(name, date, code, level)
tasks(name, amount, value, code)
Task: Find id from regions where salary exceeds the average salary from tasks for the same level.
SQL: | SELECT id FROM regions AS okiv
WHERE salary > (
SELECT AVG(salary) FROM tasks AS znob
WHERE znob.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_06189 | train |
v1 | Schema:
products (alias: nad)(status, type, name, amount)
regions(salary, status, date, id)
Task: Retrieve salary from products whose id is found in regions rows where status matches the outer record.
SQL: | SELECT salary FROM products AS nad
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.status = nad.status
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06190 | train |
v2 | Schema:
staff (alias: xnob)(value, date, salary, status)
items(status, salary, code, date)
Task: Retrieve amount from staff that have at least one corresponding entry in items sharing the same status.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "items",
"outer_alias": "xnob",
"inner_alias": "ikob",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_06191 | train |
v2 | Schema:
schedules (alias: vmob)(status, level, code, name)
categories(date, status, type, code)
Task: Retrieve salary from schedules that have at least one corresponding entry in categories sharing the same type.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_06192 | train |
v1 | Schema:
requests (alias: ejof)(value, id, amount, level)
projects(date, amount, level, salary)
Task: Find salary from requests where type appears in projects entries with matching code.
SQL: | SELECT salary FROM requests AS ejof
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "projects",
"outer_alias": "ejof",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_06193 | train |
v2 | Schema:
regions (alias: okiv)(code, date, type, name)
staff(code, value, name, status)
Task: Retrieve name from regions that have at least one corresponding entry in staff sharing the same id.
SQL: | SELECT name 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": "name",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_06194 | train |
v3 | Schema:
sales (alias: cif)(value, code, status, level)
invoices(code, date, status, salary)
Task: Retrieve code from sales with salary above the COUNT(salary) of invoices rows sharing the same code.
SQL: | SELECT code FROM sales AS cif
WHERE salary > (
SELECT COUNT(salary) FROM invoices AS fal
WHERE fal.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06195 | train |
v3 | Schema:
orders (alias: kab)(amount, name, code, level)
departments(id, value, type, salary)
Task: Retrieve name from orders with value above the MAX(amount) of departments rows sharing the same type.
SQL: | SELECT name FROM orders AS kab
WHERE value > (
SELECT MAX(amount) FROM departments AS dov
WHERE dov.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06196 | train |
v3 | Schema:
categories (alias: egiv)(salary, status, id, code)
requests(date, value, id, amount)
Task: Find name from categories where value exceeds the minimum amount from requests for the same id.
SQL: | SELECT name FROM categories AS egiv
WHERE value > (
SELECT MIN(amount) FROM requests AS ejof
WHERE ejof.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_06197 | train |
v3 | Schema:
requests (alias: ejof)(id, type, amount, salary)
sales(level, name, salary, date)
Task: Retrieve salary from requests with value above the COUNT(salary) of sales rows sharing the same level.
SQL: | SELECT salary FROM requests AS ejof
WHERE value > (
SELECT COUNT(salary) FROM sales AS cif
WHERE cif.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_06198 | train |
v3 | Schema:
sales (alias: cif)(value, type, code, date)
items(amount, code, status, salary)
Task: Find amount from sales where value exceeds the total salary from items for the same level.
SQL: | SELECT amount FROM sales AS cif
WHERE value > (
SELECT SUM(salary) FROM items AS ikob
WHERE ikob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_06199 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.