variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v3 | Schema:
departments (alias: dov)(value, date, salary, id)
regions(code, date, level, amount)
Task: Retrieve code from departments with amount above the MAX(value) of regions rows sharing the same status.
SQL: | SELECT code FROM departments AS dov
WHERE amount > (
SELECT MAX(value) FROM regions AS okiv
WHERE okiv.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "regions",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05800 | train |
v2 | Schema:
schedules (alias: vmob)(id, date, name, type)
managers(code, level, amount, type)
Task: Retrieve value from schedules that have at least one corresponding entry in managers sharing the same type.
SQL: | SELECT value 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": "value",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05801 | train |
v2 | Schema:
projects (alias: uliv)(name, value, code, level)
employees(type, code, level, name)
Task: Find value from projects where a matching record exists in employees with the same id.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "employees",
"outer_alias": "uliv",
"inner_alias": "bev",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05802 | train |
v3 | Schema:
regions (alias: okiv)(value, code, id, name)
products(id, value, code, date)
Task: Retrieve amount from regions with amount above the MAX(amount) of products rows sharing the same type.
SQL: | SELECT amount FROM regions AS okiv
WHERE amount > (
SELECT MAX(amount) FROM products AS nad
WHERE nad.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05803 | train |
v2 | Schema:
orders (alias: kab)(type, level, amount, name)
invoices(salary, amount, status, id)
Task: Retrieve name from orders that have at least one corresponding entry in invoices sharing the same status.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05804 | train |
v3 | Schema:
accounts (alias: jac)(id, amount, type, name)
sales(status, id, type, code)
Task: Retrieve salary from accounts with value above the COUNT(value) of sales rows sharing the same level.
SQL: | SELECT salary FROM accounts AS jac
WHERE value > (
SELECT COUNT(value) FROM sales AS cif
WHERE cif.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05805 | train |
v3 | Schema:
items (alias: ikob)(salary, id, status, level)
sales(level, value, code, id)
Task: Find value from items where value exceeds the maximum salary from sales for the same status.
SQL: | SELECT value FROM items AS ikob
WHERE value > (
SELECT MAX(salary) FROM sales AS cif
WHERE cif.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "sales",
"outer_alias": "ikob",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05806 | train |
v2 | Schema:
tasks (alias: znob)(type, salary, amount, value)
projects(date, type, level, salary)
Task: Find value from tasks where a matching record exists in projects with the same status.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "projects",
"outer_alias": "znob",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05807 | train |
v2 | Schema:
managers (alias: hac)(name, level, salary, code)
employees(value, status, id, name)
Task: Retrieve code from managers that have at least one corresponding entry in employees sharing the same type.
SQL: | SELECT code FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05808 | train |
v1 | Schema:
tasks (alias: znob)(code, type, status, value)
staff(type, code, id, name)
Task: Retrieve salary from tasks whose type is found in staff rows where status matches the outer record.
SQL: | SELECT salary FROM tasks AS znob
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05809 | train |
v3 | Schema:
employees (alias: bev)(status, name, type, date)
products(name, id, amount, status)
Task: Find code from employees where amount exceeds the maximum amount from products for the same type.
SQL: | SELECT code FROM employees AS bev
WHERE amount > (
SELECT MAX(amount) FROM products AS nad
WHERE nad.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05810 | train |
v2 | Schema:
managers (alias: hac)(salary, type, status, name)
categories(amount, salary, code, type)
Task: Retrieve id from managers that have at least one corresponding entry in categories sharing the same status.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05811 | train |
v1 | Schema:
invoices (alias: fal)(status, code, name, value)
projects(code, status, type, level)
Task: Select code from invoices where level exists in projects for the same level.
SQL: | SELECT code FROM invoices AS fal
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "projects",
"outer_alias": "fal",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05812 | train |
v2 | Schema:
items (alias: ikob)(salary, value, id, type)
projects(name, salary, type, value)
Task: Retrieve id from items that have at least one corresponding entry in projects sharing the same type.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05813 | train |
v1 | Schema:
products (alias: nad)(status, code, amount, name)
regions(level, status, id, code)
Task: Select amount from products where id exists in regions for the same id.
SQL: | SELECT amount FROM products AS nad
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.id = nad.id
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05814 | train |
v3 | Schema:
sales (alias: cif)(status, code, id, amount)
accounts(amount, status, date, value)
Task: Retrieve value from sales with value above the AVG(value) of accounts rows sharing the same type.
SQL: | SELECT value FROM sales AS cif
WHERE value > (
SELECT AVG(value) FROM accounts AS jac
WHERE jac.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "accounts",
"outer_alias": "cif",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05815 | train |
v2 | Schema:
schedules (alias: vmob)(name, value, type, id)
departments(status, id, value, code)
Task: Retrieve code from schedules that have at least one corresponding entry in departments sharing the same status.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "vmob",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05816 | train |
v3 | Schema:
invoices (alias: fal)(amount, code, name, date)
employees(level, amount, type, date)
Task: Find salary from invoices where amount exceeds the total value from employees for the same id.
SQL: | SELECT salary FROM invoices AS fal
WHERE amount > (
SELECT SUM(value) FROM employees AS bev
WHERE bev.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "salary",
"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_05817 | train |
v1 | Schema:
items (alias: ikob)(amount, level, code, status)
regions(type, amount, level, salary)
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_05818 | train |
v2 | Schema:
items (alias: ikob)(id, type, status, code)
accounts(type, date, status, value)
Task: Find value from items where a matching record exists in accounts with the same status.
SQL: | SELECT value FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "accounts",
"outer_alias": "ikob",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05819 | train |
v3 | Schema:
branches (alias: agov)(id, amount, type, name)
projects(amount, level, value, id)
Task: Retrieve value from branches with amount above the SUM(value) of projects rows sharing the same status.
SQL: | SELECT value FROM branches AS agov
WHERE amount > (
SELECT SUM(value) FROM projects AS uliv
WHERE uliv.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "projects",
"outer_alias": "agov",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05820 | train |
v2 | Schema:
staff (alias: xnob)(level, salary, name, id)
regions(salary, name, level, code)
Task: Find id from staff where a matching record exists in regions with the same type.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "xnob",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05821 | train |
v1 | Schema:
customers (alias: lex)(salary, amount, type, date)
invoices(id, amount, date, value)
Task: Retrieve code from customers whose id is found in invoices rows where status matches the outer record.
SQL: | SELECT code FROM customers AS lex
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "lex",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05822 | train |
v2 | Schema:
items (alias: ikob)(level, type, name, code)
branches(status, id, level, salary)
Task: Find value from items where a matching record exists in branches with the same level.
SQL: | SELECT value FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "ikob",
"inner_alias": "agov",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05823 | train |
v1 | Schema:
staff (alias: xnob)(id, amount, code, name)
accounts(code, value, name, status)
Task: Find amount from staff where code appears in accounts entries with matching code.
SQL: | SELECT amount FROM staff AS xnob
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05824 | train |
v2 | Schema:
managers (alias: hac)(id, code, value, amount)
staff(date, name, level, status)
Task: Find id from managers where a matching record exists in staff with the same id.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "hac",
"inner_alias": "xnob",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05825 | train |
v3 | Schema:
customers (alias: lex)(code, id, type, date)
departments(type, name, status, code)
Task: Find amount from customers where amount exceeds the count of value from departments for the same status.
SQL: | SELECT amount FROM customers AS lex
WHERE amount > (
SELECT COUNT(value) FROM departments AS dov
WHERE dov.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "departments",
"outer_alias": "lex",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05826 | train |
v2 | Schema:
tasks (alias: znob)(id, status, level, code)
requests(level, salary, status, value)
Task: Find code from tasks where a matching record exists in requests with the same code.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05827 | train |
v1 | Schema:
staff (alias: xnob)(code, date, id, type)
managers(name, amount, type, level)
Task: Select value from staff where id exists in managers for the same code.
SQL: | SELECT value FROM staff AS xnob
WHERE id IN (
SELECT id FROM managers AS hac
WHERE hac.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "managers",
"outer_alias": "xnob",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05828 | train |
v2 | Schema:
branches (alias: agov)(status, salary, level, code)
requests(date, id, code, type)
Task: Find id from branches where a matching record exists in requests with the same type.
SQL: | SELECT id FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "agov",
"inner_alias": "ejof",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05829 | train |
v3 | Schema:
schedules (alias: vmob)(value, amount, date, status)
accounts(status, id, code, level)
Task: Retrieve name from schedules with amount above the AVG(salary) of accounts rows sharing the same code.
SQL: | SELECT name FROM schedules AS vmob
WHERE amount > (
SELECT AVG(salary) FROM accounts AS jac
WHERE jac.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05830 | train |
v3 | Schema:
requests (alias: ejof)(name, amount, value, id)
sales(amount, date, type, salary)
Task: Find salary from requests where salary exceeds the minimum amount from sales for the same status.
SQL: | SELECT salary FROM requests AS ejof
WHERE salary > (
SELECT MIN(amount) FROM sales AS cif
WHERE cif.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05831 | train |
v1 | Schema:
requests (alias: ejof)(id, amount, salary, type)
invoices(name, value, code, id)
Task: Find salary from requests where level appears in invoices entries with matching type.
SQL: | SELECT salary FROM requests AS ejof
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05832 | train |
v2 | Schema:
accounts (alias: jac)(date, value, level, name)
staff(amount, date, salary, id)
Task: Retrieve value from accounts that have at least one corresponding entry in staff sharing the same type.
SQL: | SELECT value FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05833 | train |
v2 | Schema:
staff (alias: xnob)(type, name, value, amount)
categories(salary, name, id, level)
Task: Find amount from staff where a matching record exists in categories with the same code.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05834 | train |
v1 | Schema:
transactions (alias: gev)(code, type, salary, date)
sales(type, value, name, level)
Task: Select salary from transactions where level exists in sales for the same status.
SQL: | SELECT salary FROM transactions AS gev
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05835 | train |
v1 | Schema:
staff (alias: xnob)(type, id, name, salary)
items(id, salary, level, type)
Task: Retrieve code from staff whose status is found in items rows where status matches the outer record.
SQL: | SELECT code FROM staff AS xnob
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "items",
"outer_alias": "xnob",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05836 | train |
v1 | Schema:
shipments (alias: vnob)(status, name, id, value)
projects(type, amount, code, status)
Task: Select name from shipments where level exists in projects for the same status.
SQL: | SELECT name FROM shipments AS vnob
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "projects",
"outer_alias": "vnob",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05837 | train |
v2 | Schema:
transactions (alias: gev)(value, date, level, status)
schedules(name, code, level, salary)
Task: Retrieve id from transactions that have at least one corresponding entry in schedules sharing the same code.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05838 | train |
v1 | Schema:
accounts (alias: jac)(code, date, id, type)
projects(type, value, date, amount)
Task: Find id from accounts where id appears in projects entries with matching id.
SQL: | SELECT id FROM accounts AS jac
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05839 | train |
v1 | Schema:
accounts (alias: jac)(amount, status, id, name)
orders(level, code, id, salary)
Task: Find value from accounts where type appears in orders entries with matching code.
SQL: | SELECT value FROM accounts AS jac
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "orders",
"outer_alias": "jac",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05840 | train |
v3 | Schema:
schedules (alias: vmob)(type, value, code, status)
departments(id, salary, status, name)
Task: Find amount from schedules where salary exceeds the count of value from departments for the same code.
SQL: | SELECT amount FROM schedules AS vmob
WHERE salary > (
SELECT COUNT(value) FROM departments AS dov
WHERE dov.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "vmob",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05841 | train |
v2 | Schema:
branches (alias: agov)(id, code, name, status)
requests(date, status, amount, type)
Task: Find name from branches where a matching record exists in requests with the same id.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "agov",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05842 | train |
v3 | Schema:
projects (alias: uliv)(type, status, salary, date)
managers(date, level, name, type)
Task: Find id from projects where salary exceeds the minimum salary from managers for the same id.
SQL: | SELECT id FROM projects AS uliv
WHERE salary > (
SELECT MIN(salary) FROM managers AS hac
WHERE hac.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "managers",
"outer_alias": "uliv",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05843 | train |
v1 | Schema:
tasks (alias: znob)(id, type, value, salary)
orders(id, salary, status, value)
Task: Find name from tasks where status appears in orders entries with matching id.
SQL: | SELECT name FROM tasks AS znob
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05844 | train |
v1 | Schema:
invoices (alias: fal)(salary, level, value, code)
tasks(level, code, name, type)
Task: Find code from invoices where code appears in tasks entries with matching id.
SQL: | SELECT code FROM invoices AS fal
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "tasks",
"outer_alias": "fal",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05845 | train |
v1 | Schema:
departments (alias: dov)(code, status, level, type)
employees(code, name, amount, type)
Task: Retrieve salary from departments whose type is found in employees rows where type matches the outer record.
SQL: | SELECT salary FROM departments AS dov
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "employees",
"outer_alias": "dov",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05846 | train |
v2 | Schema:
accounts (alias: jac)(status, name, value, salary)
employees(status, amount, name, id)
Task: Retrieve amount from accounts that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT amount FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05847 | train |
v3 | Schema:
tasks (alias: znob)(status, type, level, date)
departments(id, value, amount, name)
Task: Retrieve name from tasks with salary above the MIN(value) of departments rows sharing the same id.
SQL: | SELECT name FROM tasks AS znob
WHERE salary > (
SELECT MIN(value) FROM departments AS dov
WHERE dov.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "departments",
"outer_alias": "znob",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05848 | train |
v2 | Schema:
orders (alias: kab)(salary, level, id, date)
schedules(date, level, name, code)
Task: Retrieve code from orders that have at least one corresponding entry in schedules sharing the same level.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05849 | train |
v2 | Schema:
transactions (alias: gev)(status, salary, level, value)
items(id, salary, name, code)
Task: Find salary from transactions where a matching record exists in items with the same status.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05850 | train |
v2 | Schema:
categories (alias: egiv)(salary, type, date, id)
orders(type, date, value, code)
Task: Find id from categories where a matching record exists in orders with the same level.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05851 | train |
v1 | Schema:
branches (alias: agov)(name, value, status, type)
employees(value, id, type, status)
Task: Find code from branches where id appears in employees entries with matching status.
SQL: | SELECT code FROM branches AS agov
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "employees",
"outer_alias": "agov",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05852 | train |
v3 | Schema:
projects (alias: uliv)(status, level, id, date)
sales(name, level, amount, date)
Task: Find code from projects where salary exceeds the average amount from sales for the same id.
SQL: | SELECT code FROM projects AS uliv
WHERE salary > (
SELECT AVG(amount) FROM sales AS cif
WHERE cif.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05853 | train |
v3 | Schema:
departments (alias: dov)(amount, salary, level, type)
branches(salary, level, date, value)
Task: Find code from departments where amount exceeds the maximum value from branches for the same status.
SQL: | SELECT code FROM departments AS dov
WHERE amount > (
SELECT MAX(value) FROM branches AS agov
WHERE agov.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05854 | train |
v2 | Schema:
departments (alias: dov)(code, type, status, amount)
tasks(value, name, id, amount)
Task: Find salary from departments where a matching record exists in tasks with the same code.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "tasks",
"outer_alias": "dov",
"inner_alias": "znob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05855 | train |
v3 | Schema:
tasks (alias: znob)(level, name, amount, id)
schedules(code, status, salary, level)
Task: Find amount from tasks where value exceeds the minimum value from schedules for the same status.
SQL: | SELECT amount FROM tasks AS znob
WHERE value > (
SELECT MIN(value) FROM schedules AS vmob
WHERE vmob.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "schedules",
"outer_alias": "znob",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05856 | train |
v2 | Schema:
products (alias: nad)(value, date, salary, name)
staff(date, type, value, amount)
Task: Retrieve code from products that have at least one corresponding entry in staff sharing the same id.
SQL: | SELECT code FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = nad.id
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "xnob",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05857 | train |
v2 | Schema:
orders (alias: kab)(date, amount, status, name)
employees(value, id, salary, code)
Task: Find code from orders where a matching record exists in employees with the same code.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "employees",
"outer_alias": "kab",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05858 | train |
v1 | Schema:
branches (alias: agov)(status, salary, level, name)
transactions(status, name, id, amount)
Task: Retrieve name from branches whose level is found in transactions rows where code matches the outer record.
SQL: | SELECT name FROM branches AS agov
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05859 | train |
v2 | Schema:
regions (alias: okiv)(salary, status, type, level)
requests(code, type, level, date)
Task: Retrieve salary from regions that have at least one corresponding entry in requests sharing the same status.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "requests",
"outer_alias": "okiv",
"inner_alias": "ejof",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05860 | train |
v2 | Schema:
staff (alias: xnob)(id, name, salary, status)
items(name, amount, type, value)
Task: Find code from staff where a matching record exists in items with the same level.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "items",
"outer_alias": "xnob",
"inner_alias": "ikob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05861 | train |
v3 | Schema:
categories (alias: egiv)(status, level, value, id)
accounts(amount, name, status, type)
Task: Retrieve salary from categories with value above the COUNT(amount) of accounts rows sharing the same status.
SQL: | SELECT salary FROM categories AS egiv
WHERE value > (
SELECT COUNT(amount) FROM accounts AS jac
WHERE jac.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05862 | train |
v2 | Schema:
customers (alias: lex)(name, status, salary, value)
branches(amount, id, status, name)
Task: Retrieve amount from customers that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05863 | train |
v1 | Schema:
regions (alias: okiv)(amount, value, name, id)
categories(value, amount, date, status)
Task: Select value from regions where type exists in categories for the same type.
SQL: | SELECT value FROM regions AS okiv
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05864 | train |
v1 | Schema:
products (alias: nad)(date, amount, name, id)
branches(code, name, date, level)
Task: Find name from products where id appears in branches entries with matching type.
SQL: | SELECT name FROM products AS nad
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.type = nad.type
); | {
"outer_table": "products",
"inner_table": "branches",
"outer_alias": "nad",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05865 | train |
v1 | Schema:
employees (alias: bev)(status, salary, name, code)
branches(type, code, amount, date)
Task: Find code from employees where level appears in branches entries with matching code.
SQL: | SELECT code FROM employees AS bev
WHERE level IN (
SELECT level FROM branches AS agov
WHERE agov.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05866 | train |
v2 | Schema:
employees (alias: bev)(value, date, status, code)
departments(id, status, salary, value)
Task: Retrieve value from employees that have at least one corresponding entry in departments sharing the same level.
SQL: | SELECT value 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": "value",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05867 | train |
v3 | Schema:
employees (alias: bev)(code, type, date, name)
items(date, level, code, salary)
Task: Retrieve amount from employees with value above the SUM(amount) of items rows sharing the same status.
SQL: | SELECT amount FROM employees AS bev
WHERE value > (
SELECT SUM(amount) FROM items AS ikob
WHERE ikob.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "items",
"outer_alias": "bev",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05868 | train |
v1 | Schema:
staff (alias: xnob)(salary, name, code, id)
invoices(date, level, id, type)
Task: Retrieve code from staff whose type is found in invoices rows where level matches the outer record.
SQL: | SELECT code FROM staff AS xnob
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "invoices",
"outer_alias": "xnob",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05869 | train |
v2 | Schema:
customers (alias: lex)(salary, type, id, value)
schedules(salary, status, value, date)
Task: Retrieve name from customers that have at least one corresponding entry in schedules sharing the same status.
SQL: | SELECT name FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05870 | train |
v1 | Schema:
transactions (alias: gev)(status, code, type, id)
projects(type, value, status, name)
Task: Select value from transactions where code exists in projects for the same code.
SQL: | SELECT value FROM transactions AS gev
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05871 | train |
v3 | Schema:
tasks (alias: znob)(date, level, name, id)
branches(level, status, id, code)
Task: Retrieve code from tasks with value above the AVG(salary) of branches rows sharing the same status.
SQL: | SELECT code FROM tasks AS znob
WHERE value > (
SELECT AVG(salary) FROM branches AS agov
WHERE agov.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "branches",
"outer_alias": "znob",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05872 | train |
v3 | Schema:
schedules (alias: vmob)(code, id, status, name)
requests(name, level, code, amount)
Task: Find amount from schedules where value exceeds the total value from requests for the same code.
SQL: | SELECT amount FROM schedules AS vmob
WHERE value > (
SELECT SUM(value) FROM requests AS ejof
WHERE ejof.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "requests",
"outer_alias": "vmob",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05873 | train |
v1 | Schema:
tasks (alias: znob)(type, code, id, name)
customers(date, salary, code, level)
Task: Retrieve code from tasks whose status is found in customers rows where code matches the outer record.
SQL: | SELECT code FROM tasks AS znob
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05874 | train |
v2 | Schema:
shipments (alias: vnob)(type, code, name, date)
staff(level, status, salary, date)
Task: Find amount from shipments where a matching record exists in staff with the same level.
SQL: | SELECT amount FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "vnob",
"inner_alias": "xnob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05875 | train |
v3 | Schema:
branches (alias: agov)(amount, status, salary, id)
shipments(value, level, date, amount)
Task: Retrieve code from branches with amount above the MIN(amount) of shipments rows sharing the same status.
SQL: | SELECT code FROM branches AS agov
WHERE amount > (
SELECT MIN(amount) FROM shipments AS vnob
WHERE vnob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05876 | train |
v1 | Schema:
projects (alias: uliv)(date, id, code, status)
products(value, id, date, salary)
Task: Retrieve name from projects whose code is found in products rows where type matches the outer record.
SQL: | SELECT name FROM projects AS uliv
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "products",
"outer_alias": "uliv",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05877 | train |
v2 | Schema:
projects (alias: uliv)(value, status, amount, name)
employees(name, value, date, amount)
Task: Find salary from projects where a matching record exists in employees with the same id.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "employees",
"outer_alias": "uliv",
"inner_alias": "bev",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05878 | train |
v1 | Schema:
branches (alias: agov)(amount, value, date, id)
managers(id, status, value, name)
Task: Select value from branches where type exists in managers for the same status.
SQL: | SELECT value FROM branches AS agov
WHERE type IN (
SELECT type FROM managers AS hac
WHERE hac.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05879 | train |
v1 | Schema:
projects (alias: uliv)(status, date, type, code)
regions(id, amount, level, type)
Task: Select value from projects where code exists in regions for the same id.
SQL: | SELECT value FROM projects AS uliv
WHERE code IN (
SELECT code FROM regions AS okiv
WHERE okiv.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "regions",
"outer_alias": "uliv",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05880 | train |
v3 | Schema:
products (alias: nad)(amount, code, name, type)
projects(id, status, value, code)
Task: Find salary from products where salary exceeds the maximum value from projects for the same level.
SQL: | SELECT salary FROM products AS nad
WHERE salary > (
SELECT MAX(value) FROM projects AS uliv
WHERE uliv.level = nad.level
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05881 | train |
v2 | Schema:
tasks (alias: znob)(code, name, id, type)
customers(value, code, salary, name)
Task: Find value from tasks where a matching record exists in customers with the same code.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05882 | train |
v2 | Schema:
shipments (alias: vnob)(status, value, salary, code)
schedules(date, value, id, code)
Task: Find code from shipments where a matching record exists in schedules with the same type.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05883 | train |
v2 | Schema:
requests (alias: ejof)(value, name, code, status)
projects(salary, amount, status, id)
Task: Retrieve value from requests that have at least one corresponding entry in projects sharing the same level.
SQL: | SELECT value FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "projects",
"outer_alias": "ejof",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05884 | train |
v2 | Schema:
shipments (alias: vnob)(amount, name, status, date)
requests(name, status, value, salary)
Task: Find code from shipments where a matching record exists in requests with the same code.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05885 | train |
v3 | Schema:
shipments (alias: vnob)(amount, level, name, salary)
orders(date, type, code, id)
Task: Find value from shipments where salary exceeds the minimum amount from orders for the same level.
SQL: | SELECT value FROM shipments AS vnob
WHERE salary > (
SELECT MIN(amount) FROM orders AS kab
WHERE kab.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05886 | train |
v3 | Schema:
managers (alias: hac)(value, id, status, name)
regions(value, type, date, level)
Task: Find amount from managers where amount exceeds the minimum salary from regions for the same type.
SQL: | SELECT amount FROM managers AS hac
WHERE amount > (
SELECT MIN(salary) FROM regions AS okiv
WHERE okiv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "hac",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05887 | train |
v3 | Schema:
categories (alias: egiv)(id, level, code, status)
accounts(salary, amount, code, date)
Task: Find value from categories where amount exceeds the total value from accounts for the same status.
SQL: | SELECT value FROM categories AS egiv
WHERE amount > (
SELECT SUM(value) FROM accounts AS jac
WHERE jac.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05888 | train |
v2 | Schema:
staff (alias: xnob)(value, amount, status, date)
departments(value, id, name, salary)
Task: Retrieve value from staff that have at least one corresponding entry in departments sharing the same level.
SQL: | SELECT value FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05889 | train |
v2 | Schema:
shipments (alias: vnob)(level, code, type, date)
schedules(code, salary, id, value)
Task: Find code from shipments where a matching record exists in schedules with the same type.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05890 | train |
v3 | Schema:
customers (alias: lex)(type, status, salary, level)
schedules(id, status, date, level)
Task: Retrieve salary from customers with salary above the MAX(value) of schedules rows sharing the same id.
SQL: | SELECT salary FROM customers AS lex
WHERE salary > (
SELECT MAX(value) FROM schedules AS vmob
WHERE vmob.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05891 | train |
v2 | Schema:
sales (alias: cif)(id, value, status, code)
projects(status, name, amount, value)
Task: Find value from sales where a matching record exists in projects with the same level.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05892 | train |
v2 | Schema:
sales (alias: cif)(type, amount, level, name)
accounts(value, amount, id, code)
Task: Retrieve id from sales that have at least one corresponding entry in accounts sharing the same level.
SQL: | SELECT id FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "accounts",
"outer_alias": "cif",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05893 | train |
v2 | Schema:
staff (alias: xnob)(level, salary, status, code)
employees(salary, date, value, name)
Task: Retrieve id from staff that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "employees",
"outer_alias": "xnob",
"inner_alias": "bev",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05894 | train |
v2 | Schema:
branches (alias: agov)(status, date, name, amount)
projects(level, date, code, salary)
Task: Find name from branches where a matching record exists in projects with the same id.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "projects",
"outer_alias": "agov",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05895 | train |
v3 | Schema:
departments (alias: dov)(amount, level, id, value)
shipments(type, level, date, name)
Task: Retrieve value from departments with salary above the COUNT(value) of shipments rows sharing the same level.
SQL: | SELECT value FROM departments AS dov
WHERE salary > (
SELECT COUNT(value) FROM shipments AS vnob
WHERE vnob.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "shipments",
"outer_alias": "dov",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05896 | train |
v2 | Schema:
products (alias: nad)(salary, code, type, id)
regions(type, value, code, level)
Task: Retrieve name from products that have at least one corresponding entry in regions sharing the same id.
SQL: | SELECT name FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = nad.id
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05897 | train |
v1 | Schema:
tasks (alias: znob)(code, id, type, amount)
orders(name, id, salary, status)
Task: Find salary from tasks where code appears in orders entries with matching id.
SQL: | SELECT salary FROM tasks AS znob
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05898 | train |
v1 | Schema:
regions (alias: okiv)(type, level, value, status)
sales(level, id, code, amount)
Task: Select code from regions where code exists in sales for the same status.
SQL: | SELECT code FROM regions AS okiv
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05899 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.