variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v3 | Schema:
items (alias: ikob)(amount, level, value, type)
orders(salary, id, level, type)
Task: Retrieve id from items with salary above the AVG(salary) of orders rows sharing the same level.
SQL: | SELECT id FROM items AS ikob
WHERE salary > (
SELECT AVG(salary) FROM orders AS kab
WHERE kab.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04100 | train |
v1 | Schema:
accounts (alias: jac)(value, level, id, amount)
departments(level, code, name, amount)
Task: Select id from accounts where type exists in departments for the same id.
SQL: | SELECT id FROM accounts AS jac
WHERE type IN (
SELECT type FROM departments AS dov
WHERE dov.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "departments",
"outer_alias": "jac",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04101 | train |
v1 | Schema:
customers (alias: lex)(level, salary, code, value)
orders(level, status, value, date)
Task: Find amount from customers where level appears in orders entries with matching code.
SQL: | SELECT amount FROM customers AS lex
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "orders",
"outer_alias": "lex",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04102 | train |
v2 | Schema:
projects (alias: uliv)(amount, id, level, salary)
items(level, amount, code, value)
Task: Find salary from projects where a matching record exists in items with the same level.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04103 | train |
v3 | Schema:
departments (alias: dov)(type, id, status, date)
products(date, amount, code, level)
Task: Retrieve salary from departments with value above the COUNT(salary) of products rows sharing the same code.
SQL: | SELECT salary FROM departments AS dov
WHERE value > (
SELECT COUNT(salary) FROM products AS nad
WHERE nad.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "products",
"outer_alias": "dov",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04104 | train |
v1 | Schema:
projects (alias: uliv)(amount, salary, date, status)
categories(code, salary, level, name)
Task: Select amount from projects where type exists in categories for the same id.
SQL: | SELECT amount FROM projects AS uliv
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04105 | train |
v3 | Schema:
shipments (alias: vnob)(id, status, amount, code)
tasks(level, status, salary, date)
Task: Retrieve name from shipments with salary above the MIN(amount) of tasks rows sharing the same level.
SQL: | SELECT name FROM shipments AS vnob
WHERE salary > (
SELECT MIN(amount) FROM tasks AS znob
WHERE znob.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "tasks",
"outer_alias": "vnob",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04106 | train |
v3 | Schema:
employees (alias: bev)(amount, salary, level, date)
branches(type, value, salary, code)
Task: Find code from employees where value exceeds the total amount from branches for the same level.
SQL: | SELECT code FROM employees AS bev
WHERE value > (
SELECT SUM(amount) FROM branches AS agov
WHERE agov.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04107 | train |
v1 | Schema:
invoices (alias: fal)(amount, value, code, name)
products(date, salary, name, amount)
Task: Retrieve salary from invoices whose level is found in products rows where code matches the outer record.
SQL: | SELECT salary FROM invoices AS fal
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "products",
"outer_alias": "fal",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04108 | train |
v2 | Schema:
categories (alias: egiv)(value, status, id, level)
tasks(level, amount, date, id)
Task: Find id from categories where a matching record exists in tasks with the same status.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "tasks",
"outer_alias": "egiv",
"inner_alias": "znob",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04109 | train |
v1 | Schema:
projects (alias: uliv)(level, amount, name, value)
branches(name, salary, level, value)
Task: Retrieve value from projects whose status is found in branches rows where status matches the outer record.
SQL: | SELECT value FROM projects AS uliv
WHERE status IN (
SELECT status FROM branches AS agov
WHERE agov.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "branches",
"outer_alias": "uliv",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04110 | train |
v2 | Schema:
products (alias: nad)(value, date, code, status)
branches(salary, id, level, status)
Task: Retrieve salary from products that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = nad.id
); | {
"outer_table": "products",
"inner_table": "branches",
"outer_alias": "nad",
"inner_alias": "agov",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04111 | train |
v3 | Schema:
items (alias: ikob)(type, date, status, code)
accounts(status, date, type, name)
Task: Find salary from items where salary exceeds the total amount from accounts for the same id.
SQL: | SELECT salary FROM items AS ikob
WHERE salary > (
SELECT SUM(amount) FROM accounts AS jac
WHERE jac.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "accounts",
"outer_alias": "ikob",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04112 | train |
v1 | Schema:
managers (alias: hac)(name, salary, level, code)
branches(level, status, code, id)
Task: Select id from managers where type exists in branches for the same code.
SQL: | SELECT id FROM managers AS hac
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "branches",
"outer_alias": "hac",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04113 | train |
v3 | Schema:
schedules (alias: vmob)(id, level, name, code)
managers(level, status, name, date)
Task: Find code from schedules where value exceeds the average value from managers for the same code.
SQL: | SELECT code FROM schedules AS vmob
WHERE value > (
SELECT AVG(value) FROM managers AS hac
WHERE hac.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04114 | train |
v1 | Schema:
items (alias: ikob)(amount, status, code, salary)
categories(value, level, date, name)
Task: Find code from items where code appears in categories entries with matching code.
SQL: | SELECT code FROM items AS ikob
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "categories",
"outer_alias": "ikob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04115 | train |
v3 | Schema:
managers (alias: hac)(salary, value, name, level)
shipments(date, value, level, status)
Task: Find amount from managers where salary exceeds the count of amount from shipments for the same type.
SQL: | SELECT amount FROM managers AS hac
WHERE salary > (
SELECT COUNT(amount) FROM shipments AS vnob
WHERE vnob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "hac",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04116 | train |
v3 | Schema:
projects (alias: uliv)(amount, code, level, date)
accounts(name, status, id, value)
Task: Find name from projects where amount exceeds the maximum amount from accounts for the same code.
SQL: | SELECT name FROM projects AS uliv
WHERE amount > (
SELECT MAX(amount) FROM accounts AS jac
WHERE jac.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "accounts",
"outer_alias": "uliv",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04117 | train |
v3 | Schema:
employees (alias: bev)(status, name, amount, salary)
departments(name, type, level, value)
Task: Find value from employees where amount exceeds the maximum salary from departments for the same status.
SQL: | SELECT value FROM employees AS bev
WHERE amount > (
SELECT MAX(salary) FROM departments AS dov
WHERE dov.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04118 | train |
v2 | Schema:
branches (alias: agov)(date, type, code, salary)
accounts(date, salary, name, level)
Task: Find salary from branches where a matching record exists in accounts with the same id.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04119 | train |
v1 | Schema:
customers (alias: lex)(name, level, status, code)
products(value, salary, status, code)
Task: Find salary from customers where level appears in products entries with matching level.
SQL: | SELECT salary FROM customers AS lex
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04120 | train |
v3 | Schema:
managers (alias: hac)(name, status, code, id)
employees(level, code, status, name)
Task: Retrieve salary from managers with value above the COUNT(amount) of employees rows sharing the same level.
SQL: | SELECT salary FROM managers AS hac
WHERE value > (
SELECT COUNT(amount) FROM employees AS bev
WHERE bev.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04121 | train |
v2 | Schema:
employees (alias: bev)(type, name, date, id)
regions(code, value, status, salary)
Task: Find salary from employees where a matching record exists in regions with the same id.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "regions",
"outer_alias": "bev",
"inner_alias": "okiv",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04122 | train |
v1 | Schema:
requests (alias: ejof)(id, name, status, level)
products(name, value, salary, level)
Task: Find code from requests where status appears in products entries with matching status.
SQL: | SELECT code FROM requests AS ejof
WHERE status IN (
SELECT status FROM products AS nad
WHERE nad.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ejof",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04123 | train |
v2 | Schema:
invoices (alias: fal)(name, amount, date, level)
products(value, status, salary, date)
Task: Find value from invoices where a matching record exists in products with the same status.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "products",
"outer_alias": "fal",
"inner_alias": "nad",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04124 | train |
v1 | Schema:
items (alias: ikob)(code, name, type, date)
tasks(amount, id, date, type)
Task: Find amount from items where type appears in tasks entries with matching status.
SQL: | SELECT amount FROM items AS ikob
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "tasks",
"outer_alias": "ikob",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04125 | train |
v1 | Schema:
tasks (alias: znob)(salary, type, code, value)
products(value, status, name, amount)
Task: Select value from tasks where type exists in products for the same status.
SQL: | SELECT value FROM tasks AS znob
WHERE type IN (
SELECT type FROM products AS nad
WHERE nad.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04126 | train |
v2 | Schema:
schedules (alias: vmob)(level, status, id, date)
requests(value, date, id, type)
Task: Find amount from schedules where a matching record exists in requests with the same type.
SQL: | SELECT amount FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "requests",
"outer_alias": "vmob",
"inner_alias": "ejof",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04127 | train |
v1 | Schema:
products (alias: nad)(amount, status, id, value)
customers(date, amount, id, salary)
Task: Select id from products where type exists in customers for the same status.
SQL: | SELECT id 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": "id",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04128 | train |
v1 | Schema:
sales (alias: cif)(salary, amount, date, type)
orders(value, amount, salary, date)
Task: Retrieve id from sales whose id is found in orders rows where status matches the outer record.
SQL: | SELECT id FROM sales AS cif
WHERE id IN (
SELECT id FROM orders AS kab
WHERE kab.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "orders",
"outer_alias": "cif",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04129 | train |
v3 | Schema:
departments (alias: dov)(status, level, type, date)
requests(type, date, value, status)
Task: Find amount from departments where salary exceeds the average value from requests for the same id.
SQL: | SELECT amount FROM departments AS dov
WHERE salary > (
SELECT AVG(value) FROM requests AS ejof
WHERE ejof.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "requests",
"outer_alias": "dov",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04130 | train |
v2 | Schema:
sales (alias: cif)(value, id, date, type)
tasks(id, salary, level, status)
Task: Find amount from sales where a matching record exists in tasks with the same level.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "tasks",
"outer_alias": "cif",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04131 | train |
v2 | Schema:
requests (alias: ejof)(code, level, type, value)
tasks(level, value, salary, amount)
Task: Retrieve name from requests that have at least one corresponding entry in tasks sharing the same level.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04132 | train |
v2 | Schema:
categories (alias: egiv)(date, name, code, id)
branches(amount, salary, code, name)
Task: Find id from categories where a matching record exists in branches with the same level.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04133 | train |
v1 | Schema:
products (alias: nad)(amount, id, type, value)
departments(salary, id, amount, value)
Task: Retrieve value from products whose type is found in departments rows where type matches the outer record.
SQL: | SELECT value FROM products AS nad
WHERE type IN (
SELECT type FROM departments AS dov
WHERE dov.type = nad.type
); | {
"outer_table": "products",
"inner_table": "departments",
"outer_alias": "nad",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04134 | train |
v3 | Schema:
departments (alias: dov)(name, level, amount, salary)
tasks(amount, status, value, code)
Task: Find amount from departments where amount exceeds the minimum value from tasks for the same level.
SQL: | SELECT amount FROM departments AS dov
WHERE amount > (
SELECT MIN(value) FROM tasks AS znob
WHERE znob.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "tasks",
"outer_alias": "dov",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04135 | train |
v1 | Schema:
tasks (alias: znob)(level, salary, name, id)
products(name, value, status, code)
Task: Retrieve name from tasks whose id is found in products rows where level matches the outer record.
SQL: | SELECT name FROM tasks AS znob
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04136 | train |
v3 | Schema:
accounts (alias: jac)(value, code, date, level)
projects(type, id, value, salary)
Task: Retrieve value from accounts with amount above the SUM(salary) of projects rows sharing the same id.
SQL: | SELECT value FROM accounts AS jac
WHERE amount > (
SELECT SUM(salary) FROM projects AS uliv
WHERE uliv.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04137 | train |
v1 | Schema:
items (alias: ikob)(name, code, status, id)
employees(status, value, salary, date)
Task: Find id from items where type appears in employees entries with matching level.
SQL: | SELECT id FROM items AS ikob
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "ikob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04138 | train |
v2 | Schema:
orders (alias: kab)(salary, code, level, type)
sales(code, amount, type, salary)
Task: Find value from orders where a matching record exists in sales with the same type.
SQL: | SELECT value FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "sales",
"outer_alias": "kab",
"inner_alias": "cif",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04139 | train |
v1 | Schema:
projects (alias: uliv)(value, type, date, level)
shipments(code, id, status, salary)
Task: Select salary from projects where code exists in shipments for the same code.
SQL: | SELECT salary FROM projects AS uliv
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "shipments",
"outer_alias": "uliv",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04140 | train |
v2 | Schema:
sales (alias: cif)(code, type, value, salary)
products(code, level, name, salary)
Task: Retrieve id from sales that have at least one corresponding entry in products sharing the same level.
SQL: | SELECT id FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04141 | train |
v2 | Schema:
accounts (alias: jac)(salary, id, status, date)
shipments(code, type, amount, level)
Task: Retrieve salary from accounts that have at least one corresponding entry in shipments sharing the same type.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "shipments",
"outer_alias": "jac",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04142 | train |
v3 | Schema:
categories (alias: egiv)(name, level, type, status)
schedules(amount, value, status, level)
Task: Find name from categories where salary exceeds the minimum value from schedules for the same code.
SQL: | SELECT name FROM categories AS egiv
WHERE salary > (
SELECT MIN(value) FROM schedules AS vmob
WHERE vmob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04143 | train |
v1 | Schema:
employees (alias: bev)(level, date, status, value)
tasks(id, name, status, salary)
Task: Find amount from employees where type appears in tasks entries with matching id.
SQL: | SELECT amount 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": "amount",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04144 | train |
v2 | Schema:
shipments (alias: vnob)(name, amount, value, salary)
transactions(code, type, value, date)
Task: Retrieve code from shipments that have at least one corresponding entry in transactions sharing the same id.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04145 | train |
v1 | Schema:
staff (alias: xnob)(name, salary, value, level)
schedules(value, id, level, salary)
Task: Find salary from staff where level appears in schedules entries with matching type.
SQL: | SELECT salary FROM staff AS xnob
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "schedules",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04146 | train |
v2 | Schema:
departments (alias: dov)(code, name, value, date)
items(status, type, id, salary)
Task: Find id from departments where a matching record exists in items with the same type.
SQL: | SELECT id FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04147 | train |
v3 | Schema:
accounts (alias: jac)(code, status, level, date)
projects(level, code, date, amount)
Task: Find code from accounts where value exceeds the minimum value from projects for the same level.
SQL: | SELECT code FROM accounts AS jac
WHERE value > (
SELECT MIN(value) FROM projects AS uliv
WHERE uliv.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04148 | train |
v3 | Schema:
branches (alias: agov)(id, name, salary, value)
schedules(amount, value, type, level)
Task: Find name from branches where amount exceeds the minimum amount from schedules for the same type.
SQL: | SELECT name FROM branches AS agov
WHERE amount > (
SELECT MIN(amount) FROM schedules AS vmob
WHERE vmob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "schedules",
"outer_alias": "agov",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04149 | train |
v3 | Schema:
transactions (alias: gev)(name, code, amount, id)
schedules(id, date, level, name)
Task: Find salary from transactions where salary exceeds the average amount from schedules for the same id.
SQL: | SELECT salary FROM transactions AS gev
WHERE salary > (
SELECT AVG(amount) FROM schedules AS vmob
WHERE vmob.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04150 | train |
v3 | Schema:
staff (alias: xnob)(value, code, name, type)
projects(level, value, salary, status)
Task: Retrieve name from staff with value above the MIN(value) of projects rows sharing the same level.
SQL: | SELECT name FROM staff AS xnob
WHERE value > (
SELECT MIN(value) FROM projects AS uliv
WHERE uliv.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04151 | train |
v1 | Schema:
managers (alias: hac)(value, name, date, amount)
sales(salary, status, amount, date)
Task: Find code from managers where code appears in sales entries with matching level.
SQL: | SELECT code FROM managers AS hac
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04152 | train |
v1 | Schema:
projects (alias: uliv)(status, type, amount, code)
transactions(salary, id, type, status)
Task: Select code from projects where id exists in transactions for the same type.
SQL: | SELECT code FROM projects AS uliv
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04153 | train |
v1 | Schema:
schedules (alias: vmob)(salary, code, name, date)
requests(id, status, amount, name)
Task: Retrieve name from schedules whose type is found in requests rows where type matches the outer record.
SQL: | SELECT name FROM schedules AS vmob
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "requests",
"outer_alias": "vmob",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04154 | train |
v2 | Schema:
transactions (alias: gev)(type, salary, amount, name)
regions(level, amount, type, salary)
Task: Find amount from transactions where a matching record exists in regions with the same type.
SQL: | SELECT amount FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04155 | train |
v1 | Schema:
branches (alias: agov)(name, status, amount, code)
tasks(name, amount, date, status)
Task: Find salary from branches where level appears in tasks entries with matching code.
SQL: | SELECT salary FROM branches AS agov
WHERE level IN (
SELECT level FROM tasks AS znob
WHERE znob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "tasks",
"outer_alias": "agov",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04156 | train |
v2 | Schema:
tasks (alias: znob)(level, id, date, status)
branches(status, level, date, salary)
Task: Find id from tasks where a matching record exists in branches with the same code.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "branches",
"outer_alias": "znob",
"inner_alias": "agov",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04157 | train |
v1 | Schema:
regions (alias: okiv)(level, status, value, salary)
tasks(type, level, value, amount)
Task: Find amount from regions where id appears in tasks entries with matching type.
SQL: | SELECT amount FROM regions AS okiv
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04158 | train |
v1 | Schema:
items (alias: ikob)(value, status, amount, id)
transactions(level, status, salary, amount)
Task: Find amount from items where level appears in transactions entries with matching status.
SQL: | SELECT amount FROM items AS ikob
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "transactions",
"outer_alias": "ikob",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04159 | train |
v2 | Schema:
products (alias: nad)(type, id, name, status)
regions(code, name, id, salary)
Task: Retrieve value from products that have at least one corresponding entry in regions sharing the same code.
SQL: | SELECT value FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = nad.code
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04160 | train |
v2 | Schema:
accounts (alias: jac)(value, name, level, salary)
schedules(level, amount, id, salary)
Task: Find code from accounts where a matching record exists in schedules with the same type.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04161 | train |
v2 | Schema:
regions (alias: okiv)(level, salary, amount, value)
transactions(id, date, name, salary)
Task: Find salary from regions where a matching record exists in transactions with the same code.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "transactions",
"outer_alias": "okiv",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04162 | train |
v1 | Schema:
orders (alias: kab)(date, value, code, name)
items(salary, amount, name, value)
Task: Select amount from orders where status exists in items for the same code.
SQL: | SELECT amount FROM orders AS kab
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "items",
"outer_alias": "kab",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04163 | train |
v2 | Schema:
requests (alias: ejof)(level, amount, code, type)
transactions(status, id, salary, date)
Task: Retrieve id from requests that have at least one corresponding entry in transactions sharing the same type.
SQL: | SELECT id FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "transactions",
"outer_alias": "ejof",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04164 | train |
v1 | Schema:
requests (alias: ejof)(date, value, salary, type)
products(salary, type, name, code)
Task: Find name from requests where status appears in products entries with matching code.
SQL: | SELECT name FROM requests AS ejof
WHERE status IN (
SELECT status FROM products AS nad
WHERE nad.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ejof",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04165 | train |
v3 | Schema:
branches (alias: agov)(date, amount, type, level)
products(status, level, id, amount)
Task: Find code from branches where salary exceeds the minimum value from products for the same status.
SQL: | SELECT code FROM branches AS agov
WHERE salary > (
SELECT MIN(value) FROM products AS nad
WHERE nad.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04166 | train |
v2 | Schema:
categories (alias: egiv)(salary, level, code, date)
orders(amount, id, type, name)
Task: Find code from categories where a matching record exists in orders with the same type.
SQL: | SELECT code FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04167 | train |
v1 | Schema:
shipments (alias: vnob)(type, code, name, level)
requests(id, code, salary, value)
Task: Retrieve code from shipments whose id is found in requests rows where id matches the outer record.
SQL: | SELECT code FROM shipments AS vnob
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04168 | train |
v2 | Schema:
orders (alias: kab)(level, salary, name, status)
customers(salary, id, amount, date)
Task: Retrieve id from orders that have at least one corresponding entry in customers sharing the same status.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "customers",
"outer_alias": "kab",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04169 | train |
v2 | Schema:
orders (alias: kab)(value, status, amount, code)
products(status, level, type, salary)
Task: Retrieve name from orders that have at least one corresponding entry in products sharing the same code.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04170 | train |
v3 | Schema:
transactions (alias: gev)(date, salary, code, amount)
tasks(type, code, amount, salary)
Task: Find salary from transactions where salary exceeds the total value from tasks for the same id.
SQL: | SELECT salary FROM transactions AS gev
WHERE salary > (
SELECT SUM(value) FROM tasks AS znob
WHERE znob.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "tasks",
"outer_alias": "gev",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04171 | train |
v2 | Schema:
accounts (alias: jac)(name, id, code, value)
tasks(date, name, code, id)
Task: Find id from accounts where a matching record exists in tasks with the same code.
SQL: | SELECT id FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "tasks",
"outer_alias": "jac",
"inner_alias": "znob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04172 | train |
v1 | Schema:
employees (alias: bev)(id, salary, level, date)
departments(amount, id, level, name)
Task: Retrieve salary from employees whose code is found in departments rows where type matches the outer record.
SQL: | SELECT salary FROM employees AS bev
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04173 | train |
v3 | Schema:
customers (alias: lex)(value, code, amount, id)
categories(level, name, status, type)
Task: Find id from customers where amount exceeds the total salary from categories for the same level.
SQL: | SELECT id FROM customers AS lex
WHERE amount > (
SELECT SUM(salary) FROM categories AS egiv
WHERE egiv.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "categories",
"outer_alias": "lex",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04174 | train |
v2 | Schema:
products (alias: nad)(name, salary, amount, date)
orders(value, salary, name, code)
Task: Find salary from products where a matching record exists in orders with the same level.
SQL: | SELECT salary 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": "salary",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04175 | train |
v2 | Schema:
branches (alias: agov)(code, value, id, salary)
accounts(amount, date, status, id)
Task: Find id from branches where a matching record exists in accounts with the same level.
SQL: | SELECT id FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04176 | train |
v2 | Schema:
invoices (alias: fal)(value, amount, status, code)
items(type, level, code, salary)
Task: Retrieve value from invoices that have at least one corresponding entry in items sharing the same status.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "fal",
"inner_alias": "ikob",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04177 | train |
v3 | Schema:
requests (alias: ejof)(name, status, value, type)
regions(level, name, salary, status)
Task: Retrieve value from requests with value above the COUNT(value) of regions rows sharing the same level.
SQL: | SELECT value FROM requests AS ejof
WHERE value > (
SELECT COUNT(value) FROM regions AS okiv
WHERE okiv.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "regions",
"outer_alias": "ejof",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04178 | train |
v1 | Schema:
managers (alias: hac)(id, amount, status, date)
regions(value, amount, date, type)
Task: Select salary from managers where id exists in regions for the same status.
SQL: | SELECT salary FROM managers AS hac
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "hac",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04179 | train |
v2 | Schema:
transactions (alias: gev)(salary, level, id, amount)
schedules(level, status, date, name)
Task: Find id from transactions where a matching record exists in schedules with the same code.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04180 | train |
v3 | Schema:
branches (alias: agov)(id, date, salary, name)
customers(amount, type, code, level)
Task: Retrieve id from branches with amount above the SUM(amount) of customers rows sharing the same id.
SQL: | SELECT id FROM branches AS agov
WHERE amount > (
SELECT SUM(amount) FROM customers AS lex
WHERE lex.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04181 | train |
v1 | Schema:
products (alias: nad)(salary, name, id, date)
accounts(id, type, value, date)
Task: Select salary from products where id exists in accounts for the same id.
SQL: | SELECT salary FROM products AS nad
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.id = nad.id
); | {
"outer_table": "products",
"inner_table": "accounts",
"outer_alias": "nad",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04182 | train |
v3 | Schema:
departments (alias: dov)(salary, amount, level, value)
sales(value, salary, level, date)
Task: Retrieve amount from departments with value above the AVG(salary) of sales rows sharing the same status.
SQL: | SELECT amount FROM departments AS dov
WHERE value > (
SELECT AVG(salary) FROM sales AS cif
WHERE cif.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04183 | train |
v1 | Schema:
schedules (alias: vmob)(date, value, id, salary)
categories(id, status, date, amount)
Task: Find name from schedules where type appears in categories entries with matching code.
SQL: | SELECT name FROM schedules AS vmob
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04184 | train |
v1 | Schema:
orders (alias: kab)(name, salary, type, id)
accounts(name, id, amount, type)
Task: Retrieve id from orders whose level is found in accounts rows where type matches the outer record.
SQL: | SELECT id FROM orders AS kab
WHERE level IN (
SELECT level FROM accounts AS jac
WHERE jac.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04185 | train |
v3 | Schema:
employees (alias: bev)(id, salary, status, level)
tasks(date, status, value, amount)
Task: Retrieve code from employees with amount above the COUNT(value) of tasks rows sharing the same status.
SQL: | SELECT code FROM employees AS bev
WHERE amount > (
SELECT COUNT(value) FROM tasks AS znob
WHERE znob.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "tasks",
"outer_alias": "bev",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04186 | train |
v1 | Schema:
departments (alias: dov)(date, level, amount, status)
branches(level, salary, amount, type)
Task: Select salary from departments where status exists in branches for the same type.
SQL: | SELECT salary FROM departments AS dov
WHERE status IN (
SELECT status FROM branches AS agov
WHERE agov.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04187 | train |
v2 | Schema:
requests (alias: ejof)(salary, date, level, type)
staff(status, salary, value, id)
Task: Retrieve value from requests that have at least one corresponding entry in staff sharing the same code.
SQL: | SELECT value FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04188 | train |
v2 | Schema:
requests (alias: ejof)(status, name, type, id)
orders(id, status, name, type)
Task: Retrieve id from requests that have at least one corresponding entry in orders sharing the same status.
SQL: | SELECT id FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04189 | train |
v1 | Schema:
managers (alias: hac)(date, level, value, status)
schedules(type, value, date, status)
Task: Select salary from managers where code exists in schedules for the same id.
SQL: | SELECT salary FROM managers AS hac
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "schedules",
"outer_alias": "hac",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04190 | train |
v3 | Schema:
accounts (alias: jac)(status, id, value, level)
branches(status, date, type, id)
Task: Retrieve name from accounts with salary above the COUNT(value) of branches rows sharing the same code.
SQL: | SELECT name FROM accounts AS jac
WHERE salary > (
SELECT COUNT(value) FROM branches AS agov
WHERE agov.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "branches",
"outer_alias": "jac",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04191 | train |
v2 | Schema:
invoices (alias: fal)(code, status, id, salary)
branches(name, status, value, amount)
Task: Retrieve id from invoices that have at least one corresponding entry in branches sharing the same code.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "branches",
"outer_alias": "fal",
"inner_alias": "agov",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04192 | train |
v2 | Schema:
products (alias: nad)(code, status, date, type)
projects(id, date, salary, value)
Task: Retrieve id from products that have at least one corresponding entry in projects sharing the same level.
SQL: | SELECT id FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = nad.level
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04193 | train |
v3 | Schema:
categories (alias: egiv)(status, code, level, salary)
products(date, status, type, id)
Task: Retrieve salary from categories with salary above the SUM(salary) of products rows sharing the same level.
SQL: | SELECT salary FROM categories AS egiv
WHERE salary > (
SELECT SUM(salary) FROM products AS nad
WHERE nad.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "products",
"outer_alias": "egiv",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04194 | train |
v3 | Schema:
departments (alias: dov)(type, date, level, amount)
items(code, level, status, amount)
Task: Retrieve value from departments with value above the MAX(value) of items rows sharing the same type.
SQL: | SELECT value FROM departments AS dov
WHERE value > (
SELECT MAX(value) FROM items AS ikob
WHERE ikob.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04195 | train |
v2 | Schema:
sales (alias: cif)(id, level, salary, value)
managers(name, level, date, value)
Task: Retrieve value from sales that have at least one corresponding entry in managers sharing the same type.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04196 | train |
v1 | Schema:
orders (alias: kab)(id, name, code, status)
employees(date, type, value, level)
Task: Retrieve amount from orders whose status is found in employees rows where type matches the outer record.
SQL: | SELECT amount FROM orders AS kab
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "employees",
"outer_alias": "kab",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04197 | train |
v2 | Schema:
shipments (alias: vnob)(date, salary, amount, id)
accounts(code, salary, name, id)
Task: Find id from shipments where a matching record exists in accounts with the same code.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04198 | train |
v2 | Schema:
items (alias: ikob)(type, amount, name, level)
tasks(value, name, date, type)
Task: Find salary from items where a matching record exists in tasks with the same level.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "tasks",
"outer_alias": "ikob",
"inner_alias": "znob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04199 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.