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:
departments (alias: dov)(type, level, date, value)
staff(date, code, salary, name)
Task: Retrieve name from departments with amount above the MIN(value) of staff rows sharing the same status.
SQL: | SELECT name FROM departments AS dov
WHERE amount > (
SELECT MIN(value) FROM staff AS xnob
WHERE xnob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "staff",
"outer_alias": "dov",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09200 | train |
v3 | Schema:
staff (alias: xnob)(level, name, salary, id)
schedules(value, type, code, amount)
Task: Find code from staff where salary exceeds the count of amount from schedules for the same code.
SQL: | SELECT code FROM staff AS xnob
WHERE salary > (
SELECT COUNT(amount) FROM schedules AS vmob
WHERE vmob.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "schedules",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09201 | train |
v1 | Schema:
transactions (alias: gev)(status, id, name, level)
accounts(code, type, date, name)
Task: Select value from transactions where status exists in accounts for the same type.
SQL: | SELECT value FROM transactions AS gev
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "accounts",
"outer_alias": "gev",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09202 | train |
v3 | Schema:
staff (alias: xnob)(status, level, code, salary)
managers(amount, name, status, type)
Task: Retrieve amount from staff with amount above the COUNT(amount) of managers rows sharing the same type.
SQL: | SELECT amount FROM staff AS xnob
WHERE amount > (
SELECT COUNT(amount) FROM managers AS hac
WHERE hac.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "managers",
"outer_alias": "xnob",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09203 | train |
v3 | Schema:
branches (alias: agov)(status, salary, date, amount)
departments(code, value, amount, type)
Task: Find value from branches where amount exceeds the count of amount from departments for the same level.
SQL: | SELECT value FROM branches AS agov
WHERE amount > (
SELECT COUNT(amount) FROM departments AS dov
WHERE dov.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "departments",
"outer_alias": "agov",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09204 | train |
v3 | Schema:
invoices (alias: fal)(id, status, salary, level)
employees(id, status, name, value)
Task: Find amount from invoices where amount exceeds the total amount from employees for the same code.
SQL: | SELECT amount FROM invoices AS fal
WHERE amount > (
SELECT SUM(amount) FROM employees AS bev
WHERE bev.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09205 | train |
v3 | Schema:
staff (alias: xnob)(value, type, amount, name)
items(salary, type, code, level)
Task: Find id from staff where amount exceeds the total salary from items for the same id.
SQL: | SELECT id FROM staff AS xnob
WHERE amount > (
SELECT SUM(salary) FROM items AS ikob
WHERE ikob.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "items",
"outer_alias": "xnob",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09206 | train |
v2 | Schema:
sales (alias: cif)(name, amount, level, code)
managers(amount, level, id, type)
Task: Retrieve code from sales that have at least one corresponding entry in managers sharing the same type.
SQL: | SELECT code 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": "code",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09207 | train |
v2 | Schema:
regions (alias: okiv)(amount, name, code, date)
managers(value, status, date, salary)
Task: Retrieve name from regions that have at least one corresponding entry in managers sharing the same level.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "managers",
"outer_alias": "okiv",
"inner_alias": "hac",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09208 | train |
v1 | Schema:
invoices (alias: fal)(value, name, date, amount)
schedules(salary, value, amount, id)
Task: Find salary from invoices where status appears in schedules entries with matching code.
SQL: | SELECT salary FROM invoices AS fal
WHERE status IN (
SELECT status FROM schedules AS vmob
WHERE vmob.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09209 | train |
v3 | Schema:
accounts (alias: jac)(type, salary, name, level)
projects(value, status, type, id)
Task: Retrieve id from accounts with value above the AVG(value) of projects rows sharing the same type.
SQL: | SELECT id FROM accounts AS jac
WHERE value > (
SELECT AVG(value) FROM projects AS uliv
WHERE uliv.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09210 | train |
v1 | Schema:
tasks (alias: znob)(salary, code, type, level)
requests(salary, amount, level, date)
Task: Retrieve value from tasks whose code is found in requests rows where level matches the outer record.
SQL: | SELECT value FROM tasks AS znob
WHERE code IN (
SELECT code FROM requests AS ejof
WHERE ejof.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09211 | train |
v2 | Schema:
managers (alias: hac)(level, id, amount, salary)
branches(name, code, type, id)
Task: Retrieve name from managers that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "branches",
"outer_alias": "hac",
"inner_alias": "agov",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09212 | train |
v2 | Schema:
orders (alias: kab)(code, id, amount, salary)
transactions(type, level, status, date)
Task: Find salary from orders where a matching record exists in transactions with the same code.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09213 | train |
v1 | Schema:
products (alias: nad)(amount, code, date, salary)
customers(code, name, date, type)
Task: Select salary from products where type exists in customers for the same code.
SQL: | SELECT salary FROM products AS nad
WHERE type IN (
SELECT type FROM customers AS lex
WHERE lex.code = nad.code
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09214 | train |
v1 | Schema:
orders (alias: kab)(salary, code, id, type)
projects(level, amount, value, id)
Task: Find name from orders where level appears in projects entries with matching type.
SQL: | SELECT name FROM orders AS kab
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "projects",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09215 | train |
v2 | Schema:
categories (alias: egiv)(amount, status, id, level)
schedules(amount, type, level, name)
Task: Find name from categories where a matching record exists in schedules with the same code.
SQL: | SELECT name FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09216 | train |
v1 | Schema:
projects (alias: uliv)(amount, name, type, code)
tasks(code, name, amount, type)
Task: Find id from projects where level appears in tasks entries with matching status.
SQL: | SELECT id FROM projects AS uliv
WHERE level IN (
SELECT level FROM tasks AS znob
WHERE znob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09217 | train |
v1 | Schema:
categories (alias: egiv)(level, date, salary, code)
transactions(value, amount, date, code)
Task: Select code from categories where type exists in transactions for the same id.
SQL: | SELECT code FROM categories AS egiv
WHERE type IN (
SELECT type FROM transactions AS gev
WHERE gev.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "transactions",
"outer_alias": "egiv",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09218 | train |
v1 | Schema:
items (alias: ikob)(id, salary, type, amount)
schedules(amount, status, salary, date)
Task: Find amount from items where code appears in schedules entries with matching type.
SQL: | SELECT amount FROM items AS ikob
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09219 | train |
v3 | Schema:
schedules (alias: vmob)(salary, value, level, id)
categories(code, date, name, type)
Task: Find salary from schedules where amount exceeds the maximum salary from categories for the same type.
SQL: | SELECT salary FROM schedules AS vmob
WHERE amount > (
SELECT MAX(salary) FROM categories AS egiv
WHERE egiv.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09220 | train |
v1 | Schema:
accounts (alias: jac)(date, level, status, code)
employees(id, date, name, amount)
Task: Select id from accounts where id exists in employees for the same id.
SQL: | SELECT id FROM accounts AS jac
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09221 | train |
v1 | Schema:
shipments (alias: vnob)(date, amount, value, level)
departments(salary, status, type, code)
Task: Select name from shipments where type exists in departments for the same id.
SQL: | SELECT name FROM shipments AS vnob
WHERE type IN (
SELECT type FROM departments AS dov
WHERE dov.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "departments",
"outer_alias": "vnob",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09222 | train |
v3 | Schema:
orders (alias: kab)(date, salary, id, name)
tasks(level, status, id, name)
Task: Find id from orders where value exceeds the count of value from tasks for the same status.
SQL: | SELECT id FROM orders AS kab
WHERE value > (
SELECT COUNT(value) FROM tasks AS znob
WHERE znob.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "tasks",
"outer_alias": "kab",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09223 | train |
v3 | Schema:
customers (alias: lex)(type, amount, name, salary)
staff(date, name, amount, code)
Task: Find name from customers where value exceeds the total salary from staff for the same status.
SQL: | SELECT name FROM customers AS lex
WHERE value > (
SELECT SUM(salary) FROM staff AS xnob
WHERE xnob.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09224 | train |
v1 | Schema:
departments (alias: dov)(amount, value, date, id)
branches(name, status, id, salary)
Task: Select id from departments where type exists in branches for the same type.
SQL: | SELECT id FROM departments AS dov
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09225 | train |
v2 | Schema:
items (alias: ikob)(level, type, value, salary)
departments(amount, value, id, date)
Task: Find code from items where a matching record exists in departments with the same type.
SQL: | SELECT code FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "departments",
"outer_alias": "ikob",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09226 | train |
v3 | Schema:
accounts (alias: jac)(value, date, code, name)
schedules(value, code, date, salary)
Task: Retrieve code from accounts with salary above the COUNT(value) of schedules rows sharing the same level.
SQL: | SELECT code FROM accounts AS jac
WHERE salary > (
SELECT COUNT(value) FROM schedules AS vmob
WHERE vmob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09227 | train |
v2 | Schema:
orders (alias: kab)(level, status, code, amount)
products(code, status, name, date)
Task: Retrieve code from orders that have at least one corresponding entry in products sharing the same status.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09228 | train |
v2 | Schema:
managers (alias: hac)(value, id, type, name)
customers(salary, amount, status, code)
Task: Retrieve value from managers that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09229 | train |
v3 | Schema:
items (alias: ikob)(value, amount, date, level)
schedules(status, type, id, amount)
Task: Find code from items where amount exceeds the maximum value from schedules for the same code.
SQL: | SELECT code FROM items AS ikob
WHERE amount > (
SELECT MAX(value) FROM schedules AS vmob
WHERE vmob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09230 | train |
v3 | Schema:
requests (alias: ejof)(date, code, id, status)
products(name, type, status, id)
Task: Find id from requests where value exceeds the total salary from products for the same type.
SQL: | SELECT id FROM requests AS ejof
WHERE value > (
SELECT SUM(salary) FROM products AS nad
WHERE nad.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ejof",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09231 | train |
v1 | Schema:
employees (alias: bev)(date, type, value, status)
projects(code, salary, date, value)
Task: Find amount from employees where code appears in projects entries with matching type.
SQL: | SELECT amount FROM employees AS bev
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09232 | train |
v3 | Schema:
orders (alias: kab)(id, status, value, type)
invoices(level, salary, type, code)
Task: Retrieve name from orders with salary above the MAX(value) of invoices rows sharing the same type.
SQL: | SELECT name FROM orders AS kab
WHERE salary > (
SELECT MAX(value) FROM invoices AS fal
WHERE fal.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09233 | train |
v2 | Schema:
products (alias: nad)(name, level, type, code)
staff(status, date, salary, code)
Task: Retrieve name from products that have at least one corresponding entry in staff sharing the same type.
SQL: | SELECT name FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = nad.type
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09234 | train |
v1 | Schema:
transactions (alias: gev)(date, code, id, name)
staff(level, value, status, code)
Task: Find amount from transactions where id appears in staff entries with matching status.
SQL: | SELECT amount FROM transactions AS gev
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09235 | train |
v1 | Schema:
products (alias: nad)(status, name, type, level)
staff(id, amount, date, code)
Task: Find id from products where type appears in staff entries with matching id.
SQL: | SELECT id FROM products AS nad
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.id = nad.id
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09236 | train |
v2 | Schema:
schedules (alias: vmob)(id, date, type, code)
employees(id, name, type, value)
Task: Find amount from schedules where a matching record exists in employees with the same type.
SQL: | SELECT amount FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "employees",
"outer_alias": "vmob",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09237 | train |
v1 | Schema:
invoices (alias: fal)(code, name, level, status)
orders(type, date, code, status)
Task: Select amount from invoices where status exists in orders for the same level.
SQL: | SELECT amount FROM invoices AS fal
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09238 | train |
v3 | Schema:
transactions (alias: gev)(date, id, amount, status)
departments(name, code, date, level)
Task: Find salary from transactions where value exceeds the maximum amount from departments for the same type.
SQL: | SELECT salary FROM transactions AS gev
WHERE value > (
SELECT MAX(amount) FROM departments AS dov
WHERE dov.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09239 | train |
v2 | Schema:
shipments (alias: vnob)(name, value, salary, code)
customers(code, type, date, amount)
Task: Retrieve id from shipments that have at least one corresponding entry in customers sharing the same type.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09240 | train |
v1 | Schema:
schedules (alias: vmob)(salary, amount, level, date)
accounts(value, date, salary, level)
Task: Retrieve value from schedules whose status is found in accounts rows where id matches the outer record.
SQL: | SELECT value FROM schedules AS vmob
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09241 | train |
v2 | Schema:
transactions (alias: gev)(amount, level, id, value)
orders(date, name, status, amount)
Task: Retrieve code from transactions that have at least one corresponding entry in orders sharing the same status.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09242 | train |
v2 | Schema:
regions (alias: okiv)(name, type, value, id)
customers(level, code, type, name)
Task: Retrieve value from regions that have at least one corresponding entry in customers sharing the same level.
SQL: | SELECT value FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09243 | train |
v1 | Schema:
sales (alias: cif)(code, status, level, id)
transactions(status, amount, code, level)
Task: Find value from sales where level appears in transactions entries with matching type.
SQL: | SELECT value FROM sales AS cif
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09244 | train |
v1 | Schema:
regions (alias: okiv)(code, status, salary, name)
staff(code, status, value, name)
Task: Find name from regions where status appears in staff entries with matching status.
SQL: | SELECT name FROM regions AS okiv
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09245 | train |
v2 | Schema:
requests (alias: ejof)(id, status, salary, code)
shipments(status, code, level, date)
Task: Find amount from requests where a matching record exists in shipments with the same id.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "shipments",
"outer_alias": "ejof",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09246 | train |
v3 | Schema:
departments (alias: dov)(name, type, level, code)
items(status, type, amount, date)
Task: Find id from departments where value exceeds the minimum amount from items for the same status.
SQL: | SELECT id FROM departments AS dov
WHERE value > (
SELECT MIN(amount) FROM items AS ikob
WHERE ikob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09247 | train |
v1 | Schema:
invoices (alias: fal)(status, salary, code, type)
staff(id, salary, level, name)
Task: Select amount from invoices where id exists in staff for the same status.
SQL: | SELECT amount FROM invoices AS fal
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09248 | train |
v1 | Schema:
branches (alias: agov)(code, value, id, amount)
tasks(status, id, date, salary)
Task: Select code from branches where id exists in tasks for the same id.
SQL: | SELECT code FROM branches AS agov
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "tasks",
"outer_alias": "agov",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09249 | train |
v2 | Schema:
projects (alias: uliv)(id, salary, date, level)
regions(type, level, name, value)
Task: Find code from projects where a matching record exists in regions with the same type.
SQL: | SELECT code FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "regions",
"outer_alias": "uliv",
"inner_alias": "okiv",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09250 | train |
v2 | Schema:
customers (alias: lex)(status, level, id, amount)
regions(date, id, status, value)
Task: Find value from customers where a matching record exists in regions with the same type.
SQL: | SELECT value FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "regions",
"outer_alias": "lex",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09251 | train |
v2 | Schema:
customers (alias: lex)(name, amount, value, type)
projects(status, id, level, date)
Task: Retrieve value from customers that have at least one corresponding entry in projects sharing the same code.
SQL: | SELECT value FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09252 | train |
v3 | Schema:
products (alias: nad)(id, code, value, type)
employees(value, code, id, amount)
Task: Find code from products where value exceeds the maximum value from employees for the same level.
SQL: | SELECT code FROM products AS nad
WHERE value > (
SELECT MAX(value) FROM employees AS bev
WHERE bev.level = nad.level
); | {
"outer_table": "products",
"inner_table": "employees",
"outer_alias": "nad",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09253 | train |
v2 | Schema:
schedules (alias: vmob)(amount, value, status, date)
items(status, salary, level, amount)
Task: Retrieve salary from schedules that have at least one corresponding entry in items sharing the same level.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "items",
"outer_alias": "vmob",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09254 | train |
v3 | Schema:
accounts (alias: jac)(level, salary, name, type)
sales(code, type, level, salary)
Task: Find name from accounts where salary exceeds the count of value from sales for the same type.
SQL: | SELECT name FROM accounts AS jac
WHERE salary > (
SELECT COUNT(value) FROM sales AS cif
WHERE cif.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09255 | train |
v3 | Schema:
items (alias: ikob)(id, name, type, code)
projects(amount, value, id, type)
Task: Find name from items where salary exceeds the minimum value from projects for the same status.
SQL: | SELECT name FROM items AS ikob
WHERE salary > (
SELECT MIN(value) FROM projects AS uliv
WHERE uliv.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09256 | train |
v2 | Schema:
schedules (alias: vmob)(type, code, name, salary)
categories(code, date, amount, level)
Task: Find salary from schedules where a matching record exists in categories with the same level.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09257 | train |
v1 | Schema:
items (alias: ikob)(value, code, level, amount)
departments(id, salary, date, amount)
Task: Select id from items where status exists in departments for the same id.
SQL: | SELECT id FROM items AS ikob
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "departments",
"outer_alias": "ikob",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09258 | train |
v2 | Schema:
branches (alias: agov)(value, type, code, amount)
tasks(name, amount, id, date)
Task: Retrieve name from branches that have at least one corresponding entry in tasks sharing the same code.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "tasks",
"outer_alias": "agov",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09259 | train |
v3 | Schema:
transactions (alias: gev)(code, type, status, salary)
sales(level, type, date, status)
Task: Find id from transactions where amount exceeds the minimum amount from sales for the same code.
SQL: | SELECT id FROM transactions AS gev
WHERE amount > (
SELECT MIN(amount) FROM sales AS cif
WHERE cif.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09260 | train |
v2 | Schema:
employees (alias: bev)(id, salary, value, name)
orders(id, value, date, name)
Task: Retrieve salary from employees that have at least one corresponding entry in orders sharing the same code.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09261 | train |
v3 | Schema:
branches (alias: agov)(name, salary, amount, status)
schedules(level, status, code, amount)
Task: Find code from branches where value exceeds the minimum value from schedules for the same id.
SQL: | SELECT code FROM branches AS agov
WHERE value > (
SELECT MIN(value) FROM schedules AS vmob
WHERE vmob.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "schedules",
"outer_alias": "agov",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09262 | train |
v2 | Schema:
customers (alias: lex)(code, type, name, amount)
regions(date, salary, id, name)
Task: Retrieve code from customers that have at least one corresponding entry in regions sharing the same id.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "regions",
"outer_alias": "lex",
"inner_alias": "okiv",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09263 | train |
v3 | Schema:
invoices (alias: fal)(salary, level, amount, value)
shipments(date, value, id, name)
Task: Find id from invoices where value exceeds the count of salary from shipments for the same type.
SQL: | SELECT id FROM invoices AS fal
WHERE value > (
SELECT COUNT(salary) FROM shipments AS vnob
WHERE vnob.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "fal",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09264 | train |
v3 | Schema:
invoices (alias: fal)(id, amount, code, salary)
categories(id, level, amount, value)
Task: Find code from invoices where value exceeds the total salary from categories for the same type.
SQL: | SELECT code FROM invoices AS fal
WHERE value > (
SELECT SUM(salary) FROM categories AS egiv
WHERE egiv.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09265 | train |
v1 | Schema:
managers (alias: hac)(value, id, name, date)
orders(salary, status, type, level)
Task: Select code from managers where code exists in orders for the same type.
SQL: | SELECT code FROM managers AS hac
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "orders",
"outer_alias": "hac",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09266 | train |
v2 | Schema:
sales (alias: cif)(level, date, type, salary)
projects(date, status, id, level)
Task: Find id from sales where a matching record exists in projects with the same code.
SQL: | SELECT id FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09267 | train |
v1 | Schema:
invoices (alias: fal)(salary, name, date, id)
categories(level, name, type, id)
Task: Find amount from invoices where status appears in categories entries with matching status.
SQL: | SELECT amount FROM invoices AS fal
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09268 | train |
v1 | Schema:
accounts (alias: jac)(type, id, value, status)
employees(status, type, value, name)
Task: Find code from accounts where type appears in employees entries with matching status.
SQL: | SELECT code FROM accounts AS jac
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09269 | train |
v3 | Schema:
transactions (alias: gev)(type, amount, name, status)
staff(date, id, status, amount)
Task: Retrieve value from transactions with amount above the COUNT(value) of staff rows sharing the same code.
SQL: | SELECT value FROM transactions AS gev
WHERE amount > (
SELECT COUNT(value) FROM staff AS xnob
WHERE xnob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09270 | train |
v1 | Schema:
tasks (alias: znob)(amount, value, name, id)
items(id, amount, type, value)
Task: Find name from tasks where code appears in items entries with matching status.
SQL: | SELECT name FROM tasks AS znob
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "items",
"outer_alias": "znob",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09271 | train |
v3 | Schema:
regions (alias: okiv)(salary, type, id, name)
transactions(salary, code, value, status)
Task: Retrieve id from regions with amount above the MIN(value) of transactions rows sharing the same status.
SQL: | SELECT id FROM regions AS okiv
WHERE amount > (
SELECT MIN(value) FROM transactions AS gev
WHERE gev.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "transactions",
"outer_alias": "okiv",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09272 | train |
v1 | Schema:
employees (alias: bev)(type, status, name, salary)
sales(name, code, date, salary)
Task: Select salary from employees where id exists in sales for the same level.
SQL: | SELECT salary FROM employees AS bev
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "sales",
"outer_alias": "bev",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09273 | train |
v2 | Schema:
orders (alias: kab)(level, name, code, type)
categories(status, id, name, level)
Task: Retrieve code from orders that have at least one corresponding entry in categories sharing the same level.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09274 | train |
v2 | Schema:
items (alias: ikob)(id, date, value, type)
customers(type, id, amount, value)
Task: Find salary from items where a matching record exists in customers with the same level.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09275 | train |
v1 | Schema:
accounts (alias: jac)(amount, value, status, type)
customers(status, type, amount, level)
Task: Find value from accounts where type appears in customers entries with matching code.
SQL: | SELECT value FROM accounts AS jac
WHERE type IN (
SELECT type FROM customers AS lex
WHERE lex.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09276 | train |
v3 | Schema:
orders (alias: kab)(level, salary, value, type)
products(name, level, salary, type)
Task: Retrieve id from orders with amount above the MAX(amount) of products rows sharing the same level.
SQL: | SELECT id FROM orders AS kab
WHERE amount > (
SELECT MAX(amount) FROM products AS nad
WHERE nad.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09277 | train |
v1 | Schema:
departments (alias: dov)(status, type, date, id)
transactions(salary, value, name, id)
Task: Find amount from departments where level appears in transactions entries with matching id.
SQL: | SELECT amount FROM departments AS dov
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09278 | train |
v1 | Schema:
requests (alias: ejof)(level, value, amount, date)
branches(name, date, status, type)
Task: Find code from requests where code appears in branches entries with matching status.
SQL: | SELECT code FROM requests AS ejof
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09279 | train |
v2 | Schema:
staff (alias: xnob)(value, amount, date, id)
items(value, level, salary, type)
Task: Find name from staff where a matching record exists in items with the same id.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "items",
"outer_alias": "xnob",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09280 | train |
v2 | Schema:
accounts (alias: jac)(value, code, id, salary)
branches(type, value, code, level)
Task: Find value from accounts where a matching record exists in branches with the same status.
SQL: | SELECT value FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "branches",
"outer_alias": "jac",
"inner_alias": "agov",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09281 | train |
v1 | Schema:
shipments (alias: vnob)(id, amount, status, type)
orders(code, id, amount, name)
Task: Retrieve name from shipments whose status is found in orders rows where status matches the outer record.
SQL: | SELECT name FROM shipments AS vnob
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09282 | train |
v2 | Schema:
accounts (alias: jac)(id, type, salary, date)
staff(name, status, date, id)
Task: Find name from accounts where a matching record exists in staff with the same level.
SQL: | SELECT name FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09283 | train |
v1 | Schema:
accounts (alias: jac)(amount, salary, name, code)
schedules(value, code, date, type)
Task: Select code from accounts where type exists in schedules for the same id.
SQL: | SELECT code FROM accounts AS jac
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09284 | train |
v1 | Schema:
departments (alias: dov)(name, salary, level, date)
branches(salary, type, id, code)
Task: Select amount from departments where type exists in branches for the same level.
SQL: | SELECT amount FROM departments AS dov
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09285 | train |
v2 | Schema:
orders (alias: kab)(code, amount, name, salary)
sales(value, level, code, status)
Task: Retrieve value from orders that have at least one corresponding entry in sales sharing the same code.
SQL: | SELECT value FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "sales",
"outer_alias": "kab",
"inner_alias": "cif",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09286 | train |
v1 | Schema:
schedules (alias: vmob)(salary, level, id, name)
customers(date, status, amount, type)
Task: Retrieve value from schedules whose status is found in customers rows where status matches the outer record.
SQL: | SELECT value FROM schedules AS vmob
WHERE status IN (
SELECT status 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": "status",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09287 | train |
v1 | Schema:
products (alias: nad)(id, date, level, status)
customers(type, salary, code, name)
Task: Retrieve code from products whose code is found in customers rows where id matches the outer record.
SQL: | SELECT code FROM products AS nad
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.id = nad.id
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09288 | train |
v1 | Schema:
sales (alias: cif)(id, status, amount, code)
orders(type, value, date, id)
Task: Find code from sales where type appears in orders entries with matching code.
SQL: | SELECT code FROM sales AS cif
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "orders",
"outer_alias": "cif",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09289 | train |
v2 | Schema:
sales (alias: cif)(status, name, id, amount)
items(level, status, amount, code)
Task: Retrieve code from sales that have at least one corresponding entry in items sharing the same type.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09290 | train |
v1 | Schema:
products (alias: nad)(amount, code, name, salary)
accounts(salary, date, value, code)
Task: Retrieve value from products whose level is found in accounts rows where type matches the outer record.
SQL: | SELECT value FROM products AS nad
WHERE level IN (
SELECT level FROM accounts AS jac
WHERE jac.type = nad.type
); | {
"outer_table": "products",
"inner_table": "accounts",
"outer_alias": "nad",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09291 | train |
v3 | Schema:
accounts (alias: jac)(salary, id, amount, level)
projects(value, status, code, amount)
Task: Find name from accounts where value exceeds the average salary from projects for the same code.
SQL: | SELECT name FROM accounts AS jac
WHERE value > (
SELECT AVG(salary) FROM projects AS uliv
WHERE uliv.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09292 | train |
v2 | Schema:
customers (alias: lex)(level, value, date, id)
accounts(date, salary, amount, type)
Task: Find amount from customers where a matching record exists in accounts with the same code.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09293 | train |
v1 | Schema:
categories (alias: egiv)(status, type, id, code)
employees(name, code, type, date)
Task: Retrieve value from categories whose id is found in employees rows where status matches the outer record.
SQL: | SELECT value FROM categories AS egiv
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "employees",
"outer_alias": "egiv",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09294 | train |
v1 | Schema:
orders (alias: kab)(salary, code, date, type)
employees(salary, code, date, status)
Task: Retrieve name from orders whose code is found in employees rows where level matches the outer record.
SQL: | SELECT name FROM orders AS kab
WHERE code IN (
SELECT code FROM employees AS bev
WHERE bev.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "employees",
"outer_alias": "kab",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09295 | train |
v3 | Schema:
departments (alias: dov)(status, value, amount, salary)
regions(level, amount, salary, date)
Task: Retrieve amount from departments with value above the MAX(salary) of regions rows sharing the same type.
SQL: | SELECT amount FROM departments AS dov
WHERE value > (
SELECT MAX(salary) FROM regions AS okiv
WHERE okiv.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "regions",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09296 | train |
v1 | Schema:
employees (alias: bev)(value, id, date, amount)
products(status, id, name, date)
Task: Retrieve value from employees whose type is found in products rows where code matches the outer record.
SQL: | SELECT value FROM employees AS bev
WHERE type IN (
SELECT type FROM products AS nad
WHERE nad.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09297 | train |
v1 | Schema:
categories (alias: egiv)(salary, status, level, date)
invoices(type, salary, status, id)
Task: Find id from categories where status appears in invoices entries with matching code.
SQL: | SELECT id FROM categories AS egiv
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09298 | train |
v2 | Schema:
staff (alias: xnob)(id, salary, name, date)
transactions(salary, name, date, type)
Task: Find value from staff where a matching record exists in transactions with the same code.
SQL: | SELECT value FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "transactions",
"outer_alias": "xnob",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09299 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.