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:
customers (alias: lex)(date, code, value, status)
shipments(amount, value, name, id)
Task: Find amount from customers where code appears in shipments entries with matching id.
SQL: | SELECT amount FROM customers AS lex
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "shipments",
"outer_alias": "lex",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00200 | train |
v1 | Schema:
projects (alias: uliv)(value, date, status, name)
transactions(id, salary, code, amount)
Task: Find value from projects where code appears in transactions entries with matching status.
SQL: | SELECT value FROM projects AS uliv
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00201 | train |
v1 | Schema:
schedules (alias: vmob)(code, name, status, id)
regions(id, level, date, status)
Task: Find salary from schedules where status appears in regions entries with matching level.
SQL: | SELECT salary FROM schedules AS vmob
WHERE status IN (
SELECT status FROM regions AS okiv
WHERE okiv.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "regions",
"outer_alias": "vmob",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00202 | train |
v1 | Schema:
products (alias: nad)(date, amount, id, level)
departments(date, level, name, type)
Task: Select amount from products where id exists in departments for the same id.
SQL: | SELECT amount FROM products AS nad
WHERE id IN (
SELECT id FROM departments AS dov
WHERE dov.id = nad.id
); | {
"outer_table": "products",
"inner_table": "departments",
"outer_alias": "nad",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00203 | train |
v1 | Schema:
sales (alias: cif)(level, name, date, type)
staff(type, level, status, salary)
Task: Retrieve name from sales whose id is found in staff rows where status matches the outer record.
SQL: | SELECT name FROM sales AS cif
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "staff",
"outer_alias": "cif",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00204 | train |
v3 | Schema:
managers (alias: hac)(code, amount, name, date)
orders(amount, status, name, id)
Task: Find id from managers where value exceeds the maximum value from orders for the same status.
SQL: | SELECT id FROM managers AS hac
WHERE value > (
SELECT MAX(value) FROM orders AS kab
WHERE kab.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "orders",
"outer_alias": "hac",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00205 | train |
v2 | Schema:
managers (alias: hac)(type, code, level, value)
invoices(status, amount, type, value)
Task: Find amount from managers where a matching record exists in invoices with the same status.
SQL: | SELECT amount FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00206 | train |
v1 | Schema:
departments (alias: dov)(salary, amount, level, name)
managers(status, level, name, code)
Task: Select amount from departments where code exists in managers for the same type.
SQL: | SELECT amount FROM departments AS dov
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00207 | train |
v2 | Schema:
requests (alias: ejof)(status, type, code, value)
employees(name, code, status, level)
Task: Retrieve code from requests that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00208 | train |
v2 | Schema:
products (alias: nad)(status, id, type, salary)
tasks(type, value, amount, status)
Task: Retrieve value from products that have at least one corresponding entry in tasks sharing the same id.
SQL: | SELECT value FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.id = nad.id
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "nad",
"inner_alias": "znob",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00209 | train |
v3 | Schema:
accounts (alias: jac)(id, level, salary, type)
tasks(status, amount, name, level)
Task: Retrieve value from accounts with salary above the COUNT(salary) of tasks rows sharing the same id.
SQL: | SELECT value FROM accounts AS jac
WHERE salary > (
SELECT COUNT(salary) FROM tasks AS znob
WHERE znob.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "tasks",
"outer_alias": "jac",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00210 | train |
v3 | Schema:
regions (alias: okiv)(type, code, level, status)
orders(date, status, salary, code)
Task: Retrieve code from regions with value above the SUM(amount) of orders rows sharing the same id.
SQL: | SELECT code FROM regions AS okiv
WHERE value > (
SELECT SUM(amount) FROM orders AS kab
WHERE kab.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00211 | train |
v1 | Schema:
invoices (alias: fal)(status, date, id, amount)
accounts(code, value, name, level)
Task: Find id from invoices where type appears in accounts entries with matching code.
SQL: | SELECT id FROM invoices AS fal
WHERE type IN (
SELECT type FROM accounts AS jac
WHERE jac.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00212 | train |
v2 | Schema:
items (alias: ikob)(status, code, name, id)
orders(value, type, name, level)
Task: Find salary from items where a matching record exists in orders with the same status.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00213 | train |
v3 | Schema:
projects (alias: uliv)(type, date, status, name)
categories(id, level, status, date)
Task: Find value from projects where salary exceeds the average salary from categories for the same status.
SQL: | SELECT value FROM projects AS uliv
WHERE salary > (
SELECT AVG(salary) FROM categories AS egiv
WHERE egiv.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00214 | train |
v3 | Schema:
projects (alias: uliv)(code, salary, level, name)
employees(status, name, salary, date)
Task: Retrieve amount from projects with amount above the MIN(amount) of employees rows sharing the same level.
SQL: | SELECT amount FROM projects AS uliv
WHERE amount > (
SELECT MIN(amount) FROM employees AS bev
WHERE bev.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "employees",
"outer_alias": "uliv",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00215 | train |
v2 | Schema:
employees (alias: bev)(name, date, type, salary)
sales(value, amount, status, salary)
Task: Retrieve id from employees that have at least one corresponding entry in sales sharing the same type.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "sales",
"outer_alias": "bev",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00216 | train |
v1 | Schema:
transactions (alias: gev)(salary, code, id, type)
invoices(level, code, id, salary)
Task: Retrieve amount from transactions whose status is found in invoices rows where id matches the outer record.
SQL: | SELECT amount FROM transactions AS gev
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "gev",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00217 | train |
v1 | Schema:
products (alias: nad)(name, type, id, code)
accounts(level, name, value, id)
Task: Retrieve salary from products whose id is found in accounts rows where code matches the outer record.
SQL: | SELECT salary FROM products AS nad
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.code = nad.code
); | {
"outer_table": "products",
"inner_table": "accounts",
"outer_alias": "nad",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00218 | train |
v3 | Schema:
employees (alias: bev)(salary, code, id, value)
projects(level, type, code, id)
Task: Find id from employees where salary exceeds the count of amount from projects for the same status.
SQL: | SELECT id FROM employees AS bev
WHERE salary > (
SELECT COUNT(amount) FROM projects AS uliv
WHERE uliv.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00219 | train |
v2 | Schema:
sales (alias: cif)(name, id, value, code)
requests(level, amount, id, name)
Task: Retrieve salary from sales that have at least one corresponding entry in requests sharing the same type.
SQL: | SELECT salary FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00220 | train |
v2 | Schema:
employees (alias: bev)(status, salary, id, code)
departments(id, type, level, status)
Task: Retrieve value from employees that have at least one corresponding entry in departments sharing the same status.
SQL: | SELECT value FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00221 | train |
v2 | Schema:
projects (alias: uliv)(date, name, value, amount)
items(level, salary, status, code)
Task: Find name from projects where a matching record exists in items with the same status.
SQL: | SELECT name FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00222 | train |
v2 | Schema:
requests (alias: ejof)(date, salary, status, level)
departments(date, status, salary, name)
Task: Find value from requests where a matching record exists in departments with the same id.
SQL: | SELECT value FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "departments",
"outer_alias": "ejof",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00223 | train |
v3 | Schema:
managers (alias: hac)(salary, value, amount, date)
staff(amount, level, status, name)
Task: Retrieve amount from managers with amount above the SUM(value) of staff rows sharing the same id.
SQL: | SELECT amount FROM managers AS hac
WHERE amount > (
SELECT SUM(value) FROM staff AS xnob
WHERE xnob.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "hac",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00224 | train |
v3 | Schema:
tasks (alias: znob)(amount, code, name, status)
invoices(value, date, type, id)
Task: Retrieve value from tasks with value above the MAX(amount) of invoices rows sharing the same status.
SQL: | SELECT value FROM tasks AS znob
WHERE value > (
SELECT MAX(amount) FROM invoices AS fal
WHERE fal.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00225 | train |
v1 | Schema:
tasks (alias: znob)(code, salary, id, status)
schedules(status, level, value, salary)
Task: Find value from tasks where type appears in schedules entries with matching code.
SQL: | SELECT value FROM tasks AS znob
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "schedules",
"outer_alias": "znob",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00226 | train |
v3 | Schema:
requests (alias: ejof)(date, id, value, amount)
invoices(level, code, amount, id)
Task: Retrieve code from requests with value above the SUM(salary) of invoices rows sharing the same level.
SQL: | SELECT code FROM requests AS ejof
WHERE value > (
SELECT SUM(salary) FROM invoices AS fal
WHERE fal.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00227 | train |
v3 | Schema:
requests (alias: ejof)(type, name, status, salary)
invoices(type, name, code, salary)
Task: Retrieve salary from requests with value above the SUM(amount) of invoices rows sharing the same status.
SQL: | SELECT salary FROM requests AS ejof
WHERE value > (
SELECT SUM(amount) FROM invoices AS fal
WHERE fal.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00228 | train |
v3 | Schema:
staff (alias: xnob)(date, salary, code, value)
requests(name, salary, amount, level)
Task: Find code from staff where amount exceeds the count of value from requests for the same status.
SQL: | SELECT code FROM staff AS xnob
WHERE amount > (
SELECT COUNT(value) FROM requests AS ejof
WHERE ejof.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00229 | train |
v2 | Schema:
shipments (alias: vnob)(level, id, type, amount)
invoices(value, salary, status, level)
Task: Retrieve amount from shipments that have at least one corresponding entry in invoices sharing the same code.
SQL: | SELECT amount FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "invoices",
"outer_alias": "vnob",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00230 | train |
v1 | Schema:
branches (alias: agov)(status, date, amount, type)
orders(level, type, name, date)
Task: Retrieve salary from branches whose code is found in orders rows where status matches the outer record.
SQL: | SELECT salary FROM branches AS agov
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00231 | train |
v1 | Schema:
employees (alias: bev)(name, amount, value, level)
products(date, value, salary, type)
Task: Find amount from employees where id appears in products entries with matching type.
SQL: | SELECT amount FROM employees AS bev
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00232 | train |
v3 | Schema:
customers (alias: lex)(status, level, amount, value)
regions(id, date, type, status)
Task: Retrieve code from customers with salary above the COUNT(salary) of regions rows sharing the same type.
SQL: | SELECT code FROM customers AS lex
WHERE salary > (
SELECT COUNT(salary) FROM regions AS okiv
WHERE okiv.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "regions",
"outer_alias": "lex",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "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_00233 | train |
v3 | Schema:
schedules (alias: vmob)(id, date, value, code)
customers(value, type, salary, level)
Task: Retrieve value from schedules with value above the COUNT(salary) of customers rows sharing the same status.
SQL: | SELECT value FROM schedules AS vmob
WHERE value > (
SELECT COUNT(salary) FROM customers AS lex
WHERE lex.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00234 | train |
v3 | Schema:
regions (alias: okiv)(type, code, status, date)
sales(code, type, level, value)
Task: Retrieve code from regions with amount above the COUNT(salary) of sales rows sharing the same type.
SQL: | SELECT code FROM regions AS okiv
WHERE amount > (
SELECT COUNT(salary) FROM sales AS cif
WHERE cif.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00235 | train |
v3 | Schema:
accounts (alias: jac)(name, status, salary, date)
branches(date, type, id, status)
Task: Find code from accounts where amount exceeds the count of amount from branches for the same level.
SQL: | SELECT code FROM accounts AS jac
WHERE amount > (
SELECT COUNT(amount) FROM branches AS agov
WHERE agov.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "branches",
"outer_alias": "jac",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00236 | train |
v1 | Schema:
invoices (alias: fal)(id, status, level, type)
managers(date, value, status, salary)
Task: Find amount from invoices where status appears in managers entries with matching id.
SQL: | SELECT amount FROM invoices AS fal
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "managers",
"outer_alias": "fal",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00237 | train |
v2 | Schema:
sales (alias: cif)(amount, value, type, code)
regions(type, name, date, level)
Task: Find name from sales where a matching record exists in regions with the same level.
SQL: | SELECT name FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00238 | train |
v2 | Schema:
categories (alias: egiv)(code, level, name, date)
projects(id, value, status, type)
Task: Retrieve salary from categories that have at least one corresponding entry in projects sharing the same id.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00239 | train |
v1 | Schema:
regions (alias: okiv)(date, status, salary, type)
categories(level, salary, status, code)
Task: Retrieve amount from regions whose id is found in categories rows where level matches the outer record.
SQL: | SELECT amount FROM regions AS okiv
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00240 | train |
v1 | Schema:
employees (alias: bev)(amount, name, salary, type)
products(status, name, level, date)
Task: Find amount from employees where level appears in products entries with matching code.
SQL: | SELECT amount FROM employees AS bev
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00241 | train |
v2 | Schema:
projects (alias: uliv)(amount, code, salary, date)
requests(salary, date, id, amount)
Task: Find value from projects where a matching record exists in requests with the same id.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "requests",
"outer_alias": "uliv",
"inner_alias": "ejof",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00242 | train |
v3 | Schema:
transactions (alias: gev)(date, salary, code, amount)
categories(name, level, salary, code)
Task: Find salary from transactions where value exceeds the total value from categories for the same code.
SQL: | SELECT salary FROM transactions AS gev
WHERE value > (
SELECT SUM(value) FROM categories AS egiv
WHERE egiv.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00243 | train |
v3 | Schema:
products (alias: nad)(value, salary, level, code)
tasks(salary, code, type, name)
Task: Retrieve salary from products with amount above the AVG(salary) of tasks rows sharing the same type.
SQL: | SELECT salary FROM products AS nad
WHERE amount > (
SELECT AVG(salary) FROM tasks AS znob
WHERE znob.type = nad.type
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "nad",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00244 | train |
v2 | Schema:
categories (alias: egiv)(id, name, amount, salary)
customers(value, id, level, salary)
Task: Retrieve amount from categories that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "customers",
"outer_alias": "egiv",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00245 | train |
v1 | Schema:
schedules (alias: vmob)(type, status, level, salary)
categories(value, code, salary, amount)
Task: Select code from schedules where type exists in categories for the same status.
SQL: | SELECT code FROM schedules AS vmob
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00246 | train |
v1 | Schema:
projects (alias: uliv)(date, status, name, code)
employees(value, level, salary, name)
Task: Select code from projects where level exists in employees for the same id.
SQL: | SELECT code FROM projects AS uliv
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "employees",
"outer_alias": "uliv",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00247 | train |
v3 | Schema:
managers (alias: hac)(code, type, level, status)
departments(name, code, level, salary)
Task: Find amount from managers where salary exceeds the average amount from departments for the same code.
SQL: | SELECT amount FROM managers AS hac
WHERE salary > (
SELECT AVG(amount) FROM departments AS dov
WHERE dov.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "departments",
"outer_alias": "hac",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00248 | train |
v2 | Schema:
customers (alias: lex)(type, salary, name, status)
orders(salary, value, id, name)
Task: Retrieve code from customers that have at least one corresponding entry in orders sharing the same code.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "orders",
"outer_alias": "lex",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00249 | train |
v1 | Schema:
tasks (alias: znob)(level, id, type, value)
categories(salary, date, code, amount)
Task: Select amount from tasks where level exists in categories for the same id.
SQL: | SELECT amount FROM tasks AS znob
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00250 | train |
v1 | Schema:
accounts (alias: jac)(value, level, salary, id)
schedules(value, salary, status, code)
Task: Select amount from accounts where status exists in schedules for the same status.
SQL: | SELECT amount FROM accounts AS jac
WHERE status IN (
SELECT status FROM schedules AS vmob
WHERE vmob.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00251 | train |
v1 | Schema:
accounts (alias: jac)(value, code, salary, amount)
staff(status, type, code, id)
Task: Select value from accounts where code exists in staff for the same type.
SQL: | SELECT value FROM accounts AS jac
WHERE code IN (
SELECT code 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": "code",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00252 | train |
v2 | Schema:
tasks (alias: znob)(value, date, code, level)
customers(status, type, level, code)
Task: Find value from tasks where a matching record exists in customers with the same status.
SQL: | SELECT value 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": "value",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00253 | train |
v3 | Schema:
products (alias: nad)(status, name, type, amount)
projects(date, id, code, name)
Task: Retrieve name from products with value above the SUM(amount) of projects rows sharing the same type.
SQL: | SELECT name FROM products AS nad
WHERE value > (
SELECT SUM(amount) FROM projects AS uliv
WHERE uliv.type = nad.type
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00254 | train |
v2 | Schema:
tasks (alias: znob)(name, type, level, id)
products(name, level, amount, value)
Task: Find code from tasks where a matching record exists in products with the same code.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00255 | train |
v3 | Schema:
transactions (alias: gev)(level, code, name, date)
categories(code, name, amount, level)
Task: Find id from transactions where salary exceeds the average salary from categories for the same type.
SQL: | SELECT id FROM transactions AS gev
WHERE salary > (
SELECT AVG(salary) FROM categories AS egiv
WHERE egiv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00256 | train |
v3 | Schema:
projects (alias: uliv)(salary, amount, value, date)
transactions(type, value, salary, level)
Task: Find name from projects where value exceeds the maximum value from transactions for the same id.
SQL: | SELECT name FROM projects AS uliv
WHERE value > (
SELECT MAX(value) FROM transactions AS gev
WHERE gev.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00257 | train |
v3 | Schema:
transactions (alias: gev)(amount, code, status, type)
branches(status, code, salary, date)
Task: Find id from transactions where salary exceeds the total amount from branches for the same id.
SQL: | SELECT id FROM transactions AS gev
WHERE salary > (
SELECT SUM(amount) FROM branches AS agov
WHERE agov.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "branches",
"outer_alias": "gev",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00258 | train |
v2 | Schema:
accounts (alias: jac)(value, date, code, level)
transactions(type, status, id, salary)
Task: Retrieve name from accounts that have at least one corresponding entry in transactions sharing the same status.
SQL: | SELECT name FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00259 | train |
v2 | Schema:
sales (alias: cif)(amount, name, id, date)
requests(name, id, code, level)
Task: Retrieve amount from sales that have at least one corresponding entry in requests sharing the same id.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00260 | train |
v2 | Schema:
categories (alias: egiv)(amount, type, date, value)
managers(date, level, type, value)
Task: Find value from categories where a matching record exists in managers with the same level.
SQL: | SELECT value FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "managers",
"outer_alias": "egiv",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00261 | train |
v1 | Schema:
employees (alias: bev)(amount, name, salary, value)
schedules(type, status, id, code)
Task: Select id from employees where type exists in schedules for the same level.
SQL: | SELECT id FROM employees AS bev
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "schedules",
"outer_alias": "bev",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00262 | train |
v1 | Schema:
managers (alias: hac)(value, id, name, status)
customers(date, name, amount, level)
Task: Find amount from managers where id appears in customers entries with matching id.
SQL: | SELECT amount FROM managers AS hac
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00263 | train |
v2 | Schema:
departments (alias: dov)(code, name, date, amount)
items(value, date, amount, level)
Task: Retrieve name from departments that have at least one corresponding entry in items sharing the same code.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00264 | train |
v2 | Schema:
shipments (alias: vnob)(name, salary, amount, status)
staff(id, date, type, value)
Task: Retrieve code from shipments that have at least one corresponding entry in staff sharing the same id.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "vnob",
"inner_alias": "xnob",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00265 | train |
v3 | Schema:
shipments (alias: vnob)(salary, level, date, status)
branches(salary, name, id, type)
Task: Find value from shipments where salary exceeds the average salary from branches for the same status.
SQL: | SELECT value FROM shipments AS vnob
WHERE salary > (
SELECT AVG(salary) FROM branches AS agov
WHERE agov.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "branches",
"outer_alias": "vnob",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00266 | train |
v2 | Schema:
employees (alias: bev)(type, status, value, salary)
regions(date, amount, name, status)
Task: Retrieve amount from employees that have at least one corresponding entry in regions sharing the same type.
SQL: | SELECT amount 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": "amount",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00267 | train |
v2 | Schema:
accounts (alias: jac)(amount, level, salary, code)
customers(code, type, name, date)
Task: Find id from accounts where a matching record exists in customers with the same id.
SQL: | SELECT id FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00268 | train |
v2 | Schema:
regions (alias: okiv)(date, salary, amount, level)
shipments(id, type, date, status)
Task: Find salary from regions where a matching record exists in shipments with the same level.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "shipments",
"outer_alias": "okiv",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00269 | train |
v2 | Schema:
sales (alias: cif)(code, amount, type, level)
invoices(id, name, code, status)
Task: Find salary from sales where a matching record exists in invoices with the same id.
SQL: | SELECT salary FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00270 | train |
v3 | Schema:
departments (alias: dov)(level, salary, type, value)
tasks(value, amount, level, date)
Task: Retrieve amount from departments with salary above the MAX(amount) of tasks rows sharing the same id.
SQL: | SELECT amount FROM departments AS dov
WHERE salary > (
SELECT MAX(amount) FROM tasks AS znob
WHERE znob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "tasks",
"outer_alias": "dov",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00271 | train |
v1 | Schema:
departments (alias: dov)(date, level, value, name)
accounts(value, date, type, code)
Task: Select amount from departments where type exists in accounts for the same code.
SQL: | SELECT amount FROM departments AS dov
WHERE type IN (
SELECT type FROM accounts AS jac
WHERE jac.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "accounts",
"outer_alias": "dov",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00272 | train |
v2 | Schema:
regions (alias: okiv)(id, name, salary, level)
schedules(id, name, salary, code)
Task: Retrieve id from regions that have at least one corresponding entry in schedules sharing the same type.
SQL: | SELECT id 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": "id",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00273 | train |
v2 | Schema:
shipments (alias: vnob)(name, amount, salary, id)
invoices(amount, date, level, code)
Task: Find salary from shipments where a matching record exists in invoices with the same id.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "invoices",
"outer_alias": "vnob",
"inner_alias": "fal",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00274 | train |
v1 | Schema:
products (alias: nad)(type, code, name, date)
shipments(status, level, code, value)
Task: Retrieve amount from products whose type is found in shipments rows where id matches the outer record.
SQL: | SELECT amount FROM products AS nad
WHERE type IN (
SELECT type FROM shipments AS vnob
WHERE vnob.id = nad.id
); | {
"outer_table": "products",
"inner_table": "shipments",
"outer_alias": "nad",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00275 | train |
v1 | Schema:
sales (alias: cif)(amount, level, type, id)
shipments(id, salary, date, amount)
Task: Find amount from sales where id appears in shipments entries with matching type.
SQL: | SELECT amount FROM sales AS cif
WHERE id IN (
SELECT id FROM shipments AS vnob
WHERE vnob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00276 | train |
v1 | Schema:
requests (alias: ejof)(date, value, level, name)
categories(id, type, code, status)
Task: Find code from requests where code appears in categories entries with matching id.
SQL: | SELECT code FROM requests AS ejof
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00277 | train |
v3 | Schema:
sales (alias: cif)(value, type, code, level)
invoices(code, name, value, id)
Task: Find id from sales where amount exceeds the count of salary from invoices for the same id.
SQL: | SELECT id FROM sales AS cif
WHERE amount > (
SELECT COUNT(salary) FROM invoices AS fal
WHERE fal.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00278 | train |
v1 | Schema:
orders (alias: kab)(value, name, date, type)
categories(type, id, value, code)
Task: Select name from orders where id exists in categories for the same status.
SQL: | SELECT name FROM orders AS kab
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00279 | train |
v2 | Schema:
transactions (alias: gev)(salary, value, status, level)
items(code, id, level, name)
Task: Find value from transactions where a matching record exists in items with the same status.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00280 | train |
v3 | Schema:
managers (alias: hac)(id, salary, level, amount)
regions(status, level, amount, salary)
Task: Retrieve salary from managers with salary above the SUM(salary) of regions rows sharing the same type.
SQL: | SELECT salary FROM managers AS hac
WHERE salary > (
SELECT SUM(salary) FROM regions AS okiv
WHERE okiv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "hac",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00281 | train |
v2 | Schema:
regions (alias: okiv)(type, name, code, status)
schedules(name, level, type, salary)
Task: Retrieve value from regions that have at least one corresponding entry in schedules sharing the same code.
SQL: | SELECT value FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "schedules",
"outer_alias": "okiv",
"inner_alias": "vmob",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00282 | train |
v1 | Schema:
tasks (alias: znob)(value, type, code, amount)
managers(id, salary, name, status)
Task: Retrieve name from tasks whose code is found in managers rows where level matches the outer record.
SQL: | SELECT name FROM tasks AS znob
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "managers",
"outer_alias": "znob",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00283 | train |
v3 | Schema:
staff (alias: xnob)(name, type, level, date)
departments(id, code, level, salary)
Task: Retrieve value from staff with salary above the SUM(amount) of departments rows sharing the same type.
SQL: | SELECT value FROM staff AS xnob
WHERE salary > (
SELECT SUM(amount) FROM departments AS dov
WHERE dov.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00284 | train |
v3 | Schema:
sales (alias: cif)(status, code, level, type)
accounts(id, value, salary, type)
Task: Retrieve name from sales with amount above the SUM(salary) of accounts rows sharing the same level.
SQL: | SELECT name FROM sales AS cif
WHERE amount > (
SELECT SUM(salary) FROM accounts AS jac
WHERE jac.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "accounts",
"outer_alias": "cif",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00285 | train |
v3 | Schema:
accounts (alias: jac)(type, date, amount, name)
projects(code, date, salary, name)
Task: Retrieve id from accounts with amount above the MIN(value) of projects rows sharing the same status.
SQL: | SELECT id FROM accounts AS jac
WHERE amount > (
SELECT MIN(value) FROM projects AS uliv
WHERE uliv.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00286 | train |
v3 | Schema:
regions (alias: okiv)(salary, value, date, type)
accounts(name, type, salary, date)
Task: Find name from regions where value exceeds the minimum value from accounts for the same level.
SQL: | SELECT name FROM regions AS okiv
WHERE value > (
SELECT MIN(value) FROM accounts AS jac
WHERE jac.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "accounts",
"outer_alias": "okiv",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00287 | train |
v3 | Schema:
orders (alias: kab)(amount, salary, name, date)
shipments(code, value, id, salary)
Task: Retrieve code from orders with salary above the AVG(amount) of shipments rows sharing the same level.
SQL: | SELECT code FROM orders AS kab
WHERE salary > (
SELECT AVG(amount) FROM shipments AS vnob
WHERE vnob.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00288 | train |
v2 | Schema:
shipments (alias: vnob)(value, code, status, name)
requests(name, type, salary, code)
Task: Retrieve code from shipments that have at least one corresponding entry in requests sharing the same level.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00289 | train |
v3 | Schema:
customers (alias: lex)(level, status, amount, id)
accounts(id, code, name, status)
Task: Find salary from customers where salary exceeds the average value from accounts for the same type.
SQL: | SELECT salary FROM customers AS lex
WHERE salary > (
SELECT AVG(value) FROM accounts AS jac
WHERE jac.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00290 | train |
v1 | Schema:
products (alias: nad)(amount, level, salary, value)
requests(id, value, salary, type)
Task: Select salary from products where type exists in requests for the same id.
SQL: | SELECT salary FROM products AS nad
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.id = nad.id
); | {
"outer_table": "products",
"inner_table": "requests",
"outer_alias": "nad",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00291 | train |
v2 | Schema:
tasks (alias: znob)(date, value, status, level)
managers(level, code, name, id)
Task: Retrieve code from tasks that have at least one corresponding entry in managers sharing the same code.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "managers",
"outer_alias": "znob",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00292 | train |
v3 | Schema:
transactions (alias: gev)(code, value, date, status)
employees(code, amount, value, name)
Task: Find id from transactions where value exceeds the count of amount from employees for the same status.
SQL: | SELECT id FROM transactions AS gev
WHERE value > (
SELECT COUNT(amount) FROM employees AS bev
WHERE bev.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "employees",
"outer_alias": "gev",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00293 | train |
v3 | Schema:
shipments (alias: vnob)(id, name, level, salary)
items(name, status, amount, date)
Task: Find amount from shipments where amount exceeds the total amount from items for the same level.
SQL: | SELECT amount FROM shipments AS vnob
WHERE amount > (
SELECT SUM(amount) FROM items AS ikob
WHERE ikob.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "items",
"outer_alias": "vnob",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00294 | train |
v1 | Schema:
products (alias: nad)(name, code, type, amount)
customers(date, code, value, type)
Task: Retrieve salary from products whose type is found in customers rows where status matches the outer record.
SQL: | SELECT salary FROM products AS nad
WHERE type IN (
SELECT type FROM customers AS lex
WHERE lex.status = nad.status
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00295 | train |
v1 | Schema:
managers (alias: hac)(salary, name, code, status)
categories(id, salary, value, level)
Task: Select value from managers where type exists in categories for the same type.
SQL: | SELECT value FROM managers AS hac
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00296 | train |
v1 | Schema:
sales (alias: cif)(name, amount, id, status)
requests(code, level, name, type)
Task: Select amount from sales where type exists in requests for the same type.
SQL: | SELECT amount FROM sales AS cif
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00297 | train |
v3 | Schema:
tasks (alias: znob)(type, date, amount, id)
employees(salary, type, id, amount)
Task: Find id from tasks where value exceeds the count of value from employees for the same type.
SQL: | SELECT id FROM tasks AS znob
WHERE value > (
SELECT COUNT(value) FROM employees AS bev
WHERE bev.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00298 | train |
v2 | Schema:
projects (alias: uliv)(status, code, salary, date)
transactions(salary, status, date, code)
Task: Retrieve id from projects that have at least one corresponding entry in transactions sharing the same id.
SQL: | SELECT id FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00299 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.