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:
customers (alias: lex)(type, date, id, amount)
requests(code, value, level, date)
Task: Find amount from customers where amount exceeds the count of value from requests for the same code.
SQL: | SELECT amount FROM customers AS lex
WHERE amount > (
SELECT COUNT(value) FROM requests AS ejof
WHERE ejof.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "lex",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03200 | train |
v3 | Schema:
products (alias: nad)(status, id, level, amount)
items(type, value, level, date)
Task: Retrieve code from products with value above the MIN(salary) of items rows sharing the same code.
SQL: | SELECT code FROM products AS nad
WHERE value > (
SELECT MIN(salary) FROM items AS ikob
WHERE ikob.code = nad.code
); | {
"outer_table": "products",
"inner_table": "items",
"outer_alias": "nad",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03201 | train |
v3 | Schema:
staff (alias: xnob)(level, date, status, id)
requests(name, amount, type, date)
Task: Find value from staff where value exceeds the average value from requests for the same id.
SQL: | SELECT value FROM staff AS xnob
WHERE value > (
SELECT AVG(value) FROM requests AS ejof
WHERE ejof.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03202 | train |
v2 | Schema:
staff (alias: xnob)(salary, code, status, level)
regions(date, salary, type, value)
Task: Find name from staff where a matching record exists in regions with the same status.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "xnob",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03203 | train |
v2 | Schema:
employees (alias: bev)(name, date, value, type)
schedules(status, salary, name, amount)
Task: Retrieve amount from employees that have at least one corresponding entry in schedules sharing the same level.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "schedules",
"outer_alias": "bev",
"inner_alias": "vmob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03204 | train |
v1 | Schema:
projects (alias: uliv)(id, name, type, date)
departments(type, name, value, code)
Task: Select code from projects where type exists in departments for the same type.
SQL: | SELECT code FROM projects AS uliv
WHERE type IN (
SELECT type FROM departments AS dov
WHERE dov.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03205 | train |
v2 | Schema:
shipments (alias: vnob)(salary, type, amount, id)
products(type, value, id, amount)
Task: Find amount from shipments where a matching record exists in products with the same status.
SQL: | SELECT amount FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "products",
"outer_alias": "vnob",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03206 | train |
v2 | Schema:
shipments (alias: vnob)(amount, type, status, id)
invoices(amount, level, id, salary)
Task: Find salary from shipments where a matching record exists in invoices with the same type.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "invoices",
"outer_alias": "vnob",
"inner_alias": "fal",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03207 | train |
v1 | Schema:
sales (alias: cif)(type, id, level, code)
employees(level, type, status, amount)
Task: Retrieve name from sales whose status is found in employees rows where status matches the outer record.
SQL: | SELECT name FROM sales AS cif
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "employees",
"outer_alias": "cif",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03208 | train |
v2 | Schema:
orders (alias: kab)(level, salary, value, type)
categories(date, code, type, level)
Task: Find value from orders where a matching record exists in categories with the same code.
SQL: | SELECT value FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03209 | train |
v3 | Schema:
categories (alias: egiv)(type, name, date, amount)
shipments(value, code, name, id)
Task: Retrieve salary from categories with value above the COUNT(salary) of shipments rows sharing the same level.
SQL: | SELECT salary FROM categories AS egiv
WHERE value > (
SELECT COUNT(salary) FROM shipments AS vnob
WHERE vnob.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "shipments",
"outer_alias": "egiv",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03210 | train |
v3 | Schema:
transactions (alias: gev)(date, name, status, value)
tasks(id, value, status, date)
Task: Retrieve id from transactions with amount above the AVG(value) of tasks rows sharing the same code.
SQL: | SELECT id FROM transactions AS gev
WHERE amount > (
SELECT AVG(value) FROM tasks AS znob
WHERE znob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "tasks",
"outer_alias": "gev",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03211 | train |
v1 | Schema:
tasks (alias: znob)(id, type, salary, level)
invoices(salary, date, name, type)
Task: Select code from tasks where type exists in invoices for the same status.
SQL: | SELECT code FROM tasks AS znob
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03212 | train |
v2 | Schema:
orders (alias: kab)(code, type, salary, status)
sales(amount, name, salary, id)
Task: Retrieve salary from orders that have at least one corresponding entry in sales sharing the same level.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "sales",
"outer_alias": "kab",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03213 | train |
v1 | Schema:
items (alias: ikob)(code, date, salary, status)
employees(value, type, status, name)
Task: Retrieve salary from items whose status is found in employees rows where code matches the outer record.
SQL: | SELECT salary FROM items AS ikob
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "ikob",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03214 | train |
v1 | Schema:
transactions (alias: gev)(level, name, code, date)
employees(value, salary, date, type)
Task: Select value from transactions where level exists in employees for the same code.
SQL: | SELECT value FROM transactions AS gev
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "employees",
"outer_alias": "gev",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03215 | train |
v3 | Schema:
staff (alias: xnob)(name, type, status, code)
schedules(status, type, amount, code)
Task: Find code from staff where salary exceeds the minimum amount from schedules for the same level.
SQL: | SELECT code FROM staff AS xnob
WHERE salary > (
SELECT MIN(amount) FROM schedules AS vmob
WHERE vmob.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "schedules",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03216 | train |
v1 | Schema:
invoices (alias: fal)(id, type, salary, date)
categories(value, amount, date, level)
Task: Select amount from invoices where code exists in categories for the same type.
SQL: | SELECT amount FROM invoices AS fal
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03217 | train |
v2 | Schema:
managers (alias: hac)(id, value, name, date)
categories(name, status, level, code)
Task: Retrieve amount from managers that have at least one corresponding entry in categories sharing the same status.
SQL: | SELECT amount FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03218 | train |
v1 | Schema:
orders (alias: kab)(salary, amount, type, status)
shipments(date, name, salary, value)
Task: Retrieve name from orders whose type is found in shipments rows where code matches the outer record.
SQL: | SELECT name FROM orders AS kab
WHERE type IN (
SELECT type FROM shipments AS vnob
WHERE vnob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03219 | train |
v2 | Schema:
employees (alias: bev)(code, date, id, salary)
regions(value, salary, amount, level)
Task: Retrieve amount from employees that have at least one corresponding entry in regions sharing the same id.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "regions",
"outer_alias": "bev",
"inner_alias": "okiv",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03220 | train |
v1 | Schema:
sales (alias: cif)(name, id, level, code)
accounts(salary, level, type, value)
Task: Retrieve amount from sales whose status is found in accounts rows where type matches the outer record.
SQL: | SELECT amount FROM sales AS cif
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "accounts",
"outer_alias": "cif",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03221 | train |
v3 | Schema:
sales (alias: cif)(code, level, id, value)
accounts(level, type, code, id)
Task: Retrieve value from sales with amount above the MIN(salary) of accounts rows sharing the same id.
SQL: | SELECT value FROM sales AS cif
WHERE amount > (
SELECT MIN(salary) FROM accounts AS jac
WHERE jac.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "accounts",
"outer_alias": "cif",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03222 | train |
v3 | Schema:
managers (alias: hac)(status, date, code, amount)
employees(level, date, salary, amount)
Task: Find name from managers where salary exceeds the total value from employees for the same type.
SQL: | SELECT name FROM managers AS hac
WHERE salary > (
SELECT SUM(value) FROM employees AS bev
WHERE bev.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03223 | train |
v3 | Schema:
transactions (alias: gev)(type, code, amount, status)
departments(code, amount, date, salary)
Task: Retrieve amount from transactions with amount above the COUNT(value) of departments rows sharing the same code.
SQL: | SELECT amount FROM transactions AS gev
WHERE amount > (
SELECT COUNT(value) FROM departments AS dov
WHERE dov.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03224 | train |
v1 | Schema:
sales (alias: cif)(type, date, level, value)
managers(name, type, level, value)
Task: Retrieve id from sales whose status is found in managers rows where id matches the outer record.
SQL: | SELECT id FROM sales AS cif
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03225 | train |
v2 | Schema:
sales (alias: cif)(id, type, value, code)
branches(code, level, type, value)
Task: Retrieve code from sales that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03226 | train |
v2 | Schema:
regions (alias: okiv)(code, name, id, status)
schedules(level, type, id, value)
Task: Retrieve name from regions that have at least one corresponding entry in schedules sharing the same id.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "schedules",
"outer_alias": "okiv",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03227 | train |
v2 | Schema:
invoices (alias: fal)(code, id, salary, status)
employees(type, name, code, amount)
Task: Find code from invoices where a matching record exists in employees with the same code.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03228 | train |
v2 | Schema:
products (alias: nad)(type, status, value, level)
categories(value, id, status, level)
Task: Find code from products where a matching record exists in categories with the same level.
SQL: | SELECT code FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = nad.level
); | {
"outer_table": "products",
"inner_table": "categories",
"outer_alias": "nad",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03229 | train |
v2 | Schema:
shipments (alias: vnob)(date, salary, name, code)
regions(date, id, salary, type)
Task: Retrieve salary from shipments that have at least one corresponding entry in regions sharing the same status.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03230 | train |
v3 | Schema:
shipments (alias: vnob)(level, type, status, date)
products(type, value, amount, date)
Task: Retrieve amount from shipments with value above the COUNT(value) of products rows sharing the same code.
SQL: | SELECT amount FROM shipments AS vnob
WHERE value > (
SELECT COUNT(value) FROM products AS nad
WHERE nad.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "products",
"outer_alias": "vnob",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03231 | train |
v2 | Schema:
customers (alias: lex)(salary, type, code, id)
accounts(name, status, value, code)
Task: Find code from customers where a matching record exists in accounts with the same level.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03232 | train |
v1 | Schema:
items (alias: ikob)(level, name, code, date)
employees(status, date, amount, level)
Task: Retrieve id from items whose type is found in employees rows where status matches the outer record.
SQL: | SELECT id FROM items AS ikob
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "ikob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03233 | train |
v1 | Schema:
products (alias: nad)(level, amount, id, type)
orders(date, type, id, amount)
Task: Retrieve name from products whose type is found in orders rows where level matches the outer record.
SQL: | SELECT name FROM products AS nad
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.level = nad.level
); | {
"outer_table": "products",
"inner_table": "orders",
"outer_alias": "nad",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03234 | train |
v2 | Schema:
tasks (alias: znob)(amount, value, type, status)
staff(date, salary, id, amount)
Task: Retrieve name from tasks that have at least one corresponding entry in staff sharing the same type.
SQL: | SELECT name FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03235 | train |
v2 | Schema:
staff (alias: xnob)(name, level, code, amount)
accounts(code, date, name, amount)
Task: Retrieve amount from staff that have at least one corresponding entry in accounts sharing the same level.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03236 | train |
v1 | Schema:
items (alias: ikob)(name, amount, type, code)
products(amount, status, id, value)
Task: Retrieve salary from items whose id is found in products rows where code matches the outer record.
SQL: | SELECT salary FROM items AS ikob
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03237 | train |
v3 | Schema:
departments (alias: dov)(id, salary, amount, name)
categories(date, id, amount, type)
Task: Retrieve code from departments with value above the COUNT(amount) of categories rows sharing the same id.
SQL: | SELECT code FROM departments AS dov
WHERE value > (
SELECT COUNT(amount) FROM categories AS egiv
WHERE egiv.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03238 | train |
v1 | Schema:
managers (alias: hac)(date, amount, level, id)
departments(name, salary, type, date)
Task: Retrieve code from managers whose code is found in departments rows where id matches the outer record.
SQL: | SELECT code FROM managers AS hac
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "departments",
"outer_alias": "hac",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03239 | train |
v2 | Schema:
tasks (alias: znob)(amount, level, date, code)
invoices(id, value, status, code)
Task: Retrieve value from tasks that have at least one corresponding entry in invoices sharing the same id.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03240 | train |
v3 | Schema:
managers (alias: hac)(date, code, type, name)
employees(type, date, name, id)
Task: Retrieve name from managers with amount above the MAX(value) of employees rows sharing the same status.
SQL: | SELECT name FROM managers AS hac
WHERE amount > (
SELECT MAX(value) FROM employees AS bev
WHERE bev.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03241 | train |
v1 | Schema:
requests (alias: ejof)(status, level, salary, type)
employees(date, name, amount, type)
Task: Retrieve code from requests whose id is found in employees rows where level matches the outer record.
SQL: | SELECT code FROM requests AS ejof
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03242 | train |
v3 | Schema:
requests (alias: ejof)(type, salary, value, level)
departments(level, id, status, code)
Task: Retrieve id from requests with amount above the AVG(salary) of departments rows sharing the same id.
SQL: | SELECT id FROM requests AS ejof
WHERE amount > (
SELECT AVG(salary) FROM departments AS dov
WHERE dov.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "departments",
"outer_alias": "ejof",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03243 | train |
v1 | Schema:
schedules (alias: vmob)(status, name, salary, type)
accounts(status, id, value, date)
Task: Retrieve value from schedules whose status is found in accounts rows where level matches the outer record.
SQL: | SELECT value FROM schedules AS vmob
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03244 | train |
v3 | Schema:
projects (alias: uliv)(status, salary, code, id)
sales(value, amount, name, type)
Task: Retrieve amount from projects with salary above the SUM(salary) of sales rows sharing the same code.
SQL: | SELECT amount FROM projects AS uliv
WHERE salary > (
SELECT SUM(salary) FROM sales AS cif
WHERE cif.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03245 | train |
v1 | Schema:
regions (alias: okiv)(salary, level, code, type)
shipments(name, status, id, code)
Task: Select name from regions where code exists in shipments for the same level.
SQL: | SELECT name FROM regions AS okiv
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "shipments",
"outer_alias": "okiv",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03246 | train |
v3 | Schema:
categories (alias: egiv)(level, name, status, id)
items(amount, code, value, id)
Task: Retrieve name from categories with value above the SUM(salary) of items rows sharing the same code.
SQL: | SELECT name FROM categories AS egiv
WHERE value > (
SELECT SUM(salary) FROM items AS ikob
WHERE ikob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "items",
"outer_alias": "egiv",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03247 | train |
v2 | Schema:
invoices (alias: fal)(salary, level, status, date)
accounts(name, date, salary, type)
Task: Find salary from invoices where a matching record exists in accounts with the same type.
SQL: | SELECT salary 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": "salary",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03248 | train |
v3 | Schema:
employees (alias: bev)(amount, date, type, code)
shipments(level, id, salary, name)
Task: Find name from employees where value exceeds the total salary from shipments for the same type.
SQL: | SELECT name FROM employees AS bev
WHERE value > (
SELECT SUM(salary) FROM shipments AS vnob
WHERE vnob.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "name",
"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_03249 | train |
v2 | Schema:
products (alias: nad)(type, salary, level, date)
shipments(type, value, salary, amount)
Task: Find name from products where a matching record exists in shipments with the same level.
SQL: | SELECT name FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = nad.level
); | {
"outer_table": "products",
"inner_table": "shipments",
"outer_alias": "nad",
"inner_alias": "vnob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03250 | train |
v2 | Schema:
items (alias: ikob)(id, status, code, amount)
shipments(value, status, level, id)
Task: Retrieve amount from items that have at least one corresponding entry in shipments sharing the same level.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03251 | train |
v1 | Schema:
products (alias: nad)(amount, salary, level, id)
projects(status, level, id, salary)
Task: Retrieve amount from products whose type is found in projects rows where status matches the outer record.
SQL: | SELECT amount FROM products AS nad
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.status = nad.status
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03252 | train |
v3 | Schema:
accounts (alias: jac)(salary, code, date, amount)
invoices(name, type, level, code)
Task: Retrieve amount from accounts with amount above the SUM(value) of invoices rows sharing the same level.
SQL: | SELECT amount FROM accounts AS jac
WHERE amount > (
SELECT SUM(value) FROM invoices AS fal
WHERE fal.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03253 | train |
v1 | Schema:
staff (alias: xnob)(salary, level, amount, code)
schedules(id, type, name, value)
Task: Find value from staff where id appears in schedules entries with matching type.
SQL: | SELECT value FROM staff AS xnob
WHERE id IN (
SELECT id FROM schedules AS vmob
WHERE vmob.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "schedules",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03254 | train |
v3 | Schema:
transactions (alias: gev)(date, value, name, amount)
projects(amount, date, code, level)
Task: Find code from transactions where value exceeds the count of amount from projects for the same type.
SQL: | SELECT code FROM transactions AS gev
WHERE value > (
SELECT COUNT(amount) FROM projects AS uliv
WHERE uliv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03255 | train |
v2 | Schema:
departments (alias: dov)(amount, salary, code, status)
staff(name, salary, type, code)
Task: Retrieve code from departments that have at least one corresponding entry in staff sharing the same status.
SQL: | SELECT code FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "staff",
"outer_alias": "dov",
"inner_alias": "xnob",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03256 | train |
v3 | Schema:
branches (alias: agov)(name, amount, date, type)
categories(date, value, type, status)
Task: Retrieve salary from branches with salary above the AVG(salary) of categories rows sharing the same type.
SQL: | SELECT salary FROM branches AS agov
WHERE salary > (
SELECT AVG(salary) FROM categories AS egiv
WHERE egiv.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03257 | train |
v3 | Schema:
transactions (alias: gev)(value, id, name, amount)
staff(salary, type, name, value)
Task: Retrieve code from transactions with amount above the SUM(value) of staff rows sharing the same level.
SQL: | SELECT code FROM transactions AS gev
WHERE amount > (
SELECT SUM(value) FROM staff AS xnob
WHERE xnob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03258 | train |
v3 | Schema:
branches (alias: agov)(level, status, type, code)
invoices(id, name, status, value)
Task: Find amount from branches where value exceeds the minimum amount from invoices for the same status.
SQL: | SELECT amount FROM branches AS agov
WHERE value > (
SELECT MIN(amount) FROM invoices AS fal
WHERE fal.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "invoices",
"outer_alias": "agov",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03259 | train |
v3 | Schema:
transactions (alias: gev)(date, salary, name, status)
employees(amount, salary, code, status)
Task: Find value from transactions where amount exceeds the total value from employees for the same level.
SQL: | SELECT value FROM transactions AS gev
WHERE amount > (
SELECT SUM(value) FROM employees AS bev
WHERE bev.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "employees",
"outer_alias": "gev",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03260 | train |
v3 | Schema:
staff (alias: xnob)(salary, date, level, id)
categories(level, type, salary, date)
Task: Find name from staff where value exceeds the total amount from categories for the same level.
SQL: | SELECT name FROM staff AS xnob
WHERE value > (
SELECT SUM(amount) FROM categories AS egiv
WHERE egiv.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03261 | train |
v3 | Schema:
staff (alias: xnob)(level, amount, code, name)
tasks(name, type, id, value)
Task: Find code from staff where value exceeds the maximum value from tasks for the same type.
SQL: | SELECT code FROM staff AS xnob
WHERE value > (
SELECT MAX(value) FROM tasks AS znob
WHERE znob.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03262 | train |
v2 | Schema:
tasks (alias: znob)(id, amount, status, level)
managers(value, date, name, salary)
Task: Retrieve id from tasks that have at least one corresponding entry in managers sharing the same id.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "managers",
"outer_alias": "znob",
"inner_alias": "hac",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03263 | train |
v2 | Schema:
regions (alias: okiv)(level, name, value, id)
sales(level, status, amount, code)
Task: Retrieve amount from regions that have at least one corresponding entry in sales sharing the same code.
SQL: | SELECT amount FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03264 | train |
v2 | Schema:
transactions (alias: gev)(level, amount, status, salary)
accounts(status, level, code, id)
Task: Retrieve value from transactions that have at least one corresponding entry in accounts sharing the same type.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "accounts",
"outer_alias": "gev",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03265 | train |
v3 | Schema:
categories (alias: egiv)(level, id, name, type)
products(name, id, type, date)
Task: Retrieve id from categories with amount above the MAX(value) of products rows sharing the same code.
SQL: | SELECT id FROM categories AS egiv
WHERE amount > (
SELECT MAX(value) FROM products AS nad
WHERE nad.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "products",
"outer_alias": "egiv",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03266 | train |
v2 | Schema:
regions (alias: okiv)(level, value, amount, name)
orders(value, code, amount, date)
Task: Find value from regions where a matching record exists in orders with the same status.
SQL: | SELECT value FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03267 | train |
v2 | Schema:
sales (alias: cif)(amount, level, salary, value)
shipments(salary, level, code, date)
Task: Find value from sales where a matching record exists in shipments with the same level.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03268 | train |
v3 | Schema:
invoices (alias: fal)(salary, id, status, level)
tasks(date, value, level, status)
Task: Retrieve id from invoices with value above the SUM(value) of tasks rows sharing the same type.
SQL: | SELECT id FROM invoices AS fal
WHERE value > (
SELECT SUM(value) FROM tasks AS znob
WHERE znob.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "tasks",
"outer_alias": "fal",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03269 | train |
v3 | Schema:
customers (alias: lex)(level, status, name, type)
schedules(salary, status, id, type)
Task: Find salary from customers where amount exceeds the count of salary from schedules for the same status.
SQL: | SELECT salary FROM customers AS lex
WHERE amount > (
SELECT COUNT(salary) FROM schedules AS vmob
WHERE vmob.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03270 | train |
v1 | Schema:
tasks (alias: znob)(name, type, code, salary)
categories(value, code, date, amount)
Task: Retrieve amount from tasks whose id is found in categories rows where status matches the outer record.
SQL: | SELECT amount FROM tasks AS znob
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03271 | train |
v2 | Schema:
items (alias: ikob)(level, amount, value, type)
customers(amount, date, value, status)
Task: Retrieve name from items that have at least one corresponding entry in customers sharing the same level.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03272 | train |
v3 | Schema:
employees (alias: bev)(id, status, name, amount)
projects(date, name, type, level)
Task: Retrieve id from employees with value above the SUM(salary) of projects rows sharing the same id.
SQL: | SELECT id FROM employees AS bev
WHERE value > (
SELECT SUM(salary) FROM projects AS uliv
WHERE uliv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03273 | train |
v3 | Schema:
projects (alias: uliv)(name, date, type, value)
departments(status, level, type, value)
Task: Retrieve amount from projects with value above the MIN(salary) of departments rows sharing the same code.
SQL: | SELECT amount FROM projects AS uliv
WHERE value > (
SELECT MIN(salary) FROM departments AS dov
WHERE dov.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03274 | train |
v2 | Schema:
managers (alias: hac)(amount, date, value, type)
items(salary, level, code, amount)
Task: Find value from managers where a matching record exists in items with the same level.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03275 | train |
v1 | Schema:
shipments (alias: vnob)(date, type, level, value)
managers(code, amount, id, status)
Task: Find amount from shipments where type appears in managers entries with matching code.
SQL: | SELECT amount FROM shipments AS vnob
WHERE type IN (
SELECT type FROM managers AS hac
WHERE hac.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "managers",
"outer_alias": "vnob",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03276 | train |
v2 | Schema:
managers (alias: hac)(date, id, salary, status)
tasks(salary, name, amount, code)
Task: Find code from managers where a matching record exists in tasks with the same code.
SQL: | SELECT code FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03277 | train |
v2 | Schema:
categories (alias: egiv)(amount, type, code, date)
departments(id, status, value, name)
Task: Find id from categories where a matching record exists in departments with the same id.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "departments",
"outer_alias": "egiv",
"inner_alias": "dov",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03278 | train |
v3 | Schema:
sales (alias: cif)(status, salary, type, value)
staff(value, salary, level, amount)
Task: Retrieve salary from sales with salary above the MAX(amount) of staff rows sharing the same level.
SQL: | SELECT salary FROM sales AS cif
WHERE salary > (
SELECT MAX(amount) FROM staff AS xnob
WHERE xnob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "staff",
"outer_alias": "cif",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03279 | train |
v3 | Schema:
invoices (alias: fal)(level, salary, code, status)
accounts(amount, level, value, id)
Task: Retrieve name from invoices with amount above the COUNT(salary) of accounts rows sharing the same code.
SQL: | SELECT name FROM invoices AS fal
WHERE amount > (
SELECT COUNT(salary) FROM accounts AS jac
WHERE jac.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03280 | train |
v1 | Schema:
items (alias: ikob)(name, date, amount, code)
requests(name, amount, salary, value)
Task: Select salary from items where status exists in requests for the same id.
SQL: | SELECT salary FROM items AS ikob
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "ikob",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03281 | train |
v2 | Schema:
sales (alias: cif)(name, code, id, amount)
shipments(type, name, amount, salary)
Task: Find amount from sales where a matching record exists in shipments with the same type.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03282 | train |
v1 | Schema:
tasks (alias: znob)(id, amount, name, type)
requests(value, status, name, date)
Task: Select id from tasks where status exists in requests for the same status.
SQL: | SELECT id FROM tasks AS znob
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03283 | train |
v3 | Schema:
shipments (alias: vnob)(code, name, date, id)
projects(code, date, value, type)
Task: Find value from shipments where amount exceeds the minimum amount from projects for the same id.
SQL: | SELECT value FROM shipments AS vnob
WHERE amount > (
SELECT MIN(amount) FROM projects AS uliv
WHERE uliv.id = vnob.id
); | {
"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": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03284 | train |
v2 | Schema:
schedules (alias: vmob)(status, type, value, salary)
projects(id, code, value, level)
Task: Retrieve salary from schedules that have at least one corresponding entry in projects sharing the same level.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "projects",
"outer_alias": "vmob",
"inner_alias": "uliv",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03285 | train |
v1 | Schema:
projects (alias: uliv)(name, amount, code, value)
sales(date, level, id, status)
Task: Retrieve code from projects whose status is found in sales rows where type matches the outer record.
SQL: | SELECT code FROM projects AS uliv
WHERE status IN (
SELECT status FROM sales AS cif
WHERE cif.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03286 | train |
v3 | Schema:
branches (alias: agov)(status, type, name, value)
customers(date, type, salary, status)
Task: Retrieve name from branches with amount above the MIN(value) of customers rows sharing the same code.
SQL: | SELECT name FROM branches AS agov
WHERE amount > (
SELECT MIN(value) FROM customers AS lex
WHERE lex.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03287 | train |
v2 | Schema:
requests (alias: ejof)(status, code, value, name)
accounts(salary, code, id, name)
Task: Find name from requests where a matching record exists in accounts with the same code.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03288 | train |
v1 | Schema:
regions (alias: okiv)(type, amount, code, date)
projects(value, type, code, name)
Task: Find amount from regions where id appears in projects entries with matching level.
SQL: | SELECT amount FROM regions AS okiv
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03289 | train |
v3 | Schema:
managers (alias: hac)(amount, name, id, level)
projects(salary, id, value, code)
Task: Retrieve code from managers with salary above the AVG(salary) of projects rows sharing the same type.
SQL: | SELECT code FROM managers AS hac
WHERE salary > (
SELECT AVG(salary) FROM projects AS uliv
WHERE uliv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "projects",
"outer_alias": "hac",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03290 | train |
v3 | Schema:
categories (alias: egiv)(name, status, amount, type)
items(value, amount, status, code)
Task: Find code from categories where salary exceeds the total value from items for the same level.
SQL: | SELECT code FROM categories AS egiv
WHERE salary > (
SELECT SUM(value) FROM items AS ikob
WHERE ikob.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "items",
"outer_alias": "egiv",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03291 | train |
v1 | Schema:
branches (alias: agov)(date, salary, level, value)
shipments(name, salary, value, id)
Task: Find id from branches where code appears in shipments entries with matching type.
SQL: | SELECT id FROM branches AS agov
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03292 | train |
v1 | Schema:
accounts (alias: jac)(type, code, value, id)
transactions(level, code, salary, status)
Task: Retrieve amount from accounts whose id is found in transactions rows where code matches the outer record.
SQL: | SELECT amount FROM accounts AS jac
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03293 | train |
v3 | Schema:
sales (alias: cif)(name, value, status, id)
categories(type, date, amount, status)
Task: Retrieve value from sales with value above the COUNT(amount) of categories rows sharing the same type.
SQL: | SELECT value FROM sales AS cif
WHERE value > (
SELECT COUNT(amount) FROM categories AS egiv
WHERE egiv.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03294 | train |
v2 | Schema:
schedules (alias: vmob)(type, salary, code, value)
invoices(level, amount, value, type)
Task: Retrieve amount from schedules that have at least one corresponding entry in invoices sharing the same id.
SQL: | SELECT amount FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "invoices",
"outer_alias": "vmob",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03295 | train |
v1 | Schema:
shipments (alias: vnob)(id, name, date, type)
employees(salary, type, id, code)
Task: Select id from shipments where type exists in employees for the same code.
SQL: | SELECT id FROM shipments AS vnob
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "employees",
"outer_alias": "vnob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03296 | train |
v3 | Schema:
items (alias: ikob)(status, salary, name, date)
departments(level, date, value, name)
Task: Find amount from items where value exceeds the count of salary from departments for the same level.
SQL: | SELECT amount FROM items AS ikob
WHERE value > (
SELECT COUNT(salary) FROM departments AS dov
WHERE dov.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "departments",
"outer_alias": "ikob",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03297 | train |
v1 | Schema:
accounts (alias: jac)(salary, level, status, value)
departments(amount, date, salary, id)
Task: Select id from accounts where status exists in departments for the same status.
SQL: | SELECT id FROM accounts AS jac
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "departments",
"outer_alias": "jac",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03298 | train |
v1 | Schema:
items (alias: ikob)(type, date, amount, name)
accounts(level, amount, name, id)
Task: Find code from items where id appears in accounts entries with matching type.
SQL: | SELECT code FROM items AS ikob
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "accounts",
"outer_alias": "ikob",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03299 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.