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 |
|---|---|---|---|---|---|---|
v2 | Schema:
orders (alias: kab)(type, value, level, id)
branches(type, value, level, code)
Task: Find salary from orders where a matching record exists in branches with the same status.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05200 | train |
v3 | Schema:
accounts (alias: jac)(status, salary, level, type)
staff(level, type, id, date)
Task: Retrieve value from accounts with value above the AVG(salary) of staff rows sharing the same type.
SQL: | SELECT value FROM accounts AS jac
WHERE value > (
SELECT AVG(salary) FROM staff AS xnob
WHERE xnob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05201 | train |
v2 | Schema:
requests (alias: ejof)(type, id, level, name)
sales(status, id, amount, date)
Task: Retrieve amount from requests that have at least one corresponding entry in sales sharing the same code.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05202 | train |
v2 | Schema:
employees (alias: bev)(status, salary, amount, level)
items(id, level, salary, value)
Task: Find id from employees where a matching record exists in items with the same status.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "items",
"outer_alias": "bev",
"inner_alias": "ikob",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05203 | train |
v2 | Schema:
projects (alias: uliv)(id, code, date, type)
requests(date, amount, value, type)
Task: Retrieve id from projects that have at least one corresponding entry in requests sharing the same status.
SQL: | SELECT id FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "requests",
"outer_alias": "uliv",
"inner_alias": "ejof",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05204 | train |
v2 | Schema:
orders (alias: kab)(type, value, date, name)
tasks(date, type, value, id)
Task: Retrieve name from orders that have at least one corresponding entry in tasks sharing the same level.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "tasks",
"outer_alias": "kab",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05205 | train |
v1 | Schema:
invoices (alias: fal)(value, name, type, amount)
departments(level, type, salary, status)
Task: Find amount from invoices where id appears in departments entries with matching id.
SQL: | SELECT amount FROM invoices AS fal
WHERE id IN (
SELECT id FROM departments AS dov
WHERE dov.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "departments",
"outer_alias": "fal",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05206 | train |
v1 | Schema:
employees (alias: bev)(amount, salary, level, code)
departments(date, amount, value, status)
Task: Find amount from employees where level appears in departments entries with matching id.
SQL: | SELECT amount FROM employees AS bev
WHERE level IN (
SELECT level FROM departments AS dov
WHERE dov.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05207 | train |
v2 | Schema:
items (alias: ikob)(type, salary, status, name)
regions(level, name, date, salary)
Task: Retrieve amount from items that have at least one corresponding entry in regions sharing the same type.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "regions",
"outer_alias": "ikob",
"inner_alias": "okiv",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05208 | train |
v2 | Schema:
orders (alias: kab)(level, amount, date, code)
shipments(date, salary, value, level)
Task: Retrieve value from orders that have at least one corresponding entry in shipments sharing the same type.
SQL: | SELECT value FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05209 | train |
v3 | Schema:
products (alias: nad)(type, code, amount, name)
items(name, date, id, level)
Task: Retrieve name from products with value above the SUM(salary) of items rows sharing the same code.
SQL: | SELECT name FROM products AS nad
WHERE value > (
SELECT SUM(salary) FROM items AS ikob
WHERE ikob.code = nad.code
); | {
"outer_table": "products",
"inner_table": "items",
"outer_alias": "nad",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05210 | train |
v2 | Schema:
regions (alias: okiv)(code, type, name, salary)
customers(date, status, salary, name)
Task: Find code from regions where a matching record exists in customers with the same code.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05211 | train |
v2 | Schema:
employees (alias: bev)(amount, id, name, value)
accounts(amount, id, name, status)
Task: Find salary from employees where a matching record exists in accounts with the same level.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05212 | train |
v1 | Schema:
customers (alias: lex)(date, value, amount, level)
projects(status, value, level, id)
Task: Find value from customers where code appears in projects entries with matching level.
SQL: | SELECT value FROM customers AS lex
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05213 | train |
v2 | Schema:
departments (alias: dov)(name, code, status, id)
managers(salary, name, status, amount)
Task: Retrieve value from departments that have at least one corresponding entry in managers sharing the same type.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05214 | train |
v1 | Schema:
invoices (alias: fal)(date, name, value, code)
categories(value, status, date, name)
Task: Retrieve value from invoices whose id is found in categories rows where type matches the outer record.
SQL: | SELECT value FROM invoices AS fal
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05215 | train |
v1 | Schema:
managers (alias: hac)(name, level, status, type)
sales(value, code, id, type)
Task: Select name from managers where code exists in sales for the same id.
SQL: | SELECT name FROM managers AS hac
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05216 | train |
v2 | Schema:
accounts (alias: jac)(id, date, code, value)
requests(amount, level, salary, date)
Task: Retrieve salary from accounts that have at least one corresponding entry in requests sharing the same id.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "requests",
"outer_alias": "jac",
"inner_alias": "ejof",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05217 | train |
v1 | Schema:
departments (alias: dov)(level, code, value, name)
managers(status, name, type, amount)
Task: Retrieve name from departments whose level is found in managers rows where status matches the outer record.
SQL: | SELECT name FROM departments AS dov
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05218 | train |
v3 | Schema:
requests (alias: ejof)(status, amount, level, code)
projects(level, code, amount, name)
Task: Retrieve salary from requests with salary above the MIN(salary) of projects rows sharing the same level.
SQL: | SELECT salary FROM requests AS ejof
WHERE salary > (
SELECT MIN(salary) FROM projects AS uliv
WHERE uliv.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "projects",
"outer_alias": "ejof",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05219 | train |
v2 | Schema:
categories (alias: egiv)(date, name, code, value)
orders(type, status, amount, value)
Task: Find value from categories where a matching record exists in orders with the same type.
SQL: | SELECT value FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05220 | train |
v2 | Schema:
products (alias: nad)(salary, level, date, type)
orders(level, name, amount, value)
Task: Retrieve salary from products that have at least one corresponding entry in orders sharing the same code.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = nad.code
); | {
"outer_table": "products",
"inner_table": "orders",
"outer_alias": "nad",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05221 | train |
v3 | Schema:
employees (alias: bev)(amount, value, type, id)
departments(id, code, value, status)
Task: Find id from employees where amount exceeds the total salary from departments for the same type.
SQL: | SELECT id FROM employees AS bev
WHERE amount > (
SELECT SUM(salary) FROM departments AS dov
WHERE dov.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05222 | train |
v3 | Schema:
requests (alias: ejof)(type, name, status, salary)
regions(level, id, status, amount)
Task: Retrieve salary from requests with amount above the MIN(value) of regions rows sharing the same code.
SQL: | SELECT salary FROM requests AS ejof
WHERE amount > (
SELECT MIN(value) FROM regions AS okiv
WHERE okiv.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "regions",
"outer_alias": "ejof",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05223 | train |
v1 | Schema:
products (alias: nad)(salary, type, name, date)
staff(code, salary, level, value)
Task: Retrieve amount from products whose level is found in staff rows where type matches the outer record.
SQL: | SELECT amount FROM products AS nad
WHERE level IN (
SELECT level FROM staff AS xnob
WHERE xnob.type = nad.type
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05224 | train |
v2 | Schema:
items (alias: ikob)(type, id, salary, date)
employees(level, value, amount, name)
Task: Find id from items where a matching record exists in employees with the same status.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "ikob",
"inner_alias": "bev",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05225 | train |
v3 | Schema:
projects (alias: uliv)(date, amount, id, level)
transactions(value, id, type, status)
Task: Find salary from projects where amount exceeds the maximum value from transactions for the same level.
SQL: | SELECT salary FROM projects AS uliv
WHERE amount > (
SELECT MAX(value) FROM transactions AS gev
WHERE gev.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05226 | train |
v3 | Schema:
requests (alias: ejof)(status, amount, type, value)
products(amount, date, name, salary)
Task: Find name from requests where amount exceeds the total salary from products for the same status.
SQL: | SELECT name FROM requests AS ejof
WHERE amount > (
SELECT SUM(salary) FROM products AS nad
WHERE nad.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ejof",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05227 | train |
v1 | Schema:
shipments (alias: vnob)(id, name, code, level)
accounts(type, amount, level, value)
Task: Select code from shipments where type exists in accounts for the same status.
SQL: | SELECT code FROM shipments AS vnob
WHERE type IN (
SELECT type FROM accounts AS jac
WHERE jac.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05228 | train |
v2 | Schema:
accounts (alias: jac)(type, value, level, salary)
invoices(type, value, id, level)
Task: Retrieve name from accounts that have at least one corresponding entry in invoices sharing the same code.
SQL: | SELECT name FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05229 | train |
v3 | Schema:
shipments (alias: vnob)(status, name, id, type)
sales(id, amount, code, value)
Task: Retrieve code from shipments with value above the AVG(value) of sales rows sharing the same status.
SQL: | SELECT code FROM shipments AS vnob
WHERE value > (
SELECT AVG(value) FROM sales AS cif
WHERE cif.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05230 | train |
v3 | Schema:
accounts (alias: jac)(name, amount, date, value)
branches(name, date, amount, value)
Task: Find name from accounts where value exceeds the average salary from branches for the same status.
SQL: | SELECT name FROM accounts AS jac
WHERE value > (
SELECT AVG(salary) FROM branches AS agov
WHERE agov.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "branches",
"outer_alias": "jac",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05231 | train |
v1 | Schema:
orders (alias: kab)(code, date, status, amount)
transactions(id, name, status, level)
Task: Find id from orders where id appears in transactions entries with matching status.
SQL: | SELECT id FROM orders AS kab
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05232 | train |
v2 | Schema:
managers (alias: hac)(name, value, status, date)
accounts(name, code, id, status)
Task: Find value from managers where a matching record exists in accounts with the same level.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "accounts",
"outer_alias": "hac",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05233 | train |
v1 | Schema:
schedules (alias: vmob)(id, value, status, amount)
staff(name, value, amount, status)
Task: Find amount from schedules where status appears in staff entries with matching code.
SQL: | SELECT amount FROM schedules AS vmob
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "staff",
"outer_alias": "vmob",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05234 | train |
v1 | Schema:
sales (alias: cif)(status, id, value, name)
staff(value, name, date, salary)
Task: Select value from sales where id exists in staff for the same level.
SQL: | SELECT value FROM sales AS cif
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "staff",
"outer_alias": "cif",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05235 | train |
v2 | Schema:
managers (alias: hac)(date, amount, name, value)
items(name, amount, type, date)
Task: Find amount from managers where a matching record exists in items with the same type.
SQL: | SELECT amount FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05236 | train |
v2 | Schema:
regions (alias: okiv)(salary, type, amount, value)
products(name, id, date, code)
Task: Retrieve amount from regions that have at least one corresponding entry in products sharing the same status.
SQL: | SELECT amount FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05237 | train |
v2 | Schema:
orders (alias: kab)(id, value, level, amount)
products(level, code, type, value)
Task: Find name from orders where a matching record exists in products with the same status.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05238 | train |
v3 | Schema:
accounts (alias: jac)(level, status, amount, value)
orders(salary, id, amount, name)
Task: Find id from accounts where amount exceeds the maximum value from orders for the same id.
SQL: | SELECT id FROM accounts AS jac
WHERE amount > (
SELECT MAX(value) FROM orders AS kab
WHERE kab.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "orders",
"outer_alias": "jac",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05239 | train |
v1 | Schema:
schedules (alias: vmob)(salary, type, code, value)
shipments(status, code, amount, name)
Task: Find id from schedules where code appears in shipments entries with matching status.
SQL: | SELECT id FROM schedules AS vmob
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05240 | train |
v1 | Schema:
branches (alias: agov)(id, name, status, salary)
items(code, type, salary, status)
Task: Select salary from branches where status exists in items for the same status.
SQL: | SELECT salary FROM branches AS agov
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05241 | train |
v3 | Schema:
categories (alias: egiv)(code, type, salary, name)
invoices(name, value, level, status)
Task: Find code from categories where amount exceeds the maximum salary from invoices for the same id.
SQL: | SELECT code FROM categories AS egiv
WHERE amount > (
SELECT MAX(salary) FROM invoices AS fal
WHERE fal.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05242 | train |
v2 | Schema:
employees (alias: bev)(value, amount, type, level)
managers(status, level, code, amount)
Task: Find value from employees where a matching record exists in managers with the same level.
SQL: | SELECT value FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "managers",
"outer_alias": "bev",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05243 | train |
v1 | Schema:
orders (alias: kab)(amount, type, name, salary)
items(code, salary, type, date)
Task: Retrieve value from orders whose id is found in items rows where code matches the outer record.
SQL: | SELECT value FROM orders AS kab
WHERE id IN (
SELECT id FROM items AS ikob
WHERE ikob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "items",
"outer_alias": "kab",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05244 | train |
v1 | Schema:
transactions (alias: gev)(code, status, date, amount)
customers(id, amount, value, date)
Task: Select value from transactions where level exists in customers for the same code.
SQL: | SELECT value FROM transactions AS gev
WHERE level IN (
SELECT level FROM customers AS lex
WHERE lex.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05245 | train |
v2 | Schema:
transactions (alias: gev)(amount, type, value, date)
projects(salary, status, level, type)
Task: Retrieve code from transactions that have at least one corresponding entry in projects sharing the same status.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05246 | train |
v3 | Schema:
departments (alias: dov)(salary, id, date, type)
invoices(code, type, id, status)
Task: Retrieve amount from departments with value above the AVG(amount) of invoices rows sharing the same code.
SQL: | SELECT amount FROM departments AS dov
WHERE value > (
SELECT AVG(amount) FROM invoices AS fal
WHERE fal.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05247 | train |
v3 | Schema:
tasks (alias: znob)(code, level, date, id)
items(type, name, id, date)
Task: Retrieve value from tasks with value above the COUNT(salary) of items rows sharing the same id.
SQL: | SELECT value FROM tasks AS znob
WHERE value > (
SELECT COUNT(salary) FROM items AS ikob
WHERE ikob.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "items",
"outer_alias": "znob",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05248 | train |
v3 | Schema:
regions (alias: okiv)(name, salary, amount, status)
staff(status, id, level, amount)
Task: Find id from regions where amount exceeds the average salary from staff for the same id.
SQL: | SELECT id FROM regions AS okiv
WHERE amount > (
SELECT AVG(salary) FROM staff AS xnob
WHERE xnob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05249 | train |
v2 | Schema:
managers (alias: hac)(value, status, date, code)
projects(salary, date, code, value)
Task: Retrieve salary from managers that have at least one corresponding entry in projects sharing the same status.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "projects",
"outer_alias": "hac",
"inner_alias": "uliv",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05250 | train |
v2 | Schema:
departments (alias: dov)(value, status, code, salary)
orders(name, level, status, type)
Task: Find id from departments where a matching record exists in orders with the same level.
SQL: | SELECT id FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "orders",
"outer_alias": "dov",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05251 | train |
v3 | Schema:
customers (alias: lex)(type, name, date, code)
items(level, value, type, amount)
Task: Find id from customers where salary exceeds the count of salary from items for the same type.
SQL: | SELECT id FROM customers AS lex
WHERE salary > (
SELECT COUNT(salary) FROM items AS ikob
WHERE ikob.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05252 | train |
v1 | Schema:
products (alias: nad)(amount, type, status, code)
sales(level, value, amount, code)
Task: Find name from products where code appears in sales entries with matching code.
SQL: | SELECT name FROM products AS nad
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.code = nad.code
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "nad",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05253 | train |
v2 | Schema:
departments (alias: dov)(status, level, amount, code)
customers(id, type, salary, status)
Task: Retrieve code from departments that have at least one corresponding entry in customers sharing the same level.
SQL: | SELECT code FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "customers",
"outer_alias": "dov",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05254 | train |
v1 | Schema:
projects (alias: uliv)(status, code, value, type)
branches(amount, salary, level, type)
Task: Select name from projects where id exists in branches for the same status.
SQL: | SELECT name FROM projects AS uliv
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "branches",
"outer_alias": "uliv",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05255 | train |
v2 | Schema:
requests (alias: ejof)(amount, id, level, type)
transactions(type, name, code, status)
Task: Find salary from requests where a matching record exists in transactions with the same status.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "transactions",
"outer_alias": "ejof",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05256 | train |
v1 | Schema:
regions (alias: okiv)(id, name, status, type)
requests(name, status, date, code)
Task: Find value from regions where code appears in requests entries with matching code.
SQL: | SELECT value FROM regions AS okiv
WHERE code IN (
SELECT code FROM requests AS ejof
WHERE ejof.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "requests",
"outer_alias": "okiv",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05257 | train |
v1 | Schema:
transactions (alias: gev)(name, level, value, status)
customers(salary, type, level, date)
Task: Find value from transactions where type appears in customers entries with matching status.
SQL: | SELECT value FROM transactions AS gev
WHERE type IN (
SELECT type 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": "type",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05258 | train |
v1 | Schema:
items (alias: ikob)(amount, salary, code, name)
products(name, value, level, salary)
Task: Select name from items where level exists in products for the same type.
SQL: | SELECT name FROM items AS ikob
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05259 | train |
v2 | Schema:
orders (alias: kab)(level, code, id, amount)
managers(amount, value, date, status)
Task: Find salary from orders where a matching record exists in managers with the same level.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "kab",
"inner_alias": "hac",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05260 | train |
v3 | Schema:
projects (alias: uliv)(status, value, salary, name)
staff(date, level, status, value)
Task: Retrieve value from projects with amount above the MIN(salary) of staff rows sharing the same type.
SQL: | SELECT value FROM projects AS uliv
WHERE amount > (
SELECT MIN(salary) FROM staff AS xnob
WHERE xnob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05261 | train |
v2 | Schema:
staff (alias: xnob)(status, name, type, amount)
branches(name, salary, value, status)
Task: Retrieve code from staff that have at least one corresponding entry in branches sharing the same code.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "branches",
"outer_alias": "xnob",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05262 | train |
v2 | Schema:
employees (alias: bev)(code, date, name, id)
regions(status, name, amount, date)
Task: Find id from employees where a matching record exists in regions with the same type.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "regions",
"outer_alias": "bev",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05263 | train |
v1 | Schema:
regions (alias: okiv)(id, status, name, date)
orders(amount, name, salary, code)
Task: Find amount from regions where code appears in orders entries with matching code.
SQL: | SELECT amount FROM regions AS okiv
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05264 | train |
v1 | Schema:
transactions (alias: gev)(amount, type, id, code)
sales(type, salary, date, amount)
Task: Select amount from transactions where id exists in sales for the same code.
SQL: | SELECT amount FROM transactions AS gev
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05265 | train |
v2 | Schema:
projects (alias: uliv)(code, id, salary, name)
requests(value, amount, status, date)
Task: Find value from projects where a matching record exists in requests with the same status.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "requests",
"outer_alias": "uliv",
"inner_alias": "ejof",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05266 | train |
v3 | Schema:
customers (alias: lex)(level, name, code, id)
employees(date, salary, value, type)
Task: Find salary from customers where amount exceeds the count of salary from employees for the same status.
SQL: | SELECT salary FROM customers AS lex
WHERE amount > (
SELECT COUNT(salary) FROM employees AS bev
WHERE bev.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "employees",
"outer_alias": "lex",
"inner_alias": "bev",
"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_05267 | train |
v1 | Schema:
schedules (alias: vmob)(type, amount, code, status)
departments(type, amount, value, code)
Task: Select salary from schedules where level exists in departments for the same code.
SQL: | SELECT salary FROM schedules AS vmob
WHERE level IN (
SELECT level FROM departments AS dov
WHERE dov.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "vmob",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05268 | train |
v2 | Schema:
regions (alias: okiv)(status, value, name, code)
schedules(type, name, date, code)
Task: Retrieve name from regions that have at least one corresponding entry in schedules sharing the same type.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "schedules",
"outer_alias": "okiv",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05269 | train |
v1 | Schema:
customers (alias: lex)(code, type, id, level)
sales(type, amount, code, level)
Task: Select amount from customers where status exists in sales for the same type.
SQL: | SELECT amount FROM customers AS lex
WHERE status IN (
SELECT status FROM sales AS cif
WHERE cif.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05270 | train |
v3 | Schema:
categories (alias: egiv)(code, type, date, value)
products(name, amount, type, date)
Task: Find value from categories where amount exceeds the minimum value from products for the same id.
SQL: | SELECT value FROM categories AS egiv
WHERE amount > (
SELECT MIN(value) FROM products AS nad
WHERE nad.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "products",
"outer_alias": "egiv",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05271 | train |
v3 | Schema:
items (alias: ikob)(level, salary, amount, value)
accounts(value, level, id, date)
Task: Retrieve name from items with salary above the SUM(value) of accounts rows sharing the same level.
SQL: | SELECT name FROM items AS ikob
WHERE salary > (
SELECT SUM(value) FROM accounts AS jac
WHERE jac.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "accounts",
"outer_alias": "ikob",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05272 | train |
v1 | Schema:
schedules (alias: vmob)(level, date, salary, status)
sales(value, id, code, type)
Task: Find amount from schedules where status appears in sales entries with matching status.
SQL: | SELECT amount FROM schedules AS vmob
WHERE status IN (
SELECT status FROM sales AS cif
WHERE cif.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05273 | train |
v3 | Schema:
staff (alias: xnob)(name, amount, salary, level)
categories(salary, date, level, id)
Task: Retrieve value from staff with value above the AVG(salary) of categories rows sharing the same code.
SQL: | SELECT value FROM staff AS xnob
WHERE value > (
SELECT AVG(salary) FROM categories AS egiv
WHERE egiv.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05274 | train |
v1 | Schema:
items (alias: ikob)(salary, code, status, name)
products(salary, amount, name, level)
Task: Find name from items where id appears in products entries with matching id.
SQL: | SELECT name FROM items AS ikob
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05275 | train |
v1 | Schema:
tasks (alias: znob)(amount, level, value, name)
categories(date, salary, name, amount)
Task: Retrieve value from tasks whose level is found in categories rows where status matches the outer record.
SQL: | SELECT value FROM tasks AS znob
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05276 | train |
v2 | Schema:
shipments (alias: vnob)(id, code, amount, name)
sales(name, code, type, level)
Task: Find code from shipments where a matching record exists in sales with the same code.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05277 | train |
v2 | Schema:
categories (alias: egiv)(type, level, amount, salary)
accounts(code, amount, type, status)
Task: Retrieve name from categories that have at least one corresponding entry in accounts sharing the same code.
SQL: | SELECT name FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05278 | train |
v1 | Schema:
accounts (alias: jac)(salary, amount, code, level)
projects(code, type, status, level)
Task: Select code from accounts where status exists in projects for the same status.
SQL: | SELECT code FROM accounts AS jac
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05279 | train |
v1 | Schema:
products (alias: nad)(amount, value, level, date)
invoices(salary, name, date, value)
Task: Find code from products where code appears in invoices entries with matching status.
SQL: | SELECT code FROM products AS nad
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.status = nad.status
); | {
"outer_table": "products",
"inner_table": "invoices",
"outer_alias": "nad",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05280 | train |
v2 | Schema:
employees (alias: bev)(name, date, level, id)
customers(id, name, value, level)
Task: Retrieve amount from employees that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05281 | train |
v1 | Schema:
departments (alias: dov)(code, salary, type, date)
managers(id, value, amount, name)
Task: Retrieve value from departments whose level is found in managers rows where id matches the outer record.
SQL: | SELECT value FROM departments AS dov
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05282 | train |
v1 | Schema:
orders (alias: kab)(id, value, status, level)
employees(amount, type, level, code)
Task: Retrieve value from orders whose id is found in employees rows where status matches the outer record.
SQL: | SELECT value FROM orders AS kab
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "employees",
"outer_alias": "kab",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05283 | train |
v2 | Schema:
employees (alias: bev)(amount, value, code, status)
branches(date, name, value, id)
Task: Find id from employees where a matching record exists in branches with the same code.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05284 | train |
v1 | Schema:
items (alias: ikob)(code, name, amount, status)
departments(date, value, code, level)
Task: Retrieve value from items whose code is found in departments rows where status matches the outer record.
SQL: | SELECT value FROM items AS ikob
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "departments",
"outer_alias": "ikob",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05285 | train |
v2 | Schema:
orders (alias: kab)(value, level, date, id)
invoices(level, salary, id, date)
Task: Retrieve name from orders that have at least one corresponding entry in invoices sharing the same code.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05286 | train |
v2 | Schema:
invoices (alias: fal)(code, date, level, amount)
regions(type, date, salary, amount)
Task: Retrieve name from invoices that have at least one corresponding entry in regions sharing the same id.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "regions",
"outer_alias": "fal",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05287 | train |
v2 | Schema:
shipments (alias: vnob)(type, code, amount, level)
schedules(value, level, type, status)
Task: Find salary from shipments where a matching record exists in schedules with the same type.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05288 | train |
v3 | Schema:
regions (alias: okiv)(id, value, level, type)
tasks(id, level, name, date)
Task: Retrieve name from regions with salary above the COUNT(amount) of tasks rows sharing the same level.
SQL: | SELECT name FROM regions AS okiv
WHERE salary > (
SELECT COUNT(amount) FROM tasks AS znob
WHERE znob.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05289 | train |
v1 | Schema:
regions (alias: okiv)(type, id, value, name)
requests(value, date, name, id)
Task: Select id from regions where status exists in requests for the same status.
SQL: | SELECT id FROM regions AS okiv
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "requests",
"outer_alias": "okiv",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05290 | train |
v2 | Schema:
projects (alias: uliv)(status, value, level, salary)
products(value, status, name, code)
Task: Retrieve value from projects that have at least one corresponding entry in products sharing the same code.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "products",
"outer_alias": "uliv",
"inner_alias": "nad",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05291 | train |
v3 | Schema:
requests (alias: ejof)(status, level, date, salary)
invoices(amount, type, date, salary)
Task: Find amount from requests where value exceeds the maximum amount from invoices for the same id.
SQL: | SELECT amount FROM requests AS ejof
WHERE value > (
SELECT MAX(amount) FROM invoices AS fal
WHERE fal.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05292 | train |
v1 | Schema:
requests (alias: ejof)(amount, status, value, id)
staff(type, name, code, status)
Task: Select amount from requests where id exists in staff for the same code.
SQL: | SELECT amount FROM requests AS ejof
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05293 | train |
v3 | Schema:
projects (alias: uliv)(status, code, salary, level)
items(name, salary, type, amount)
Task: Retrieve id from projects with amount above the MIN(salary) of items rows sharing the same type.
SQL: | SELECT id FROM projects AS uliv
WHERE amount > (
SELECT MIN(salary) FROM items AS ikob
WHERE ikob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05294 | train |
v3 | Schema:
invoices (alias: fal)(status, name, amount, salary)
managers(code, level, value, id)
Task: Find value from invoices where amount exceeds the average salary from managers for the same code.
SQL: | SELECT value FROM invoices AS fal
WHERE amount > (
SELECT AVG(salary) FROM managers AS hac
WHERE hac.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "managers",
"outer_alias": "fal",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05295 | train |
v3 | Schema:
departments (alias: dov)(level, type, date, id)
transactions(amount, id, status, name)
Task: Find salary from departments where amount exceeds the minimum amount from transactions for the same type.
SQL: | SELECT salary FROM departments AS dov
WHERE amount > (
SELECT MIN(amount) FROM transactions AS gev
WHERE gev.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05296 | train |
v1 | Schema:
branches (alias: agov)(level, id, type, code)
schedules(level, name, type, code)
Task: Retrieve salary from branches whose code is found in schedules rows where status matches the outer record.
SQL: | SELECT salary FROM branches AS agov
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "schedules",
"outer_alias": "agov",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05297 | train |
v1 | Schema:
customers (alias: lex)(value, status, id, salary)
items(amount, level, code, salary)
Task: Select salary from customers where code exists in items for the same code.
SQL: | SELECT salary FROM customers AS lex
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05298 | train |
v1 | Schema:
tasks (alias: znob)(date, status, name, salary)
branches(name, id, amount, level)
Task: Retrieve amount from tasks whose status is found in branches rows where level matches the outer record.
SQL: | SELECT amount FROM tasks AS znob
WHERE status IN (
SELECT status FROM branches AS agov
WHERE agov.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "branches",
"outer_alias": "znob",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05299 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.