variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v1 | Schema:
items (alias: ikob)(id, level, value, status)
tasks(type, id, amount, value)
Task: Retrieve name from items whose type is found in tasks rows where code matches the outer record.
SQL: | SELECT name FROM items AS ikob
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "tasks",
"outer_alias": "ikob",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05900 | train |
v1 | Schema:
items (alias: ikob)(amount, date, salary, name)
projects(name, id, value, date)
Task: Retrieve id from items whose type is found in projects rows where code matches the outer record.
SQL: | SELECT id FROM items AS ikob
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05901 | train |
v1 | Schema:
managers (alias: hac)(status, level, amount, salary)
branches(salary, id, date, status)
Task: Select amount from managers where level exists in branches for the same type.
SQL: | SELECT amount FROM managers AS hac
WHERE level IN (
SELECT level FROM branches AS agov
WHERE agov.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "branches",
"outer_alias": "hac",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05902 | train |
v3 | Schema:
shipments (alias: vnob)(code, name, date, level)
departments(type, code, status, level)
Task: Retrieve amount from shipments with amount above the COUNT(amount) of departments rows sharing the same id.
SQL: | SELECT amount FROM shipments AS vnob
WHERE amount > (
SELECT COUNT(amount) FROM departments AS dov
WHERE dov.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "departments",
"outer_alias": "vnob",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05903 | train |
v1 | Schema:
customers (alias: lex)(status, code, value, level)
staff(salary, status, amount, code)
Task: Retrieve id from customers whose type is found in staff rows where level matches the outer record.
SQL: | SELECT id FROM customers AS lex
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05904 | train |
v2 | Schema:
branches (alias: agov)(value, id, amount, type)
tasks(amount, code, date, salary)
Task: Retrieve id from branches that have at least one corresponding entry in tasks sharing the same id.
SQL: | SELECT id FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "tasks",
"outer_alias": "agov",
"inner_alias": "znob",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05905 | train |
v3 | Schema:
employees (alias: bev)(name, id, type, level)
projects(date, salary, level, id)
Task: Retrieve salary from employees with salary above the COUNT(amount) of projects rows sharing the same id.
SQL: | SELECT salary FROM employees AS bev
WHERE salary > (
SELECT COUNT(amount) FROM projects AS uliv
WHERE uliv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05906 | train |
v3 | Schema:
schedules (alias: vmob)(amount, date, name, salary)
departments(amount, salary, id, status)
Task: Find amount from schedules where value exceeds the total salary from departments for the same status.
SQL: | SELECT amount FROM schedules AS vmob
WHERE value > (
SELECT SUM(salary) FROM departments AS dov
WHERE dov.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "vmob",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05907 | train |
v3 | Schema:
projects (alias: uliv)(salary, status, date, value)
customers(code, amount, type, salary)
Task: Find name from projects where amount exceeds the maximum value from customers for the same level.
SQL: | SELECT name FROM projects AS uliv
WHERE amount > (
SELECT MAX(value) FROM customers AS lex
WHERE lex.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "customers",
"outer_alias": "uliv",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05908 | train |
v2 | Schema:
tasks (alias: znob)(code, amount, level, salary)
regions(code, name, id, value)
Task: Find name from tasks where a matching record exists in regions with the same type.
SQL: | SELECT name FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "regions",
"outer_alias": "znob",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05909 | train |
v1 | Schema:
requests (alias: ejof)(date, level, value, id)
invoices(id, salary, amount, code)
Task: Find amount from requests where status appears in invoices entries with matching status.
SQL: | SELECT amount FROM requests AS ejof
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05910 | train |
v3 | Schema:
products (alias: nad)(date, code, id, name)
customers(date, status, value, salary)
Task: Find value from products where value exceeds the total value from customers for the same level.
SQL: | SELECT value FROM products AS nad
WHERE value > (
SELECT SUM(value) FROM customers AS lex
WHERE lex.level = nad.level
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05911 | train |
v2 | Schema:
requests (alias: ejof)(amount, name, type, salary)
accounts(amount, salary, value, code)
Task: Find code from requests where a matching record exists in accounts with the same status.
SQL: | SELECT code FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05912 | train |
v3 | Schema:
regions (alias: okiv)(level, date, code, type)
items(status, type, id, date)
Task: Find id from regions where amount exceeds the total salary from items for the same status.
SQL: | SELECT id FROM regions AS okiv
WHERE amount > (
SELECT SUM(salary) FROM items AS ikob
WHERE ikob.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "items",
"outer_alias": "okiv",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05913 | train |
v3 | Schema:
sales (alias: cif)(level, status, date, code)
projects(type, amount, name, salary)
Task: Retrieve salary from sales with amount above the MIN(value) of projects rows sharing the same type.
SQL: | SELECT salary FROM sales AS cif
WHERE amount > (
SELECT MIN(value) FROM projects AS uliv
WHERE uliv.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05914 | train |
v2 | Schema:
accounts (alias: jac)(status, id, code, amount)
schedules(name, status, value, salary)
Task: Find name from accounts where a matching record exists in schedules with the same status.
SQL: | SELECT name FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05915 | train |
v3 | Schema:
schedules (alias: vmob)(level, type, code, status)
accounts(id, salary, type, code)
Task: Retrieve name from schedules with salary above the SUM(value) of accounts rows sharing the same level.
SQL: | SELECT name FROM schedules AS vmob
WHERE salary > (
SELECT SUM(value) FROM accounts AS jac
WHERE jac.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05916 | train |
v1 | Schema:
projects (alias: uliv)(id, level, date, status)
customers(value, type, level, name)
Task: Select id from projects where status exists in customers for the same id.
SQL: | SELECT id FROM projects AS uliv
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "customers",
"outer_alias": "uliv",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05917 | train |
v1 | Schema:
departments (alias: dov)(salary, type, value, name)
requests(amount, name, salary, level)
Task: Retrieve id from departments whose id is found in requests rows where type matches the outer record.
SQL: | SELECT id FROM departments AS dov
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "requests",
"outer_alias": "dov",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05918 | train |
v3 | Schema:
managers (alias: hac)(level, date, amount, status)
orders(value, code, level, type)
Task: Find salary from managers where amount exceeds the total salary from orders for the same id.
SQL: | SELECT salary FROM managers AS hac
WHERE amount > (
SELECT SUM(salary) FROM orders AS kab
WHERE kab.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "orders",
"outer_alias": "hac",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05919 | train |
v3 | Schema:
sales (alias: cif)(id, code, type, name)
categories(amount, name, value, status)
Task: Find value from sales where value exceeds the maximum amount from categories for the same code.
SQL: | SELECT value FROM sales AS cif
WHERE value > (
SELECT MAX(amount) FROM categories AS egiv
WHERE egiv.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05920 | train |
v2 | Schema:
schedules (alias: vmob)(code, value, type, id)
tasks(id, amount, type, salary)
Task: Retrieve name from schedules that have at least one corresponding entry in tasks sharing the same type.
SQL: | SELECT name FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "tasks",
"outer_alias": "vmob",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05921 | train |
v3 | Schema:
orders (alias: kab)(value, status, type, name)
employees(code, value, name, date)
Task: Retrieve id from orders with amount above the AVG(value) of employees rows sharing the same id.
SQL: | SELECT id FROM orders AS kab
WHERE amount > (
SELECT AVG(value) FROM employees AS bev
WHERE bev.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "employees",
"outer_alias": "kab",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05922 | train |
v2 | Schema:
invoices (alias: fal)(salary, amount, type, value)
branches(name, level, status, salary)
Task: Retrieve id from invoices that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "branches",
"outer_alias": "fal",
"inner_alias": "agov",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05923 | train |
v1 | Schema:
items (alias: ikob)(status, level, type, amount)
regions(type, level, name, status)
Task: Select amount from items where type exists in regions for the same status.
SQL: | SELECT amount FROM items AS ikob
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "regions",
"outer_alias": "ikob",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05924 | train |
v3 | Schema:
products (alias: nad)(code, id, date, type)
transactions(status, id, level, name)
Task: Find value from products where value exceeds the count of value from transactions for the same type.
SQL: | SELECT value FROM products AS nad
WHERE value > (
SELECT COUNT(value) FROM transactions AS gev
WHERE gev.type = nad.type
); | {
"outer_table": "products",
"inner_table": "transactions",
"outer_alias": "nad",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05925 | train |
v3 | Schema:
projects (alias: uliv)(id, code, amount, level)
employees(code, level, type, name)
Task: Retrieve code from projects with value above the COUNT(salary) of employees rows sharing the same type.
SQL: | SELECT code FROM projects AS uliv
WHERE value > (
SELECT COUNT(salary) FROM employees AS bev
WHERE bev.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "employees",
"outer_alias": "uliv",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05926 | train |
v2 | Schema:
branches (alias: agov)(id, code, type, status)
sales(status, salary, date, value)
Task: Retrieve amount from branches that have at least one corresponding entry in sales sharing the same id.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "sales",
"outer_alias": "agov",
"inner_alias": "cif",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05927 | train |
v3 | Schema:
sales (alias: cif)(amount, code, status, level)
projects(name, salary, code, level)
Task: Retrieve id from sales with amount above the MIN(amount) of projects rows sharing the same level.
SQL: | SELECT id FROM sales AS cif
WHERE amount > (
SELECT MIN(amount) FROM projects AS uliv
WHERE uliv.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05928 | train |
v2 | Schema:
departments (alias: dov)(code, date, salary, amount)
tasks(level, code, id, date)
Task: Retrieve id from departments that have at least one corresponding entry in tasks sharing the same status.
SQL: | SELECT id FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "tasks",
"outer_alias": "dov",
"inner_alias": "znob",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05929 | train |
v1 | Schema:
orders (alias: kab)(type, status, salary, amount)
customers(level, id, type, value)
Task: Select value from orders where status exists in customers for the same id.
SQL: | SELECT value FROM orders AS kab
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "customers",
"outer_alias": "kab",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05930 | train |
v3 | Schema:
customers (alias: lex)(name, type, level, id)
invoices(status, id, salary, amount)
Task: Retrieve id from customers with amount above the COUNT(salary) of invoices rows sharing the same code.
SQL: | SELECT id FROM customers AS lex
WHERE amount > (
SELECT COUNT(salary) FROM invoices AS fal
WHERE fal.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "lex",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05931 | train |
v2 | Schema:
employees (alias: bev)(salary, status, id, date)
departments(status, value, type, date)
Task: Retrieve code from employees that have at least one corresponding entry in departments sharing the same level.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05932 | train |
v3 | Schema:
items (alias: ikob)(value, salary, id, amount)
departments(salary, value, date, level)
Task: Find code from items where salary exceeds the minimum value from departments for the same type.
SQL: | SELECT code FROM items AS ikob
WHERE salary > (
SELECT MIN(value) FROM departments AS dov
WHERE dov.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "departments",
"outer_alias": "ikob",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05933 | train |
v1 | Schema:
departments (alias: dov)(level, status, name, id)
managers(name, amount, status, value)
Task: Find value from departments where id appears in managers entries with matching code.
SQL: | SELECT value FROM departments AS dov
WHERE id IN (
SELECT id FROM managers AS hac
WHERE hac.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05934 | train |
v1 | Schema:
customers (alias: lex)(name, salary, status, id)
branches(salary, name, level, status)
Task: Retrieve id from customers whose status is found in branches rows where id matches the outer record.
SQL: | SELECT id FROM customers AS lex
WHERE status IN (
SELECT status FROM branches AS agov
WHERE agov.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05935 | train |
v1 | Schema:
employees (alias: bev)(level, status, id, code)
shipments(amount, code, name, date)
Task: Retrieve name from employees whose status is found in shipments rows where code matches the outer record.
SQL: | SELECT name FROM employees AS bev
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05936 | train |
v1 | Schema:
customers (alias: lex)(status, type, id, date)
departments(name, status, amount, type)
Task: Retrieve amount from customers whose level is found in departments rows where id matches the outer record.
SQL: | SELECT amount FROM customers AS lex
WHERE level IN (
SELECT level FROM departments AS dov
WHERE dov.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "departments",
"outer_alias": "lex",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05937 | train |
v3 | Schema:
employees (alias: bev)(code, status, name, salary)
invoices(type, status, value, level)
Task: Find salary from employees where salary exceeds the maximum amount from invoices for the same level.
SQL: | SELECT salary FROM employees AS bev
WHERE salary > (
SELECT MAX(amount) FROM invoices AS fal
WHERE fal.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "invoices",
"outer_alias": "bev",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05938 | train |
v3 | Schema:
sales (alias: cif)(salary, value, code, level)
regions(salary, level, value, id)
Task: Find code from sales where salary exceeds the maximum value from regions for the same level.
SQL: | SELECT code FROM sales AS cif
WHERE salary > (
SELECT MAX(value) FROM regions AS okiv
WHERE okiv.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05939 | train |
v2 | Schema:
branches (alias: agov)(name, type, code, id)
projects(level, salary, code, value)
Task: Find salary from branches where a matching record exists in projects with the same level.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "projects",
"outer_alias": "agov",
"inner_alias": "uliv",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05940 | train |
v1 | Schema:
customers (alias: lex)(name, value, type, id)
tasks(id, status, level, amount)
Task: Retrieve value from customers whose level is found in tasks rows where code matches the outer record.
SQL: | SELECT value FROM customers AS lex
WHERE level IN (
SELECT level FROM tasks AS znob
WHERE znob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "tasks",
"outer_alias": "lex",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05941 | train |
v3 | Schema:
requests (alias: ejof)(date, amount, id, value)
departments(amount, salary, status, value)
Task: Find id from requests where value exceeds the count of value from departments for the same id.
SQL: | SELECT id FROM requests AS ejof
WHERE value > (
SELECT COUNT(value) FROM departments AS dov
WHERE dov.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "departments",
"outer_alias": "ejof",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05942 | train |
v2 | Schema:
categories (alias: egiv)(level, date, id, value)
accounts(name, status, date, salary)
Task: Retrieve salary from categories that have at least one corresponding entry in accounts sharing the same type.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05943 | train |
v3 | Schema:
managers (alias: hac)(level, name, type, status)
customers(value, name, code, status)
Task: Retrieve code from managers with amount above the MAX(value) of customers rows sharing the same level.
SQL: | SELECT code FROM managers AS hac
WHERE amount > (
SELECT MAX(value) FROM customers AS lex
WHERE lex.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05944 | train |
v1 | Schema:
projects (alias: uliv)(name, value, amount, date)
tasks(salary, amount, value, status)
Task: Find value from projects where type appears in tasks entries with matching status.
SQL: | SELECT value FROM projects AS uliv
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05945 | train |
v3 | Schema:
invoices (alias: fal)(id, value, amount, type)
transactions(level, amount, id, code)
Task: Find code from invoices where value exceeds the total amount from transactions for the same level.
SQL: | SELECT code FROM invoices AS fal
WHERE value > (
SELECT SUM(amount) FROM transactions AS gev
WHERE gev.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05946 | train |
v2 | Schema:
regions (alias: okiv)(level, status, amount, name)
branches(level, date, value, amount)
Task: Find salary from regions where a matching record exists in branches with the same id.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "branches",
"outer_alias": "okiv",
"inner_alias": "agov",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05947 | train |
v3 | Schema:
customers (alias: lex)(amount, date, code, level)
categories(date, value, code, status)
Task: Find name from customers where amount exceeds the minimum amount from categories for the same status.
SQL: | SELECT name FROM customers AS lex
WHERE amount > (
SELECT MIN(amount) FROM categories AS egiv
WHERE egiv.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "categories",
"outer_alias": "lex",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05948 | train |
v3 | Schema:
shipments (alias: vnob)(type, salary, name, id)
customers(value, amount, type, code)
Task: Find amount from shipments where salary exceeds the maximum amount from customers for the same type.
SQL: | SELECT amount FROM shipments AS vnob
WHERE salary > (
SELECT MAX(amount) FROM customers AS lex
WHERE lex.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05949 | train |
v2 | Schema:
transactions (alias: gev)(date, status, amount, level)
departments(type, id, level, status)
Task: Retrieve code from transactions that have at least one corresponding entry in departments sharing the same type.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05950 | train |
v1 | Schema:
categories (alias: egiv)(type, amount, value, id)
transactions(value, salary, type, id)
Task: Retrieve salary from categories whose id is found in transactions rows where code matches the outer record.
SQL: | SELECT salary FROM categories AS egiv
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "transactions",
"outer_alias": "egiv",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05951 | train |
v1 | Schema:
managers (alias: hac)(name, type, id, code)
employees(amount, id, value, code)
Task: Find name from managers where code appears in employees entries with matching code.
SQL: | SELECT name FROM managers AS hac
WHERE code IN (
SELECT code FROM employees AS bev
WHERE bev.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05952 | train |
v2 | Schema:
orders (alias: kab)(name, code, amount, level)
requests(date, name, salary, status)
Task: Find value from orders where a matching record exists in requests with the same type.
SQL: | SELECT value FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "requests",
"outer_alias": "kab",
"inner_alias": "ejof",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05953 | train |
v2 | Schema:
shipments (alias: vnob)(amount, salary, value, status)
departments(code, name, level, amount)
Task: Retrieve id from shipments that have at least one corresponding entry in departments sharing the same type.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "departments",
"outer_alias": "vnob",
"inner_alias": "dov",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05954 | train |
v2 | Schema:
schedules (alias: vmob)(value, salary, name, type)
managers(date, type, id, name)
Task: Find id from schedules where a matching record exists in managers with the same type.
SQL: | SELECT id FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05955 | train |
v2 | Schema:
shipments (alias: vnob)(id, status, code, type)
transactions(type, id, date, name)
Task: Find salary from shipments where a matching record exists in transactions with the same type.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05956 | train |
v2 | Schema:
sales (alias: cif)(type, date, name, salary)
transactions(name, id, status, amount)
Task: Find value from sales where a matching record exists in transactions with the same code.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05957 | train |
v2 | Schema:
invoices (alias: fal)(level, name, code, value)
departments(type, code, date, id)
Task: Find id from invoices where a matching record exists in departments with the same type.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "departments",
"outer_alias": "fal",
"inner_alias": "dov",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05958 | train |
v1 | Schema:
invoices (alias: fal)(amount, name, value, salary)
categories(salary, date, value, status)
Task: Find name from invoices where code appears in categories entries with matching level.
SQL: | SELECT name FROM invoices AS fal
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05959 | train |
v3 | Schema:
customers (alias: lex)(date, level, salary, id)
categories(salary, amount, status, value)
Task: Retrieve amount from customers with value above the MIN(salary) of categories rows sharing the same level.
SQL: | SELECT amount FROM customers AS lex
WHERE value > (
SELECT MIN(salary) FROM categories AS egiv
WHERE egiv.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "categories",
"outer_alias": "lex",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05960 | train |
v2 | Schema:
employees (alias: bev)(level, salary, amount, name)
departments(status, id, value, level)
Task: Retrieve amount from employees that have at least one corresponding entry in departments sharing the same code.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05961 | train |
v3 | Schema:
requests (alias: ejof)(status, value, type, name)
employees(name, code, date, type)
Task: Find value from requests where value exceeds the total salary from employees for the same code.
SQL: | SELECT value FROM requests AS ejof
WHERE value > (
SELECT SUM(salary) FROM employees AS bev
WHERE bev.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05962 | train |
v2 | Schema:
schedules (alias: vmob)(salary, amount, date, value)
shipments(name, type, date, id)
Task: Find salary from schedules where a matching record exists in shipments with the same id.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05963 | train |
v3 | Schema:
items (alias: ikob)(type, level, id, value)
transactions(date, name, code, level)
Task: Retrieve amount from items with amount above the SUM(salary) of transactions rows sharing the same type.
SQL: | SELECT amount FROM items AS ikob
WHERE amount > (
SELECT SUM(salary) FROM transactions AS gev
WHERE gev.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "transactions",
"outer_alias": "ikob",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05964 | train |
v1 | Schema:
regions (alias: okiv)(id, salary, code, level)
categories(status, id, date, type)
Task: Find id from regions where status appears in categories entries with matching level.
SQL: | SELECT id FROM regions AS okiv
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05965 | train |
v2 | Schema:
employees (alias: bev)(date, name, level, status)
customers(date, name, amount, value)
Task: Retrieve amount from employees that have at least one corresponding entry in customers sharing the same level.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05966 | train |
v1 | Schema:
requests (alias: ejof)(value, code, name, date)
items(code, name, status, value)
Task: Find salary from requests where type appears in items entries with matching id.
SQL: | SELECT salary FROM requests AS ejof
WHERE type IN (
SELECT type FROM items AS ikob
WHERE ikob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ejof",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05967 | train |
v2 | Schema:
transactions (alias: gev)(code, value, level, status)
accounts(amount, name, value, code)
Task: Retrieve code from transactions that have at least one corresponding entry in accounts sharing the same id.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "accounts",
"outer_alias": "gev",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05968 | train |
v3 | Schema:
categories (alias: egiv)(name, id, date, code)
customers(id, salary, name, date)
Task: Find amount from categories where salary exceeds the average value from customers for the same status.
SQL: | SELECT amount FROM categories AS egiv
WHERE salary > (
SELECT AVG(value) FROM customers AS lex
WHERE lex.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "customers",
"outer_alias": "egiv",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05969 | train |
v3 | Schema:
accounts (alias: jac)(salary, type, date, status)
invoices(code, amount, salary, type)
Task: Retrieve id from accounts with value above the AVG(salary) of invoices rows sharing the same id.
SQL: | SELECT id FROM accounts AS jac
WHERE value > (
SELECT AVG(salary) FROM invoices AS fal
WHERE fal.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05970 | train |
v1 | Schema:
items (alias: ikob)(level, value, id, date)
customers(type, level, id, salary)
Task: Find name from items where code appears in customers entries with matching level.
SQL: | SELECT name FROM items AS ikob
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05971 | train |
v1 | Schema:
sales (alias: cif)(level, salary, status, code)
managers(status, id, name, level)
Task: Find id from sales where status appears in managers entries with matching type.
SQL: | SELECT id FROM sales AS cif
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05972 | train |
v2 | Schema:
branches (alias: agov)(type, id, code, value)
employees(code, value, amount, date)
Task: Find amount from branches where a matching record exists in employees with the same type.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "employees",
"outer_alias": "agov",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05973 | train |
v3 | Schema:
projects (alias: uliv)(name, status, amount, type)
departments(amount, value, name, salary)
Task: Find value from projects where salary exceeds the average salary from departments for the same status.
SQL: | SELECT value FROM projects AS uliv
WHERE salary > (
SELECT AVG(salary) FROM departments AS dov
WHERE dov.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05974 | train |
v3 | Schema:
tasks (alias: znob)(id, type, level, salary)
accounts(code, type, name, id)
Task: Find id from tasks where amount exceeds the maximum salary from accounts for the same level.
SQL: | SELECT id FROM tasks AS znob
WHERE amount > (
SELECT MAX(salary) FROM accounts AS jac
WHERE jac.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05975 | train |
v2 | Schema:
items (alias: ikob)(code, name, status, id)
staff(level, status, type, code)
Task: Find code from items where a matching record exists in staff with the same type.
SQL: | SELECT code FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "xnob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05976 | train |
v2 | Schema:
staff (alias: xnob)(id, status, type, value)
branches(date, salary, type, id)
Task: Find id from staff where a matching record exists in branches with the same status.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "branches",
"outer_alias": "xnob",
"inner_alias": "agov",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05977 | train |
v3 | Schema:
accounts (alias: jac)(level, value, name, amount)
managers(salary, amount, status, name)
Task: Find id from accounts where value exceeds the total salary from managers for the same id.
SQL: | SELECT id FROM accounts AS jac
WHERE value > (
SELECT SUM(salary) FROM managers AS hac
WHERE hac.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "managers",
"outer_alias": "jac",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05978 | train |
v3 | Schema:
products (alias: nad)(level, salary, id, type)
accounts(id, salary, code, type)
Task: Retrieve id from products with salary above the AVG(salary) of accounts rows sharing the same status.
SQL: | SELECT id FROM products AS nad
WHERE salary > (
SELECT AVG(salary) FROM accounts AS jac
WHERE jac.status = nad.status
); | {
"outer_table": "products",
"inner_table": "accounts",
"outer_alias": "nad",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05979 | train |
v3 | Schema:
branches (alias: agov)(date, status, amount, name)
managers(amount, id, status, date)
Task: Retrieve amount from branches with value above the MIN(salary) of managers rows sharing the same code.
SQL: | SELECT amount FROM branches AS agov
WHERE value > (
SELECT MIN(salary) FROM managers AS hac
WHERE hac.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05980 | train |
v3 | Schema:
invoices (alias: fal)(status, type, salary, level)
sales(level, type, status, code)
Task: Retrieve name from invoices with value above the COUNT(salary) of sales rows sharing the same status.
SQL: | SELECT name FROM invoices AS fal
WHERE value > (
SELECT COUNT(salary) FROM sales AS cif
WHERE cif.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "sales",
"outer_alias": "fal",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05981 | train |
v2 | Schema:
transactions (alias: gev)(date, salary, id, name)
categories(name, code, id, value)
Task: Retrieve code from transactions that have at least one corresponding entry in categories sharing the same id.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05982 | train |
v2 | Schema:
managers (alias: hac)(salary, code, status, name)
sales(id, level, date, code)
Task: Retrieve salary from managers that have at least one corresponding entry in sales sharing the same type.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05983 | train |
v3 | Schema:
accounts (alias: jac)(amount, type, value, status)
projects(name, level, type, code)
Task: Retrieve amount from accounts with amount above the SUM(salary) of projects rows sharing the same level.
SQL: | SELECT amount FROM accounts AS jac
WHERE amount > (
SELECT SUM(salary) FROM projects AS uliv
WHERE uliv.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05984 | train |
v1 | Schema:
employees (alias: bev)(date, name, salary, value)
invoices(salary, type, amount, name)
Task: Find salary from employees where id appears in invoices entries with matching id.
SQL: | SELECT salary FROM employees AS bev
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "invoices",
"outer_alias": "bev",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05985 | train |
v3 | Schema:
categories (alias: egiv)(salary, date, type, name)
employees(value, amount, code, name)
Task: Find id from categories where amount exceeds the average amount from employees for the same id.
SQL: | SELECT id FROM categories AS egiv
WHERE amount > (
SELECT AVG(amount) FROM employees AS bev
WHERE bev.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "employees",
"outer_alias": "egiv",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05986 | train |
v2 | Schema:
sales (alias: cif)(type, salary, date, level)
managers(name, amount, date, level)
Task: Find id from sales where a matching record exists in managers with the same code.
SQL: | SELECT id FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05987 | train |
v3 | Schema:
invoices (alias: fal)(id, code, level, value)
branches(value, name, type, date)
Task: Retrieve code from invoices with amount above the AVG(salary) of branches rows sharing the same id.
SQL: | SELECT code FROM invoices AS fal
WHERE amount > (
SELECT AVG(salary) FROM branches AS agov
WHERE agov.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "branches",
"outer_alias": "fal",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05988 | train |
v1 | Schema:
employees (alias: bev)(name, level, type, id)
invoices(name, id, status, date)
Task: Retrieve code from employees whose level is found in invoices rows where level matches the outer record.
SQL: | SELECT code FROM employees AS bev
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "invoices",
"outer_alias": "bev",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05989 | train |
v1 | Schema:
accounts (alias: jac)(code, value, name, id)
orders(code, type, id, name)
Task: Select id from accounts where type exists in orders for the same level.
SQL: | SELECT id FROM accounts AS jac
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "orders",
"outer_alias": "jac",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05990 | train |
v2 | Schema:
orders (alias: kab)(value, type, status, salary)
products(type, status, code, salary)
Task: Retrieve id from orders that have at least one corresponding entry in products sharing the same status.
SQL: | SELECT id 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": "id",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05991 | train |
v2 | Schema:
accounts (alias: jac)(id, level, type, amount)
projects(salary, status, amount, name)
Task: Retrieve name from accounts that have at least one corresponding entry in projects sharing the same type.
SQL: | SELECT name FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05992 | train |
v3 | Schema:
invoices (alias: fal)(code, name, amount, level)
departments(level, salary, name, id)
Task: Find value from invoices where salary exceeds the count of salary from departments for the same status.
SQL: | SELECT value FROM invoices AS fal
WHERE salary > (
SELECT COUNT(salary) FROM departments AS dov
WHERE dov.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "departments",
"outer_alias": "fal",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05993 | train |
v1 | Schema:
sales (alias: cif)(salary, code, status, id)
products(id, value, amount, salary)
Task: Find code from sales where level appears in products entries with matching code.
SQL: | SELECT code FROM sales AS cif
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05994 | train |
v3 | Schema:
employees (alias: bev)(value, status, code, salary)
products(type, salary, name, code)
Task: Retrieve id from employees with salary above the MAX(salary) of products rows sharing the same code.
SQL: | SELECT id FROM employees AS bev
WHERE salary > (
SELECT MAX(salary) FROM products AS nad
WHERE nad.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05995 | train |
v3 | Schema:
products (alias: nad)(amount, value, status, id)
regions(type, value, status, salary)
Task: Find salary from products where salary exceeds the maximum amount from regions for the same id.
SQL: | SELECT salary FROM products AS nad
WHERE salary > (
SELECT MAX(amount) FROM regions AS okiv
WHERE okiv.id = nad.id
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05996 | train |
v1 | Schema:
categories (alias: egiv)(name, status, level, value)
employees(date, type, salary, name)
Task: Retrieve code from categories whose status is found in employees rows where level matches the outer record.
SQL: | SELECT code FROM categories AS egiv
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "employees",
"outer_alias": "egiv",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05997 | train |
v1 | Schema:
schedules (alias: vmob)(salary, name, status, amount)
orders(type, salary, id, code)
Task: Find name from schedules where level appears in orders entries with matching id.
SQL: | SELECT name FROM schedules AS vmob
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "orders",
"outer_alias": "vmob",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05998 | train |
v1 | Schema:
regions (alias: okiv)(id, level, value, salary)
transactions(salary, code, id, name)
Task: Retrieve salary from regions whose status is found in transactions rows where code matches the outer record.
SQL: | SELECT salary FROM regions AS okiv
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "transactions",
"outer_alias": "okiv",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05999 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.