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:
accounts (alias: jac)(level, status, amount, value)
requests(salary, amount, type, level)
Task: Find id from accounts where value exceeds the minimum amount from requests for the same level.
SQL: | SELECT id FROM accounts AS jac
WHERE value > (
SELECT MIN(amount) FROM requests AS ejof
WHERE ejof.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "requests",
"outer_alias": "jac",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05100 | train |
v3 | Schema:
categories (alias: egiv)(level, name, code, salary)
customers(amount, salary, name, id)
Task: Retrieve name from categories with amount above the MIN(amount) of customers rows sharing the same type.
SQL: | SELECT name FROM categories AS egiv
WHERE amount > (
SELECT MIN(amount) FROM customers AS lex
WHERE lex.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "customers",
"outer_alias": "egiv",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05101 | train |
v3 | Schema:
invoices (alias: fal)(code, level, name, value)
tasks(value, code, id, date)
Task: Retrieve amount from invoices with amount above the SUM(salary) of tasks rows sharing the same level.
SQL: | SELECT amount FROM invoices AS fal
WHERE amount > (
SELECT SUM(salary) FROM tasks AS znob
WHERE znob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "tasks",
"outer_alias": "fal",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05102 | train |
v2 | Schema:
categories (alias: egiv)(level, salary, id, amount)
accounts(amount, id, status, code)
Task: Find value from categories where a matching record exists in accounts with the same code.
SQL: | SELECT value FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05103 | train |
v2 | Schema:
sales (alias: cif)(status, code, name, amount)
items(id, type, name, level)
Task: Find name from sales where a matching record exists in items with the same id.
SQL: | SELECT name FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05104 | train |
v1 | Schema:
employees (alias: bev)(code, type, name, salary)
regions(date, salary, level, code)
Task: Retrieve id from employees whose id is found in regions rows where status matches the outer record.
SQL: | SELECT id FROM employees AS bev
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "regions",
"outer_alias": "bev",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05105 | train |
v3 | Schema:
managers (alias: hac)(amount, status, value, level)
customers(date, name, status, amount)
Task: Retrieve id from managers with value above the SUM(value) of customers rows sharing the same id.
SQL: | SELECT id FROM managers AS hac
WHERE value > (
SELECT SUM(value) FROM customers AS lex
WHERE lex.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05106 | train |
v3 | Schema:
sales (alias: cif)(id, type, value, salary)
items(status, id, salary, date)
Task: Retrieve name from sales with amount above the MIN(amount) of items rows sharing the same code.
SQL: | SELECT name FROM sales AS cif
WHERE amount > (
SELECT MIN(amount) FROM items AS ikob
WHERE ikob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05107 | train |
v2 | Schema:
items (alias: ikob)(salary, value, amount, level)
categories(salary, level, id, status)
Task: Retrieve name from items that have at least one corresponding entry in categories sharing the same code.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "categories",
"outer_alias": "ikob",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05108 | train |
v3 | Schema:
customers (alias: lex)(status, name, id, code)
schedules(id, code, name, level)
Task: Find code from customers where amount exceeds the total salary from schedules for the same code.
SQL: | SELECT code FROM customers AS lex
WHERE amount > (
SELECT SUM(salary) FROM schedules AS vmob
WHERE vmob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05109 | train |
v1 | Schema:
orders (alias: kab)(status, value, type, id)
invoices(level, status, code, value)
Task: Select salary from orders where code exists in invoices for the same level.
SQL: | SELECT salary FROM orders AS kab
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05110 | train |
v3 | Schema:
managers (alias: hac)(id, code, status, type)
branches(value, date, code, type)
Task: Find amount from managers where value exceeds the maximum salary from branches for the same code.
SQL: | SELECT amount FROM managers AS hac
WHERE value > (
SELECT MAX(salary) FROM branches AS agov
WHERE agov.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "branches",
"outer_alias": "hac",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05111 | train |
v3 | Schema:
tasks (alias: znob)(value, amount, date, status)
managers(level, salary, value, date)
Task: Retrieve value from tasks with salary above the COUNT(amount) of managers rows sharing the same level.
SQL: | SELECT value FROM tasks AS znob
WHERE salary > (
SELECT COUNT(amount) FROM managers AS hac
WHERE hac.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "managers",
"outer_alias": "znob",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05112 | train |
v3 | Schema:
managers (alias: hac)(type, level, status, date)
branches(type, status, name, value)
Task: Retrieve id from managers with value above the MAX(value) of branches rows sharing the same type.
SQL: | SELECT id FROM managers AS hac
WHERE value > (
SELECT MAX(value) FROM branches AS agov
WHERE agov.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "branches",
"outer_alias": "hac",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05113 | train |
v1 | Schema:
orders (alias: kab)(code, amount, id, status)
customers(level, value, date, amount)
Task: Select value from orders where type exists in customers for the same code.
SQL: | SELECT value FROM orders AS kab
WHERE type IN (
SELECT type FROM customers AS lex
WHERE lex.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "customers",
"outer_alias": "kab",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05114 | train |
v3 | Schema:
regions (alias: okiv)(name, amount, date, type)
products(type, status, salary, date)
Task: Retrieve amount from regions with amount above the AVG(value) of products rows sharing the same code.
SQL: | SELECT amount FROM regions AS okiv
WHERE amount > (
SELECT AVG(value) FROM products AS nad
WHERE nad.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05115 | train |
v3 | Schema:
projects (alias: uliv)(date, id, type, status)
branches(status, date, level, id)
Task: Find id from projects where amount exceeds the maximum value from branches for the same id.
SQL: | SELECT id FROM projects AS uliv
WHERE amount > (
SELECT MAX(value) FROM branches AS agov
WHERE agov.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "branches",
"outer_alias": "uliv",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05116 | train |
v1 | Schema:
orders (alias: kab)(type, value, level, salary)
staff(salary, status, name, value)
Task: Select amount from orders where status exists in staff for the same status.
SQL: | SELECT amount FROM orders AS kab
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05117 | train |
v2 | Schema:
accounts (alias: jac)(date, value, id, type)
regions(type, id, status, level)
Task: Find id from accounts where a matching record exists in regions with the same status.
SQL: | SELECT id FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05118 | train |
v3 | Schema:
invoices (alias: fal)(code, salary, level, amount)
items(code, level, type, name)
Task: Retrieve code from invoices with amount above the COUNT(salary) of items rows sharing the same id.
SQL: | SELECT code FROM invoices AS fal
WHERE amount > (
SELECT COUNT(salary) FROM items AS ikob
WHERE ikob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "fal",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05119 | train |
v2 | Schema:
employees (alias: bev)(type, level, salary, amount)
categories(id, level, value, code)
Task: Retrieve amount from employees that have at least one corresponding entry in categories sharing the same id.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05120 | train |
v1 | Schema:
products (alias: nad)(id, amount, salary, level)
projects(level, amount, id, date)
Task: Retrieve name from products whose code is found in projects rows where level matches the outer record.
SQL: | SELECT name FROM products AS nad
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.level = nad.level
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05121 | train |
v2 | Schema:
managers (alias: hac)(type, salary, level, amount)
regions(type, id, status, salary)
Task: Retrieve id from managers that have at least one corresponding entry in regions sharing the same id.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "hac",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05122 | train |
v3 | Schema:
products (alias: nad)(salary, value, status, date)
transactions(salary, id, status, amount)
Task: Find id from products where amount exceeds the minimum amount from transactions for the same code.
SQL: | SELECT id FROM products AS nad
WHERE amount > (
SELECT MIN(amount) FROM transactions AS gev
WHERE gev.code = nad.code
); | {
"outer_table": "products",
"inner_table": "transactions",
"outer_alias": "nad",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05123 | train |
v2 | Schema:
departments (alias: dov)(date, id, name, code)
managers(name, level, value, amount)
Task: Find id from departments where a matching record exists in managers with the same code.
SQL: | SELECT id FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05124 | train |
v1 | Schema:
customers (alias: lex)(level, date, status, code)
staff(code, status, date, amount)
Task: Retrieve code from customers whose status is found in staff rows where type matches the outer record.
SQL: | SELECT code FROM customers AS lex
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05125 | train |
v1 | Schema:
accounts (alias: jac)(code, amount, type, status)
invoices(id, code, status, value)
Task: Find id from accounts where type appears in invoices entries with matching level.
SQL: | SELECT id FROM accounts AS jac
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05126 | train |
v1 | Schema:
categories (alias: egiv)(name, id, level, salary)
branches(code, amount, id, level)
Task: Retrieve value from categories whose code is found in branches rows where status matches the outer record.
SQL: | SELECT value FROM categories AS egiv
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05127 | train |
v2 | Schema:
invoices (alias: fal)(salary, id, type, level)
regions(amount, value, level, code)
Task: Find value from invoices where a matching record exists in regions with the same level.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "regions",
"outer_alias": "fal",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05128 | train |
v3 | Schema:
orders (alias: kab)(date, id, status, value)
products(level, date, salary, type)
Task: Find salary from orders where value exceeds the total value from products for the same code.
SQL: | SELECT salary FROM orders AS kab
WHERE value > (
SELECT SUM(value) FROM products AS nad
WHERE nad.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05129 | train |
v3 | Schema:
transactions (alias: gev)(level, amount, salary, code)
sales(salary, amount, status, code)
Task: Retrieve salary from transactions with value above the MAX(salary) of sales rows sharing the same level.
SQL: | SELECT salary FROM transactions AS gev
WHERE value > (
SELECT MAX(salary) FROM sales AS cif
WHERE cif.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05130 | train |
v3 | Schema:
orders (alias: kab)(value, salary, id, amount)
shipments(code, name, level, date)
Task: Find name from orders where value exceeds the total value from shipments for the same level.
SQL: | SELECT name FROM orders AS kab
WHERE value > (
SELECT SUM(value) FROM shipments AS vnob
WHERE vnob.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05131 | train |
v2 | Schema:
regions (alias: okiv)(id, value, name, status)
departments(salary, type, code, value)
Task: Find name from regions where a matching record exists in departments with the same level.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05132 | train |
v2 | Schema:
tasks (alias: znob)(value, name, date, status)
staff(id, date, salary, value)
Task: Find value from tasks where a matching record exists in staff with the same id.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05133 | train |
v3 | Schema:
managers (alias: hac)(id, value, status, date)
staff(salary, date, level, status)
Task: Retrieve name from managers with value above the SUM(value) of staff rows sharing the same status.
SQL: | SELECT name FROM managers AS hac
WHERE value > (
SELECT SUM(value) FROM staff AS xnob
WHERE xnob.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "hac",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05134 | train |
v1 | Schema:
tasks (alias: znob)(type, value, status, code)
projects(id, type, salary, level)
Task: Select value from tasks where code exists in projects for the same type.
SQL: | SELECT value FROM tasks AS znob
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "projects",
"outer_alias": "znob",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05135 | train |
v1 | Schema:
tasks (alias: znob)(name, code, date, value)
accounts(id, name, code, date)
Task: Select code from tasks where id exists in accounts for the same status.
SQL: | SELECT code FROM tasks AS znob
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05136 | train |
v1 | Schema:
employees (alias: bev)(code, value, type, date)
branches(code, date, level, id)
Task: Find salary from employees where code appears in branches entries with matching code.
SQL: | SELECT salary FROM employees AS bev
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05137 | train |
v3 | Schema:
invoices (alias: fal)(date, id, name, amount)
staff(value, date, level, name)
Task: Retrieve code from invoices with amount above the SUM(value) of staff rows sharing the same id.
SQL: | SELECT code FROM invoices AS fal
WHERE amount > (
SELECT SUM(value) FROM staff AS xnob
WHERE xnob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05138 | train |
v3 | Schema:
managers (alias: hac)(type, status, level, name)
shipments(value, id, level, type)
Task: Find id from managers where value exceeds the total salary from shipments for the same type.
SQL: | SELECT id FROM managers AS hac
WHERE value > (
SELECT SUM(salary) FROM shipments AS vnob
WHERE vnob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "hac",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05139 | train |
v2 | Schema:
shipments (alias: vnob)(salary, date, code, name)
employees(salary, value, code, date)
Task: Retrieve amount from shipments that have at least one corresponding entry in employees sharing the same type.
SQL: | SELECT amount FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "employees",
"outer_alias": "vnob",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05140 | train |
v1 | Schema:
customers (alias: lex)(name, type, level, id)
projects(id, type, value, date)
Task: Find id from customers where code appears in projects entries with matching code.
SQL: | SELECT id FROM customers AS lex
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05141 | train |
v3 | Schema:
shipments (alias: vnob)(name, type, date, code)
orders(type, id, value, salary)
Task: Find id from shipments where salary exceeds the count of amount from orders for the same level.
SQL: | SELECT id FROM shipments AS vnob
WHERE salary > (
SELECT COUNT(amount) FROM orders AS kab
WHERE kab.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05142 | train |
v3 | Schema:
transactions (alias: gev)(code, salary, value, level)
shipments(name, status, level, id)
Task: Find amount from transactions where value exceeds the count of amount from shipments for the same code.
SQL: | SELECT amount FROM transactions AS gev
WHERE value > (
SELECT COUNT(amount) FROM shipments AS vnob
WHERE vnob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "shipments",
"outer_alias": "gev",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05143 | train |
v2 | Schema:
shipments (alias: vnob)(date, type, value, level)
accounts(status, level, amount, type)
Task: Retrieve amount from shipments that have at least one corresponding entry in accounts sharing the same type.
SQL: | SELECT amount FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05144 | train |
v3 | Schema:
products (alias: nad)(name, id, value, type)
categories(type, amount, code, date)
Task: Retrieve name from products with salary above the COUNT(value) of categories rows sharing the same type.
SQL: | SELECT name FROM products AS nad
WHERE salary > (
SELECT COUNT(value) FROM categories AS egiv
WHERE egiv.type = nad.type
); | {
"outer_table": "products",
"inner_table": "categories",
"outer_alias": "nad",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05145 | train |
v1 | Schema:
employees (alias: bev)(code, salary, amount, value)
tasks(value, date, id, type)
Task: Retrieve id from employees whose id is found in tasks rows where type matches the outer record.
SQL: | SELECT id FROM employees AS bev
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "tasks",
"outer_alias": "bev",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05146 | train |
v1 | Schema:
managers (alias: hac)(salary, amount, name, code)
staff(value, code, name, id)
Task: Find value from managers where level appears in staff entries with matching level.
SQL: | SELECT value FROM managers AS hac
WHERE level IN (
SELECT level FROM staff AS xnob
WHERE xnob.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "hac",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05147 | train |
v1 | Schema:
departments (alias: dov)(id, name, status, type)
projects(date, level, id, type)
Task: Find id from departments where code appears in projects entries with matching status.
SQL: | SELECT id FROM departments AS dov
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "projects",
"outer_alias": "dov",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05148 | train |
v3 | Schema:
tasks (alias: znob)(amount, name, value, level)
managers(date, status, id, code)
Task: Retrieve salary from tasks with amount above the COUNT(salary) of managers rows sharing the same status.
SQL: | SELECT salary FROM tasks AS znob
WHERE amount > (
SELECT COUNT(salary) FROM managers AS hac
WHERE hac.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "managers",
"outer_alias": "znob",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05149 | train |
v3 | Schema:
items (alias: ikob)(code, amount, status, date)
shipments(type, id, value, status)
Task: Retrieve id from items with value above the COUNT(amount) of shipments rows sharing the same level.
SQL: | SELECT id FROM items AS ikob
WHERE value > (
SELECT COUNT(amount) FROM shipments AS vnob
WHERE vnob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05150 | train |
v2 | Schema:
departments (alias: dov)(level, value, name, code)
employees(value, status, salary, level)
Task: Find value from departments where a matching record exists in employees with the same code.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "employees",
"outer_alias": "dov",
"inner_alias": "bev",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05151 | train |
v1 | Schema:
regions (alias: okiv)(type, code, id, name)
managers(date, level, name, type)
Task: Find salary from regions where type appears in managers entries with matching id.
SQL: | SELECT salary FROM regions AS okiv
WHERE type IN (
SELECT type FROM managers AS hac
WHERE hac.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "managers",
"outer_alias": "okiv",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05152 | train |
v2 | Schema:
tasks (alias: znob)(amount, date, name, level)
categories(salary, id, amount, type)
Task: Find amount from tasks where a matching record exists in categories with the same type.
SQL: | SELECT amount FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05153 | train |
v2 | Schema:
branches (alias: agov)(type, id, code, amount)
transactions(date, amount, name, salary)
Task: Retrieve amount from branches that have at least one corresponding entry in transactions sharing the same type.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05154 | train |
v1 | Schema:
staff (alias: xnob)(amount, date, code, name)
invoices(type, status, value, name)
Task: Retrieve value from staff whose level is found in invoices rows where type matches the outer record.
SQL: | SELECT value FROM staff AS xnob
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "invoices",
"outer_alias": "xnob",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05155 | train |
v3 | Schema:
departments (alias: dov)(salary, type, amount, value)
schedules(level, salary, date, status)
Task: Find code from departments where value exceeds the maximum salary from schedules for the same status.
SQL: | SELECT code FROM departments AS dov
WHERE value > (
SELECT MAX(salary) FROM schedules AS vmob
WHERE vmob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "schedules",
"outer_alias": "dov",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05156 | train |
v1 | Schema:
tasks (alias: znob)(date, status, id, value)
categories(amount, name, level, salary)
Task: Find code from tasks where code appears in categories entries with matching id.
SQL: | SELECT code FROM tasks AS znob
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05157 | train |
v1 | Schema:
regions (alias: okiv)(type, status, id, value)
sales(level, value, date, amount)
Task: Select code from regions where type exists in sales for the same code.
SQL: | SELECT code FROM regions AS okiv
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05158 | train |
v3 | Schema:
branches (alias: agov)(level, status, code, value)
departments(id, level, value, type)
Task: Retrieve value from branches with value above the AVG(value) of departments rows sharing the same status.
SQL: | SELECT value FROM branches AS agov
WHERE value > (
SELECT AVG(value) FROM departments AS dov
WHERE dov.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "departments",
"outer_alias": "agov",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05159 | train |
v3 | Schema:
employees (alias: bev)(date, level, id, type)
invoices(value, salary, code, level)
Task: Find value from employees where value exceeds the maximum salary from invoices for the same status.
SQL: | SELECT value FROM employees AS bev
WHERE value > (
SELECT MAX(salary) FROM invoices AS fal
WHERE fal.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "invoices",
"outer_alias": "bev",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05160 | train |
v2 | Schema:
projects (alias: uliv)(name, id, status, amount)
products(id, salary, name, status)
Task: Retrieve name from projects that have at least one corresponding entry in products sharing the same id.
SQL: | SELECT name FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "products",
"outer_alias": "uliv",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05161 | train |
v2 | Schema:
regions (alias: okiv)(amount, level, id, salary)
accounts(id, code, value, level)
Task: Retrieve code from regions that have at least one corresponding entry in accounts sharing the same level.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "accounts",
"outer_alias": "okiv",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05162 | train |
v1 | Schema:
employees (alias: bev)(amount, status, salary, code)
shipments(salary, date, status, level)
Task: Find value from employees where status appears in shipments entries with matching level.
SQL: | SELECT value FROM employees AS bev
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05163 | train |
v1 | Schema:
sales (alias: cif)(name, value, amount, level)
products(type, salary, status, date)
Task: Select value from sales where id exists in products for the same id.
SQL: | SELECT value FROM sales AS cif
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05164 | train |
v2 | Schema:
items (alias: ikob)(amount, name, salary, status)
shipments(name, id, date, salary)
Task: Retrieve id from items that have at least one corresponding entry in shipments sharing the same status.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05165 | train |
v1 | Schema:
requests (alias: ejof)(id, level, date, salary)
products(level, value, status, type)
Task: Select name from requests where type exists in products for the same type.
SQL: | SELECT name FROM requests AS ejof
WHERE type IN (
SELECT type FROM products AS nad
WHERE nad.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "products",
"outer_alias": "ejof",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05166 | train |
v1 | Schema:
tasks (alias: znob)(date, amount, status, name)
shipments(id, status, name, amount)
Task: Retrieve value from tasks whose id is found in shipments rows where code matches the outer record.
SQL: | SELECT value FROM tasks AS znob
WHERE id IN (
SELECT id FROM shipments AS vnob
WHERE vnob.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "shipments",
"outer_alias": "znob",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05167 | train |
v2 | Schema:
sales (alias: cif)(level, salary, name, code)
regions(name, type, status, amount)
Task: Find name from sales where a matching record exists in regions with the same level.
SQL: | SELECT name FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05168 | train |
v1 | Schema:
items (alias: ikob)(value, id, date, status)
accounts(value, code, date, status)
Task: Find name from items where type appears in accounts entries with matching id.
SQL: | SELECT name FROM items AS ikob
WHERE type IN (
SELECT type FROM accounts AS jac
WHERE jac.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "accounts",
"outer_alias": "ikob",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05169 | train |
v3 | Schema:
requests (alias: ejof)(name, type, code, date)
shipments(code, amount, name, status)
Task: Find amount from requests where salary exceeds the minimum amount from shipments for the same id.
SQL: | SELECT amount FROM requests AS ejof
WHERE salary > (
SELECT MIN(amount) FROM shipments AS vnob
WHERE vnob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "shipments",
"outer_alias": "ejof",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05170 | train |
v3 | Schema:
requests (alias: ejof)(amount, code, date, type)
categories(type, level, salary, date)
Task: Retrieve id from requests with value above the SUM(amount) of categories rows sharing the same level.
SQL: | SELECT id FROM requests AS ejof
WHERE value > (
SELECT SUM(amount) FROM categories AS egiv
WHERE egiv.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05171 | train |
v3 | Schema:
transactions (alias: gev)(name, date, type, amount)
categories(type, salary, code, date)
Task: Find value from transactions where salary exceeds the total value from categories for the same id.
SQL: | SELECT value FROM transactions AS gev
WHERE salary > (
SELECT SUM(value) FROM categories AS egiv
WHERE egiv.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "value",
"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_05172 | train |
v1 | Schema:
tasks (alias: znob)(salary, status, type, code)
invoices(amount, name, status, date)
Task: Retrieve salary from tasks whose status is found in invoices rows where code matches the outer record.
SQL: | SELECT salary FROM tasks AS znob
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05173 | train |
v3 | Schema:
invoices (alias: fal)(amount, status, type, code)
projects(type, date, amount, level)
Task: Find salary from invoices where value exceeds the count of amount from projects for the same status.
SQL: | SELECT salary FROM invoices AS fal
WHERE value > (
SELECT COUNT(amount) FROM projects AS uliv
WHERE uliv.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "projects",
"outer_alias": "fal",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05174 | train |
v2 | Schema:
tasks (alias: znob)(salary, code, type, value)
accounts(status, date, name, level)
Task: Find amount from tasks where a matching record exists in accounts with the same level.
SQL: | SELECT amount FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05175 | train |
v3 | Schema:
shipments (alias: vnob)(date, code, type, value)
projects(amount, date, status, level)
Task: Retrieve id from shipments with value above the MAX(amount) of projects rows sharing the same id.
SQL: | SELECT id FROM shipments AS vnob
WHERE value > (
SELECT MAX(amount) FROM projects AS uliv
WHERE uliv.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "projects",
"outer_alias": "vnob",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05176 | train |
v1 | Schema:
invoices (alias: fal)(level, name, type, salary)
shipments(level, code, date, value)
Task: Retrieve name from invoices whose id is found in shipments rows where type matches the outer record.
SQL: | SELECT name FROM invoices AS fal
WHERE id IN (
SELECT id FROM shipments AS vnob
WHERE vnob.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "fal",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05177 | train |
v1 | Schema:
shipments (alias: vnob)(status, code, salary, amount)
employees(value, amount, name, status)
Task: Find id from shipments where id appears in employees entries with matching id.
SQL: | SELECT id FROM shipments AS vnob
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "employees",
"outer_alias": "vnob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05178 | train |
v2 | Schema:
projects (alias: uliv)(name, date, salary, id)
tasks(amount, date, level, code)
Task: Retrieve name from projects that have at least one corresponding entry in tasks sharing the same level.
SQL: | SELECT name FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05179 | train |
v3 | Schema:
staff (alias: xnob)(value, id, code, type)
requests(value, level, type, salary)
Task: Retrieve salary from staff with amount above the MAX(amount) of requests rows sharing the same type.
SQL: | SELECT salary FROM staff AS xnob
WHERE amount > (
SELECT MAX(amount) FROM requests AS ejof
WHERE ejof.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05180 | train |
v2 | Schema:
managers (alias: hac)(amount, value, level, status)
regions(status, type, level, value)
Task: Retrieve code from managers that have at least one corresponding entry in regions sharing the same id.
SQL: | SELECT code FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "hac",
"inner_alias": "okiv",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05181 | train |
v1 | Schema:
accounts (alias: jac)(type, code, level, status)
shipments(date, code, status, name)
Task: Retrieve value from accounts whose status is found in shipments rows where type matches the outer record.
SQL: | SELECT value FROM accounts AS jac
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "shipments",
"outer_alias": "jac",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05182 | train |
v1 | Schema:
managers (alias: hac)(amount, date, salary, id)
projects(code, salary, status, level)
Task: Retrieve salary from managers whose code is found in projects rows where id matches the outer record.
SQL: | SELECT salary FROM managers AS hac
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "projects",
"outer_alias": "hac",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05183 | train |
v2 | Schema:
products (alias: nad)(name, salary, id, type)
branches(salary, name, code, type)
Task: Retrieve code from products that have at least one corresponding entry in branches sharing the same status.
SQL: | SELECT code FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = nad.status
); | {
"outer_table": "products",
"inner_table": "branches",
"outer_alias": "nad",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05184 | train |
v1 | Schema:
employees (alias: bev)(type, id, date, code)
categories(id, code, type, amount)
Task: Find name from employees where status appears in categories entries with matching id.
SQL: | SELECT name FROM employees AS bev
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05185 | train |
v3 | Schema:
sales (alias: cif)(amount, status, date, id)
requests(type, amount, value, salary)
Task: Retrieve id from sales with amount above the COUNT(salary) of requests rows sharing the same type.
SQL: | SELECT id FROM sales AS cif
WHERE amount > (
SELECT COUNT(salary) FROM requests AS ejof
WHERE ejof.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05186 | train |
v2 | Schema:
requests (alias: ejof)(type, salary, id, code)
sales(salary, date, level, value)
Task: Find salary from requests where a matching record exists in sales with the same status.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05187 | train |
v1 | Schema:
categories (alias: egiv)(amount, salary, name, level)
projects(status, level, amount, date)
Task: Retrieve id from categories whose type is found in projects rows where type matches the outer record.
SQL: | SELECT id FROM categories AS egiv
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05188 | train |
v3 | Schema:
departments (alias: dov)(id, amount, status, type)
orders(amount, type, code, value)
Task: Find code from departments where amount exceeds the minimum salary from orders for the same status.
SQL: | SELECT code FROM departments AS dov
WHERE amount > (
SELECT MIN(salary) FROM orders AS kab
WHERE kab.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "orders",
"outer_alias": "dov",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05189 | train |
v3 | Schema:
tasks (alias: znob)(date, name, status, code)
orders(id, type, salary, date)
Task: Find value from tasks where value exceeds the count of salary from orders for the same status.
SQL: | SELECT value FROM tasks AS znob
WHERE value > (
SELECT COUNT(salary) FROM orders AS kab
WHERE kab.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05190 | train |
v2 | Schema:
customers (alias: lex)(type, name, id, level)
transactions(level, id, date, code)
Task: Find name from customers where a matching record exists in transactions with the same code.
SQL: | SELECT name FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "transactions",
"outer_alias": "lex",
"inner_alias": "gev",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05191 | train |
v3 | Schema:
departments (alias: dov)(id, date, status, code)
items(code, value, level, date)
Task: Retrieve amount from departments with salary above the SUM(amount) of items rows sharing the same status.
SQL: | SELECT amount FROM departments AS dov
WHERE salary > (
SELECT SUM(amount) FROM items AS ikob
WHERE ikob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05192 | train |
v1 | Schema:
orders (alias: kab)(date, name, value, level)
accounts(salary, value, name, type)
Task: Select salary from orders where type exists in accounts for the same type.
SQL: | SELECT salary FROM orders AS kab
WHERE type IN (
SELECT type FROM accounts AS jac
WHERE jac.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05193 | train |
v2 | Schema:
products (alias: nad)(date, type, salary, status)
managers(salary, code, date, amount)
Task: Find name from products where a matching record exists in managers with the same code.
SQL: | SELECT name FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = nad.code
); | {
"outer_table": "products",
"inner_table": "managers",
"outer_alias": "nad",
"inner_alias": "hac",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05194 | train |
v2 | Schema:
departments (alias: dov)(value, id, status, name)
managers(code, status, type, name)
Task: Find name from departments where a matching record exists in managers with the same status.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05195 | train |
v2 | Schema:
employees (alias: bev)(name, level, salary, date)
products(date, name, salary, level)
Task: Find value from employees where a matching record exists in products with the same id.
SQL: | SELECT value FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05196 | train |
v2 | Schema:
orders (alias: kab)(id, type, name, level)
staff(id, name, amount, code)
Task: Find id from orders where a matching record exists in staff with the same type.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05197 | train |
v3 | Schema:
regions (alias: okiv)(date, amount, type, status)
projects(status, amount, date, type)
Task: Find amount from regions where value exceeds the count of salary from projects for the same type.
SQL: | SELECT amount FROM regions AS okiv
WHERE value > (
SELECT COUNT(salary) FROM projects AS uliv
WHERE uliv.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05198 | train |
v2 | Schema:
sales (alias: cif)(level, date, name, type)
projects(type, status, name, code)
Task: Find amount from sales where a matching record exists in projects with the same type.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05199 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.