variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v1 | Schema:
products (alias: nad)(name, code, salary, value)
projects(type, date, name, code)
Task: Find code from products where status appears in projects entries with matching level.
SQL: | SELECT code FROM products AS nad
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.level = nad.level
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08100 | train |
v1 | Schema:
employees (alias: bev)(id, value, type, name)
regions(type, name, amount, code)
Task: Retrieve salary from employees whose type is found in regions rows where type matches the outer record.
SQL: | SELECT salary FROM employees AS bev
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "regions",
"outer_alias": "bev",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08101 | train |
v3 | Schema:
shipments (alias: vnob)(type, value, code, amount)
regions(type, status, amount, id)
Task: Retrieve name from shipments with salary above the AVG(amount) of regions rows sharing the same type.
SQL: | SELECT name FROM shipments AS vnob
WHERE salary > (
SELECT AVG(amount) FROM regions AS okiv
WHERE okiv.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08102 | train |
v3 | Schema:
shipments (alias: vnob)(code, date, id, level)
schedules(code, salary, amount, value)
Task: Find name from shipments where amount exceeds the average amount from schedules for the same type.
SQL: | SELECT name FROM shipments AS vnob
WHERE amount > (
SELECT AVG(amount) FROM schedules AS vmob
WHERE vmob.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08103 | train |
v3 | Schema:
tasks (alias: znob)(date, level, type, status)
customers(code, salary, status, level)
Task: Retrieve code from tasks with salary above the AVG(value) of customers rows sharing the same type.
SQL: | SELECT code FROM tasks AS znob
WHERE salary > (
SELECT AVG(value) FROM customers AS lex
WHERE lex.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08104 | train |
v2 | Schema:
regions (alias: okiv)(date, type, level, code)
projects(salary, value, status, amount)
Task: Find id from regions where a matching record exists in projects with the same type.
SQL: | SELECT id FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08105 | train |
v2 | Schema:
regions (alias: okiv)(code, id, status, level)
transactions(name, amount, date, id)
Task: Retrieve value from regions that have at least one corresponding entry in transactions sharing the same type.
SQL: | SELECT value FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "transactions",
"outer_alias": "okiv",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08106 | train |
v2 | Schema:
transactions (alias: gev)(type, name, date, code)
customers(salary, name, amount, type)
Task: Retrieve amount from transactions that have at least one corresponding entry in customers sharing the same level.
SQL: | SELECT amount FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08107 | train |
v1 | Schema:
customers (alias: lex)(status, date, name, salary)
employees(id, name, amount, code)
Task: Select code from customers where level exists in employees for the same type.
SQL: | SELECT code FROM customers AS lex
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "employees",
"outer_alias": "lex",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08108 | train |
v3 | Schema:
tasks (alias: znob)(salary, level, amount, status)
sales(type, status, value, salary)
Task: Retrieve salary from tasks with salary above the SUM(value) of sales rows sharing the same status.
SQL: | SELECT salary FROM tasks AS znob
WHERE salary > (
SELECT SUM(value) FROM sales AS cif
WHERE cif.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08109 | train |
v2 | Schema:
schedules (alias: vmob)(code, type, salary, name)
requests(status, name, type, salary)
Task: Retrieve name from schedules that have at least one corresponding entry in requests sharing the same id.
SQL: | SELECT name FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "requests",
"outer_alias": "vmob",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08110 | train |
v3 | Schema:
requests (alias: ejof)(name, id, type, amount)
sales(code, salary, id, amount)
Task: Find code from requests where value exceeds the maximum value from sales for the same level.
SQL: | SELECT code FROM requests AS ejof
WHERE value > (
SELECT MAX(value) FROM sales AS cif
WHERE cif.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08111 | train |
v1 | Schema:
sales (alias: cif)(type, name, value, date)
invoices(name, level, type, code)
Task: Select salary from sales where id exists in invoices for the same id.
SQL: | SELECT salary FROM sales AS cif
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08112 | train |
v2 | Schema:
shipments (alias: vnob)(salary, amount, date, name)
transactions(type, id, date, salary)
Task: Retrieve name from shipments that have at least one corresponding entry in transactions sharing the same type.
SQL: | SELECT name FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08113 | train |
v3 | Schema:
employees (alias: bev)(name, level, date, code)
orders(level, value, code, date)
Task: Retrieve value from employees with salary above the MIN(salary) of orders rows sharing the same id.
SQL: | SELECT value FROM employees AS bev
WHERE salary > (
SELECT MIN(salary) FROM orders AS kab
WHERE kab.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08114 | train |
v1 | Schema:
employees (alias: bev)(value, type, code, id)
tasks(value, level, id, date)
Task: Retrieve amount from employees whose status is found in tasks rows where status matches the outer record.
SQL: | SELECT amount FROM employees AS bev
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "tasks",
"outer_alias": "bev",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08115 | train |
v2 | Schema:
tasks (alias: znob)(code, date, status, amount)
customers(salary, status, id, type)
Task: Retrieve amount from tasks that have at least one corresponding entry in customers sharing the same type.
SQL: | SELECT amount FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08116 | train |
v1 | Schema:
orders (alias: kab)(id, code, value, status)
items(status, code, type, salary)
Task: Find id from orders where id appears in items entries with matching code.
SQL: | SELECT id 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": "id",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08117 | train |
v1 | Schema:
projects (alias: uliv)(level, amount, code, name)
departments(value, salary, type, name)
Task: Retrieve name from projects whose code is found in departments rows where status matches the outer record.
SQL: | SELECT name FROM projects AS uliv
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08118 | train |
v3 | Schema:
shipments (alias: vnob)(code, value, name, date)
transactions(amount, code, name, type)
Task: Retrieve id from shipments with salary above the COUNT(amount) of transactions rows sharing the same status.
SQL: | SELECT id FROM shipments AS vnob
WHERE salary > (
SELECT COUNT(amount) FROM transactions AS gev
WHERE gev.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08119 | train |
v1 | Schema:
products (alias: nad)(type, code, salary, name)
schedules(value, salary, name, date)
Task: Select code from products where level exists in schedules for the same level.
SQL: | SELECT code FROM products AS nad
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.level = nad.level
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "nad",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08120 | train |
v2 | Schema:
sales (alias: cif)(id, date, value, code)
categories(name, amount, type, status)
Task: Retrieve code from sales that have at least one corresponding entry in categories sharing the same id.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08121 | train |
v2 | Schema:
requests (alias: ejof)(salary, level, value, name)
managers(id, salary, date, status)
Task: Find amount from requests where a matching record exists in managers with the same id.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08122 | train |
v2 | Schema:
requests (alias: ejof)(name, status, level, code)
staff(amount, level, date, value)
Task: Retrieve amount from requests that have at least one corresponding entry in staff sharing the same status.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08123 | train |
v3 | Schema:
transactions (alias: gev)(amount, status, level, salary)
accounts(date, code, id, status)
Task: Retrieve name from transactions with salary above the COUNT(value) of accounts rows sharing the same type.
SQL: | SELECT name FROM transactions AS gev
WHERE salary > (
SELECT COUNT(value) FROM accounts AS jac
WHERE jac.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "accounts",
"outer_alias": "gev",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08124 | train |
v3 | Schema:
branches (alias: agov)(value, code, salary, status)
categories(name, amount, status, date)
Task: Find amount from branches where salary exceeds the count of salary from categories for the same id.
SQL: | SELECT amount FROM branches AS agov
WHERE salary > (
SELECT COUNT(salary) FROM categories AS egiv
WHERE egiv.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08125 | train |
v2 | Schema:
employees (alias: bev)(name, date, value, amount)
accounts(date, amount, name, value)
Task: Retrieve code from employees that have at least one corresponding entry in accounts sharing the same id.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08126 | train |
v1 | Schema:
branches (alias: agov)(type, level, date, code)
projects(code, name, value, salary)
Task: Find salary from branches where level appears in projects entries with matching code.
SQL: | SELECT salary FROM branches AS agov
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "projects",
"outer_alias": "agov",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08127 | train |
v3 | Schema:
departments (alias: dov)(amount, id, value, type)
items(date, value, name, level)
Task: Find value from departments where amount exceeds the count of amount from items for the same level.
SQL: | SELECT value FROM departments AS dov
WHERE amount > (
SELECT COUNT(amount) FROM items AS ikob
WHERE ikob.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08128 | train |
v3 | Schema:
requests (alias: ejof)(level, date, value, status)
shipments(id, level, code, type)
Task: Find name from requests where amount exceeds the maximum value from shipments for the same code.
SQL: | SELECT name FROM requests AS ejof
WHERE amount > (
SELECT MAX(value) FROM shipments AS vnob
WHERE vnob.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "shipments",
"outer_alias": "ejof",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08129 | train |
v3 | Schema:
invoices (alias: fal)(id, code, type, status)
sales(amount, salary, status, level)
Task: Find salary from invoices where salary exceeds the minimum amount from sales for the same id.
SQL: | SELECT salary FROM invoices AS fal
WHERE salary > (
SELECT MIN(amount) FROM sales AS cif
WHERE cif.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "sales",
"outer_alias": "fal",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08130 | train |
v2 | Schema:
products (alias: nad)(id, salary, amount, name)
orders(amount, level, date, type)
Task: Retrieve name from products that have at least one corresponding entry in orders sharing the same level.
SQL: | SELECT name FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = nad.level
); | {
"outer_table": "products",
"inner_table": "orders",
"outer_alias": "nad",
"inner_alias": "kab",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08131 | train |
v1 | Schema:
employees (alias: bev)(date, status, type, salary)
products(amount, type, value, name)
Task: Retrieve value from employees whose type is found in products rows where type matches the outer record.
SQL: | SELECT value FROM employees AS bev
WHERE type IN (
SELECT type FROM products AS nad
WHERE nad.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08132 | train |
v2 | Schema:
schedules (alias: vmob)(level, name, status, code)
categories(amount, type, name, code)
Task: Retrieve id from schedules that have at least one corresponding entry in categories sharing the same level.
SQL: | SELECT id FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08133 | train |
v1 | Schema:
tasks (alias: znob)(value, status, level, type)
departments(name, code, type, amount)
Task: Find amount from tasks where level appears in departments entries with matching status.
SQL: | SELECT amount FROM tasks AS znob
WHERE level IN (
SELECT level FROM departments AS dov
WHERE dov.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "departments",
"outer_alias": "znob",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08134 | train |
v3 | Schema:
branches (alias: agov)(name, date, value, status)
orders(name, code, type, id)
Task: Find salary from branches where salary exceeds the count of amount from orders for the same id.
SQL: | SELECT salary FROM branches AS agov
WHERE salary > (
SELECT COUNT(amount) FROM orders AS kab
WHERE kab.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08135 | train |
v2 | Schema:
orders (alias: kab)(code, date, level, id)
requests(salary, status, type, name)
Task: Retrieve code from orders that have at least one corresponding entry in requests sharing the same status.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "requests",
"outer_alias": "kab",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08136 | train |
v2 | Schema:
shipments (alias: vnob)(id, code, status, name)
transactions(status, type, name, code)
Task: Find id from shipments where a matching record exists in transactions with the same code.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08137 | train |
v1 | Schema:
sales (alias: cif)(code, type, level, salary)
shipments(salary, level, name, date)
Task: Select id from sales where id exists in shipments for the same id.
SQL: | SELECT id FROM sales AS cif
WHERE id IN (
SELECT id FROM shipments AS vnob
WHERE vnob.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08138 | train |
v2 | Schema:
staff (alias: xnob)(level, name, type, salary)
sales(name, id, date, value)
Task: Find name from staff where a matching record exists in sales with the same id.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "sales",
"outer_alias": "xnob",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08139 | train |
v3 | Schema:
branches (alias: agov)(id, type, name, level)
departments(salary, type, level, status)
Task: Find code from branches where value exceeds the average salary from departments for the same level.
SQL: | SELECT code FROM branches AS agov
WHERE value > (
SELECT AVG(salary) FROM departments AS dov
WHERE dov.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "departments",
"outer_alias": "agov",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08140 | train |
v1 | Schema:
customers (alias: lex)(type, level, status, id)
managers(name, salary, date, id)
Task: Select amount from customers where status exists in managers for the same level.
SQL: | SELECT amount FROM customers AS lex
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08141 | train |
v3 | Schema:
tasks (alias: znob)(code, name, amount, value)
staff(code, salary, amount, status)
Task: Find salary from tasks where salary exceeds the maximum amount from staff for the same status.
SQL: | SELECT salary FROM tasks AS znob
WHERE salary > (
SELECT MAX(amount) FROM staff AS xnob
WHERE xnob.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08142 | train |
v3 | Schema:
projects (alias: uliv)(id, type, level, date)
regions(value, status, level, amount)
Task: Find name from projects where amount exceeds the minimum salary from regions for the same id.
SQL: | SELECT name FROM projects AS uliv
WHERE amount > (
SELECT MIN(salary) FROM regions AS okiv
WHERE okiv.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "regions",
"outer_alias": "uliv",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08143 | train |
v2 | Schema:
accounts (alias: jac)(level, code, value, amount)
regions(code, amount, type, level)
Task: Find amount from accounts where a matching record exists in regions with the same id.
SQL: | SELECT amount FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08144 | train |
v1 | Schema:
projects (alias: uliv)(status, name, type, salary)
customers(date, code, type, salary)
Task: Select name from projects where status exists in customers for the same type.
SQL: | SELECT name FROM projects AS uliv
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "customers",
"outer_alias": "uliv",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08145 | train |
v2 | Schema:
managers (alias: hac)(value, date, name, id)
transactions(salary, date, status, type)
Task: Find code from managers where a matching record exists in transactions with the same level.
SQL: | SELECT code FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08146 | train |
v1 | Schema:
branches (alias: agov)(type, status, date, salary)
categories(salary, name, level, id)
Task: Find value from branches where level appears in categories entries with matching id.
SQL: | SELECT value FROM branches AS agov
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08147 | train |
v3 | Schema:
accounts (alias: jac)(name, amount, id, value)
employees(salary, status, level, id)
Task: Retrieve code from accounts with amount above the COUNT(amount) of employees rows sharing the same type.
SQL: | SELECT code FROM accounts AS jac
WHERE amount > (
SELECT COUNT(amount) FROM employees AS bev
WHERE bev.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08148 | train |
v3 | Schema:
products (alias: nad)(salary, amount, id, value)
tasks(amount, name, value, date)
Task: Find salary from products where amount exceeds the total amount from tasks for the same level.
SQL: | SELECT salary FROM products AS nad
WHERE amount > (
SELECT SUM(amount) FROM tasks AS znob
WHERE znob.level = nad.level
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "nad",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08149 | train |
v2 | Schema:
transactions (alias: gev)(status, date, code, level)
projects(id, salary, amount, date)
Task: Find name from transactions where a matching record exists in projects with the same type.
SQL: | SELECT name FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08150 | train |
v3 | Schema:
transactions (alias: gev)(amount, name, level, status)
invoices(code, type, name, value)
Task: Retrieve id from transactions with amount above the COUNT(salary) of invoices rows sharing the same status.
SQL: | SELECT id FROM transactions AS gev
WHERE amount > (
SELECT COUNT(salary) FROM invoices AS fal
WHERE fal.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "gev",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08151 | train |
v3 | Schema:
projects (alias: uliv)(level, id, type, value)
departments(name, level, status, date)
Task: Retrieve value from projects with amount above the SUM(amount) of departments rows sharing the same level.
SQL: | SELECT value FROM projects AS uliv
WHERE amount > (
SELECT SUM(amount) FROM departments AS dov
WHERE dov.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08152 | train |
v3 | Schema:
projects (alias: uliv)(date, type, name, code)
departments(level, type, name, code)
Task: Find code from projects where amount exceeds the count of value from departments for the same status.
SQL: | SELECT code FROM projects AS uliv
WHERE amount > (
SELECT COUNT(value) FROM departments AS dov
WHERE dov.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08153 | train |
v1 | Schema:
branches (alias: agov)(level, status, value, amount)
regions(code, amount, type, value)
Task: Select value from branches where type exists in regions for the same type.
SQL: | SELECT value FROM branches AS agov
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08154 | train |
v3 | Schema:
staff (alias: xnob)(type, value, id, level)
tasks(level, salary, date, id)
Task: Retrieve name from staff with amount above the COUNT(value) of tasks rows sharing the same id.
SQL: | SELECT name FROM staff AS xnob
WHERE amount > (
SELECT COUNT(value) FROM tasks AS znob
WHERE znob.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08155 | train |
v3 | Schema:
shipments (alias: vnob)(level, status, code, date)
managers(salary, date, value, name)
Task: Find name from shipments where salary exceeds the minimum amount from managers for the same status.
SQL: | SELECT name FROM shipments AS vnob
WHERE salary > (
SELECT MIN(amount) FROM managers AS hac
WHERE hac.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "managers",
"outer_alias": "vnob",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08156 | train |
v3 | Schema:
accounts (alias: jac)(salary, name, status, amount)
invoices(code, id, type, level)
Task: Retrieve amount from accounts with value above the MAX(value) of invoices rows sharing the same status.
SQL: | SELECT amount FROM accounts AS jac
WHERE value > (
SELECT MAX(value) FROM invoices AS fal
WHERE fal.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08157 | train |
v1 | Schema:
branches (alias: agov)(id, code, level, amount)
regions(amount, id, salary, name)
Task: Retrieve salary from branches whose id is found in regions rows where type matches the outer record.
SQL: | SELECT salary FROM branches AS agov
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08158 | train |
v2 | Schema:
transactions (alias: gev)(name, code, level, type)
departments(salary, date, type, id)
Task: Retrieve id from transactions that have at least one corresponding entry in departments sharing the same id.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08159 | train |
v3 | Schema:
accounts (alias: jac)(id, salary, level, name)
categories(value, code, type, level)
Task: Find id from accounts where amount exceeds the total value from categories for the same code.
SQL: | SELECT id FROM accounts AS jac
WHERE amount > (
SELECT SUM(value) FROM categories AS egiv
WHERE egiv.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08160 | train |
v3 | Schema:
transactions (alias: gev)(level, value, salary, date)
requests(name, date, status, level)
Task: Retrieve id from transactions with value above the AVG(amount) of requests rows sharing the same code.
SQL: | SELECT id FROM transactions AS gev
WHERE value > (
SELECT AVG(amount) FROM requests AS ejof
WHERE ejof.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08161 | train |
v2 | Schema:
products (alias: nad)(type, status, salary, code)
sales(salary, value, status, id)
Task: Retrieve amount from products that have at least one corresponding entry in sales sharing the same code.
SQL: | SELECT amount FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = nad.code
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "nad",
"inner_alias": "cif",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08162 | train |
v1 | Schema:
employees (alias: bev)(level, date, code, id)
tasks(date, level, status, salary)
Task: Select code from employees where type exists in tasks for the same id.
SQL: | SELECT code FROM employees AS bev
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "tasks",
"outer_alias": "bev",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08163 | train |
v1 | Schema:
tasks (alias: znob)(name, date, status, id)
accounts(date, code, name, id)
Task: Find value from tasks where status appears in accounts entries with matching status.
SQL: | SELECT value FROM tasks AS znob
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08164 | train |
v3 | Schema:
accounts (alias: jac)(value, status, type, id)
orders(name, value, type, level)
Task: Retrieve code from accounts with value above the AVG(salary) of orders rows sharing the same status.
SQL: | SELECT code FROM accounts AS jac
WHERE value > (
SELECT AVG(salary) FROM orders AS kab
WHERE kab.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "orders",
"outer_alias": "jac",
"inner_alias": "kab",
"proj_col": "code",
"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_08165 | train |
v3 | Schema:
categories (alias: egiv)(value, amount, type, code)
items(date, amount, name, type)
Task: Retrieve amount from categories with value above the COUNT(value) of items rows sharing the same type.
SQL: | SELECT amount FROM categories AS egiv
WHERE value > (
SELECT COUNT(value) FROM items AS ikob
WHERE ikob.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "items",
"outer_alias": "egiv",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08166 | train |
v2 | Schema:
tasks (alias: znob)(salary, code, amount, date)
requests(id, type, salary, amount)
Task: Retrieve name from tasks that have at least one corresponding entry in requests sharing the same code.
SQL: | SELECT name FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08167 | train |
v3 | Schema:
schedules (alias: vmob)(date, id, amount, salary)
orders(status, value, type, name)
Task: Retrieve id from schedules with amount above the MIN(value) of orders rows sharing the same type.
SQL: | SELECT id FROM schedules AS vmob
WHERE amount > (
SELECT MIN(value) FROM orders AS kab
WHERE kab.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "orders",
"outer_alias": "vmob",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08168 | train |
v3 | Schema:
accounts (alias: jac)(value, level, salary, name)
employees(date, code, id, value)
Task: Retrieve name from accounts with amount above the SUM(amount) of employees rows sharing the same status.
SQL: | SELECT name FROM accounts AS jac
WHERE amount > (
SELECT SUM(amount) FROM employees AS bev
WHERE bev.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08169 | train |
v2 | Schema:
requests (alias: ejof)(status, type, name, code)
projects(id, date, name, level)
Task: Find amount from requests where a matching record exists in projects with the same type.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "projects",
"outer_alias": "ejof",
"inner_alias": "uliv",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08170 | train |
v1 | Schema:
projects (alias: uliv)(status, name, value, date)
requests(salary, id, name, value)
Task: Find salary from projects where code appears in requests entries with matching type.
SQL: | SELECT salary FROM projects AS uliv
WHERE code IN (
SELECT code FROM requests AS ejof
WHERE ejof.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "requests",
"outer_alias": "uliv",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08171 | train |
v1 | Schema:
accounts (alias: jac)(status, amount, type, level)
customers(name, type, amount, salary)
Task: Retrieve amount from accounts whose status is found in customers rows where level matches the outer record.
SQL: | SELECT amount FROM accounts AS jac
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08172 | train |
v3 | Schema:
customers (alias: lex)(code, salary, value, status)
items(name, type, date, salary)
Task: Retrieve salary from customers with value above the COUNT(value) of items rows sharing the same status.
SQL: | SELECT salary FROM customers AS lex
WHERE value > (
SELECT COUNT(value) FROM items AS ikob
WHERE ikob.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08173 | train |
v1 | Schema:
schedules (alias: vmob)(salary, status, date, level)
managers(name, salary, date, code)
Task: Find amount from schedules where id appears in managers entries with matching code.
SQL: | SELECT amount FROM schedules AS vmob
WHERE id IN (
SELECT id FROM managers AS hac
WHERE hac.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08174 | train |
v3 | Schema:
employees (alias: bev)(name, status, id, code)
customers(status, amount, date, value)
Task: Find salary from employees where value exceeds the count of amount from customers for the same code.
SQL: | SELECT salary FROM employees AS bev
WHERE value > (
SELECT COUNT(amount) FROM customers AS lex
WHERE lex.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08175 | train |
v1 | Schema:
sales (alias: cif)(status, id, name, date)
projects(date, name, value, status)
Task: Retrieve code from sales whose level is found in projects rows where level matches the outer record.
SQL: | SELECT code FROM sales AS cif
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08176 | train |
v1 | Schema:
shipments (alias: vnob)(value, id, name, salary)
orders(amount, value, date, code)
Task: Select name from shipments where type exists in orders for the same code.
SQL: | SELECT name FROM shipments AS vnob
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08177 | train |
v3 | Schema:
categories (alias: egiv)(name, amount, value, date)
accounts(value, salary, level, name)
Task: Retrieve name from categories with value above the MAX(value) of accounts rows sharing the same status.
SQL: | SELECT name FROM categories AS egiv
WHERE value > (
SELECT MAX(value) FROM accounts AS jac
WHERE jac.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08178 | train |
v1 | Schema:
requests (alias: ejof)(level, date, value, name)
categories(date, status, type, salary)
Task: Find value from requests where level appears in categories entries with matching status.
SQL: | SELECT value FROM requests AS ejof
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08179 | train |
v2 | Schema:
shipments (alias: vnob)(level, status, salary, amount)
orders(status, amount, name, date)
Task: Find amount from shipments where a matching record exists in orders with the same type.
SQL: | SELECT amount FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08180 | train |
v2 | Schema:
managers (alias: hac)(date, level, type, value)
items(date, status, code, id)
Task: Find amount from managers where a matching record exists in items with the same level.
SQL: | SELECT amount 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": "amount",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08181 | train |
v2 | Schema:
tasks (alias: znob)(level, salary, type, name)
customers(date, amount, salary, status)
Task: Find code from tasks where a matching record exists in customers with the same status.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08182 | train |
v1 | Schema:
invoices (alias: fal)(name, date, code, status)
products(amount, id, name, status)
Task: Find value from invoices where status appears in products entries with matching code.
SQL: | SELECT value FROM invoices AS fal
WHERE status IN (
SELECT status FROM products AS nad
WHERE nad.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "products",
"outer_alias": "fal",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08183 | train |
v3 | Schema:
staff (alias: xnob)(date, status, code, salary)
regions(id, name, date, status)
Task: Find value from staff where amount exceeds the maximum salary from regions for the same code.
SQL: | SELECT value FROM staff AS xnob
WHERE amount > (
SELECT MAX(salary) FROM regions AS okiv
WHERE okiv.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "xnob",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08184 | train |
v3 | Schema:
regions (alias: okiv)(value, level, id, salary)
sales(salary, name, id, date)
Task: Find salary from regions where amount exceeds the maximum amount from sales for the same level.
SQL: | SELECT salary FROM regions AS okiv
WHERE amount > (
SELECT MAX(amount) FROM sales AS cif
WHERE cif.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08185 | train |
v3 | Schema:
accounts (alias: jac)(type, salary, date, name)
departments(value, amount, code, type)
Task: Find value from accounts where amount exceeds the total salary from departments for the same code.
SQL: | SELECT value FROM accounts AS jac
WHERE amount > (
SELECT SUM(salary) FROM departments AS dov
WHERE dov.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "departments",
"outer_alias": "jac",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08186 | train |
v3 | Schema:
employees (alias: bev)(level, amount, date, id)
accounts(type, level, amount, status)
Task: Find code from employees where value exceeds the minimum value from accounts for the same type.
SQL: | SELECT code FROM employees AS bev
WHERE value > (
SELECT MIN(value) FROM accounts AS jac
WHERE jac.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08187 | train |
v2 | Schema:
projects (alias: uliv)(salary, value, amount, level)
orders(value, amount, id, date)
Task: Find salary from projects where a matching record exists in orders with the same code.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "orders",
"outer_alias": "uliv",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08188 | train |
v3 | Schema:
managers (alias: hac)(name, date, value, code)
categories(name, type, level, value)
Task: Find amount from managers where salary exceeds the minimum amount from categories for the same id.
SQL: | SELECT amount FROM managers AS hac
WHERE salary > (
SELECT MIN(amount) FROM categories AS egiv
WHERE egiv.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08189 | train |
v3 | Schema:
staff (alias: xnob)(id, name, value, level)
invoices(type, value, amount, code)
Task: Find amount from staff where salary exceeds the total amount from invoices for the same level.
SQL: | SELECT amount FROM staff AS xnob
WHERE salary > (
SELECT SUM(amount) FROM invoices AS fal
WHERE fal.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "invoices",
"outer_alias": "xnob",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08190 | train |
v1 | Schema:
categories (alias: egiv)(id, code, name, date)
regions(salary, id, level, type)
Task: Retrieve name from categories whose level is found in regions rows where code matches the outer record.
SQL: | SELECT name FROM categories AS egiv
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "regions",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08191 | train |
v2 | Schema:
employees (alias: bev)(salary, amount, status, code)
shipments(code, id, level, amount)
Task: Retrieve salary from employees that have at least one corresponding entry in shipments sharing the same type.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08192 | train |
v3 | Schema:
invoices (alias: fal)(value, code, salary, name)
staff(value, code, type, amount)
Task: Find value from invoices where value exceeds the count of amount from staff for the same code.
SQL: | SELECT value FROM invoices AS fal
WHERE value > (
SELECT COUNT(amount) FROM staff AS xnob
WHERE xnob.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08193 | train |
v2 | Schema:
categories (alias: egiv)(level, type, value, name)
branches(value, code, salary, name)
Task: Find amount from categories where a matching record exists in branches with the same status.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08194 | train |
v1 | Schema:
schedules (alias: vmob)(id, level, code, amount)
projects(status, salary, code, id)
Task: Select value from schedules where status exists in projects for the same id.
SQL: | SELECT value FROM schedules AS vmob
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "projects",
"outer_alias": "vmob",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08195 | train |
v2 | Schema:
sales (alias: cif)(level, salary, status, value)
products(amount, salary, id, name)
Task: Retrieve name from sales that have at least one corresponding entry in products sharing the same id.
SQL: | SELECT name FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08196 | train |
v3 | Schema:
sales (alias: cif)(type, salary, amount, code)
staff(salary, code, type, level)
Task: Retrieve salary from sales with salary above the AVG(value) of staff rows sharing the same level.
SQL: | SELECT salary FROM sales AS cif
WHERE salary > (
SELECT AVG(value) 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": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08197 | train |
v1 | Schema:
departments (alias: dov)(status, salary, value, amount)
managers(code, status, id, value)
Task: Select code from departments where level exists in managers for the same id.
SQL: | SELECT code 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": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08198 | train |
v1 | Schema:
requests (alias: ejof)(amount, value, id, level)
orders(date, code, value, salary)
Task: Retrieve name from requests whose id is found in orders rows where level matches the outer record.
SQL: | SELECT name FROM requests AS ejof
WHERE id IN (
SELECT id FROM orders AS kab
WHERE kab.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08199 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.