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:
projects (alias: uliv)(date, amount, status, type)
transactions(status, date, level, type)
Task: Select code from projects where id exists in transactions for the same type.
SQL: | SELECT code FROM projects AS uliv
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04000 | train |
v1 | Schema:
products (alias: nad)(value, name, id, salary)
projects(date, type, value, amount)
Task: Find id from products where status appears in projects entries with matching type.
SQL: | SELECT id FROM products AS nad
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.type = nad.type
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04001 | train |
v3 | Schema:
tasks (alias: znob)(type, status, value, name)
shipments(id, code, date, amount)
Task: Retrieve amount from tasks with value above the COUNT(salary) of shipments rows sharing the same code.
SQL: | SELECT amount FROM tasks AS znob
WHERE value > (
SELECT COUNT(salary) FROM shipments AS vnob
WHERE vnob.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "shipments",
"outer_alias": "znob",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04002 | train |
v2 | Schema:
managers (alias: hac)(code, amount, type, name)
employees(level, code, value, id)
Task: Find salary from managers where a matching record exists in employees with the same level.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04003 | train |
v1 | Schema:
employees (alias: bev)(amount, id, name, type)
items(value, date, amount, status)
Task: Find amount from employees where level appears in items entries with matching level.
SQL: | SELECT amount FROM employees AS bev
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "items",
"outer_alias": "bev",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04004 | train |
v2 | Schema:
transactions (alias: gev)(level, code, name, amount)
schedules(salary, amount, date, status)
Task: Find code from transactions where a matching record exists in schedules with the same status.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04005 | train |
v1 | Schema:
tasks (alias: znob)(status, id, level, amount)
managers(amount, status, date, name)
Task: Retrieve id from tasks whose status is found in managers rows where status matches the outer record.
SQL: | SELECT id FROM tasks AS znob
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "managers",
"outer_alias": "znob",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04006 | train |
v2 | Schema:
staff (alias: xnob)(amount, salary, id, status)
branches(id, value, code, level)
Task: Find amount from staff where a matching record exists in branches with the same status.
SQL: | SELECT amount 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": "amount",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04007 | train |
v3 | Schema:
staff (alias: xnob)(name, code, amount, value)
transactions(level, name, status, type)
Task: Find name from staff where salary exceeds the total amount from transactions for the same id.
SQL: | SELECT name FROM staff AS xnob
WHERE salary > (
SELECT SUM(amount) FROM transactions AS gev
WHERE gev.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "transactions",
"outer_alias": "xnob",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04008 | train |
v3 | Schema:
tasks (alias: znob)(type, date, id, name)
schedules(id, level, salary, status)
Task: Retrieve salary from tasks with amount above the SUM(salary) of schedules rows sharing the same type.
SQL: | SELECT salary FROM tasks AS znob
WHERE amount > (
SELECT SUM(salary) FROM schedules AS vmob
WHERE vmob.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "schedules",
"outer_alias": "znob",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04009 | train |
v1 | Schema:
tasks (alias: znob)(name, status, amount, code)
employees(type, name, status, date)
Task: Find salary from tasks where level appears in employees entries with matching level.
SQL: | SELECT salary FROM tasks AS znob
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04010 | train |
v2 | Schema:
accounts (alias: jac)(id, type, salary, code)
regions(amount, level, id, value)
Task: Retrieve salary from accounts that have at least one corresponding entry in regions sharing the same type.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04011 | train |
v3 | Schema:
shipments (alias: vnob)(date, value, level, code)
customers(name, level, code, date)
Task: Retrieve salary from shipments with amount above the MAX(amount) of customers rows sharing the same status.
SQL: | SELECT salary FROM shipments AS vnob
WHERE amount > (
SELECT MAX(amount) FROM customers AS lex
WHERE lex.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04012 | train |
v2 | Schema:
tasks (alias: znob)(name, status, salary, type)
transactions(code, level, amount, date)
Task: Find value from tasks where a matching record exists in transactions with the same status.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04013 | train |
v1 | Schema:
departments (alias: dov)(date, salary, id, code)
categories(salary, level, amount, name)
Task: Find id from departments where level appears in categories entries with matching id.
SQL: | SELECT id FROM departments AS dov
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04014 | train |
v2 | Schema:
transactions (alias: gev)(name, status, id, type)
requests(code, level, type, status)
Task: Retrieve id from transactions that have at least one corresponding entry in requests sharing the same type.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04015 | train |
v1 | Schema:
projects (alias: uliv)(level, code, name, type)
customers(id, code, type, name)
Task: Retrieve name from projects whose status is found in customers rows where id matches the outer record.
SQL: | SELECT name 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": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04016 | train |
v1 | Schema:
managers (alias: hac)(id, value, salary, date)
categories(salary, type, date, status)
Task: Find id from managers where id appears in categories entries with matching type.
SQL: | SELECT id FROM managers AS hac
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04017 | train |
v1 | Schema:
items (alias: ikob)(name, date, level, value)
employees(value, id, salary, name)
Task: Retrieve name from items whose status is found in employees rows where type matches the outer record.
SQL: | SELECT name FROM items AS ikob
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "ikob",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04018 | train |
v3 | Schema:
transactions (alias: gev)(type, amount, date, name)
projects(id, date, type, code)
Task: Find code from transactions where value exceeds the count of value from projects for the same code.
SQL: | SELECT code FROM transactions AS gev
WHERE value > (
SELECT COUNT(value) FROM projects AS uliv
WHERE uliv.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04019 | train |
v1 | Schema:
managers (alias: hac)(value, name, code, status)
invoices(type, level, id, value)
Task: Retrieve amount from managers whose status is found in invoices rows where type matches the outer record.
SQL: | SELECT amount FROM managers AS hac
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04020 | train |
v3 | Schema:
branches (alias: agov)(status, name, id, value)
items(status, salary, amount, level)
Task: Retrieve salary from branches with value above the MAX(salary) of items rows sharing the same code.
SQL: | SELECT salary FROM branches AS agov
WHERE value > (
SELECT MAX(salary) FROM items AS ikob
WHERE ikob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04021 | train |
v3 | Schema:
branches (alias: agov)(level, salary, status, type)
transactions(type, amount, salary, name)
Task: Retrieve id from branches with amount above the AVG(value) of transactions rows sharing the same status.
SQL: | SELECT id FROM branches AS agov
WHERE amount > (
SELECT AVG(value) FROM transactions AS gev
WHERE gev.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04022 | train |
v3 | Schema:
staff (alias: xnob)(name, date, value, salary)
regions(salary, code, value, level)
Task: Find salary from staff where amount exceeds the maximum salary from regions for the same code.
SQL: | SELECT salary FROM staff AS xnob
WHERE amount > (
SELECT MAX(salary) FROM regions AS okiv
WHERE okiv.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "xnob",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04023 | train |
v2 | Schema:
schedules (alias: vmob)(amount, value, code, level)
tasks(id, amount, type, salary)
Task: Retrieve amount from schedules that have at least one corresponding entry in tasks sharing the same status.
SQL: | SELECT amount FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "tasks",
"outer_alias": "vmob",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04024 | train |
v1 | Schema:
schedules (alias: vmob)(value, salary, type, level)
products(date, value, status, salary)
Task: Find amount from schedules where code appears in products entries with matching level.
SQL: | SELECT amount FROM schedules AS vmob
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "products",
"outer_alias": "vmob",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04025 | train |
v1 | Schema:
staff (alias: xnob)(id, amount, status, name)
customers(id, status, value, level)
Task: Find id from staff where status appears in customers entries with matching id.
SQL: | SELECT id FROM staff AS xnob
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04026 | train |
v3 | Schema:
accounts (alias: jac)(id, value, code, level)
transactions(id, amount, status, salary)
Task: Find value from accounts where amount exceeds the maximum amount from transactions for the same id.
SQL: | SELECT value FROM accounts AS jac
WHERE amount > (
SELECT MAX(amount) FROM transactions AS gev
WHERE gev.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04027 | train |
v1 | Schema:
employees (alias: bev)(value, salary, id, amount)
orders(code, id, type, value)
Task: Retrieve value from employees whose level is found in orders rows where code matches the outer record.
SQL: | SELECT value FROM employees AS bev
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04028 | train |
v3 | Schema:
regions (alias: okiv)(type, value, id, code)
categories(name, value, salary, level)
Task: Retrieve amount from regions with amount above the MIN(salary) of categories rows sharing the same code.
SQL: | SELECT amount FROM regions AS okiv
WHERE amount > (
SELECT MIN(salary) FROM categories AS egiv
WHERE egiv.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04029 | train |
v3 | Schema:
requests (alias: ejof)(amount, name, level, value)
employees(level, value, salary, date)
Task: Find amount from requests where amount exceeds the count of salary from employees for the same level.
SQL: | SELECT amount FROM requests AS ejof
WHERE amount > (
SELECT COUNT(salary) FROM employees AS bev
WHERE bev.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04030 | train |
v2 | Schema:
regions (alias: okiv)(salary, type, amount, status)
branches(date, code, salary, level)
Task: Find amount from regions where a matching record exists in branches with the same code.
SQL: | SELECT amount FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "branches",
"outer_alias": "okiv",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04031 | train |
v3 | Schema:
accounts (alias: jac)(name, amount, salary, date)
schedules(type, level, status, amount)
Task: Retrieve code from accounts with value above the COUNT(amount) of schedules rows sharing the same level.
SQL: | SELECT code FROM accounts AS jac
WHERE value > (
SELECT COUNT(amount) FROM schedules AS vmob
WHERE vmob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04032 | train |
v1 | Schema:
invoices (alias: fal)(date, amount, type, id)
transactions(level, name, status, salary)
Task: Find id from invoices where id appears in transactions entries with matching code.
SQL: | SELECT id FROM invoices AS fal
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04033 | train |
v2 | Schema:
managers (alias: hac)(code, value, status, type)
shipments(level, name, value, salary)
Task: Find id from managers where a matching record exists in shipments with the same level.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "hac",
"inner_alias": "vnob",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04034 | train |
v2 | Schema:
items (alias: ikob)(date, code, salary, level)
regions(type, id, name, date)
Task: Find name from items where a matching record exists in regions with the same level.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "regions",
"outer_alias": "ikob",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04035 | train |
v3 | Schema:
invoices (alias: fal)(id, date, name, code)
projects(salary, id, name, amount)
Task: Find name from invoices where salary exceeds the total value from projects for the same code.
SQL: | SELECT name FROM invoices AS fal
WHERE salary > (
SELECT SUM(value) FROM projects AS uliv
WHERE uliv.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "projects",
"outer_alias": "fal",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04036 | train |
v1 | Schema:
shipments (alias: vnob)(level, code, name, value)
sales(id, amount, type, code)
Task: Find id from shipments where level appears in sales entries with matching id.
SQL: | SELECT id FROM shipments AS vnob
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04037 | train |
v2 | Schema:
branches (alias: agov)(level, type, status, salary)
employees(name, date, type, amount)
Task: Retrieve salary from branches that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "employees",
"outer_alias": "agov",
"inner_alias": "bev",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04038 | train |
v1 | Schema:
staff (alias: xnob)(date, type, name, salary)
requests(amount, level, code, name)
Task: Select salary from staff where code exists in requests for the same type.
SQL: | SELECT salary FROM staff AS xnob
WHERE code IN (
SELECT code FROM requests AS ejof
WHERE ejof.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04039 | train |
v1 | Schema:
products (alias: nad)(type, salary, code, status)
transactions(amount, code, type, date)
Task: Retrieve value from products whose type is found in transactions rows where status matches the outer record.
SQL: | SELECT value FROM products AS nad
WHERE type IN (
SELECT type FROM transactions AS gev
WHERE gev.status = nad.status
); | {
"outer_table": "products",
"inner_table": "transactions",
"outer_alias": "nad",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04040 | train |
v3 | Schema:
categories (alias: egiv)(status, salary, name, id)
staff(value, salary, code, date)
Task: Find id from categories where amount exceeds the count of amount from staff for the same code.
SQL: | SELECT id FROM categories AS egiv
WHERE amount > (
SELECT COUNT(amount) FROM staff AS xnob
WHERE xnob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "egiv",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04041 | train |
v3 | Schema:
sales (alias: cif)(code, name, status, salary)
customers(status, name, salary, value)
Task: Retrieve value from sales with salary above the COUNT(value) of customers rows sharing the same id.
SQL: | SELECT value FROM sales AS cif
WHERE salary > (
SELECT COUNT(value) FROM customers AS lex
WHERE lex.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "cif",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04042 | train |
v3 | Schema:
tasks (alias: znob)(amount, status, level, code)
departments(salary, amount, code, date)
Task: Retrieve amount from tasks with salary above the AVG(value) of departments rows sharing the same level.
SQL: | SELECT amount FROM tasks AS znob
WHERE salary > (
SELECT AVG(value) FROM departments AS dov
WHERE dov.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "departments",
"outer_alias": "znob",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04043 | train |
v2 | Schema:
sales (alias: cif)(id, salary, date, amount)
invoices(value, salary, code, amount)
Task: Find value from sales where a matching record exists in invoices with the same type.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04044 | train |
v1 | Schema:
sales (alias: cif)(name, type, amount, level)
regions(value, amount, name, salary)
Task: Retrieve salary from sales whose status is found in regions rows where type matches the outer record.
SQL: | SELECT salary FROM sales AS cif
WHERE status IN (
SELECT status FROM regions AS okiv
WHERE okiv.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04045 | train |
v3 | Schema:
schedules (alias: vmob)(amount, date, salary, status)
sales(salary, status, code, level)
Task: Retrieve amount from schedules with amount above the SUM(amount) of sales rows sharing the same type.
SQL: | SELECT amount FROM schedules AS vmob
WHERE amount > (
SELECT SUM(amount) FROM sales AS cif
WHERE cif.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04046 | train |
v1 | Schema:
projects (alias: uliv)(amount, type, salary, status)
staff(amount, value, name, level)
Task: Retrieve value from projects whose level is found in staff rows where id matches the outer record.
SQL: | SELECT value FROM projects AS uliv
WHERE level IN (
SELECT level FROM staff AS xnob
WHERE xnob.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04047 | train |
v2 | Schema:
projects (alias: uliv)(amount, salary, id, status)
customers(code, status, type, date)
Task: Find salary from projects where a matching record exists in customers with the same id.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "customers",
"outer_alias": "uliv",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04048 | train |
v1 | Schema:
requests (alias: ejof)(type, code, name, amount)
schedules(code, type, name, status)
Task: Retrieve id from requests whose code is found in schedules rows where status matches the outer record.
SQL: | SELECT id FROM requests AS ejof
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04049 | train |
v2 | Schema:
employees (alias: bev)(status, id, name, code)
invoices(status, date, type, amount)
Task: Find code from employees where a matching record exists in invoices with the same id.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "invoices",
"outer_alias": "bev",
"inner_alias": "fal",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04050 | train |
v1 | Schema:
requests (alias: ejof)(code, id, amount, type)
managers(level, value, name, salary)
Task: Find value from requests where code appears in managers entries with matching level.
SQL: | SELECT value FROM requests AS ejof
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04051 | train |
v2 | Schema:
employees (alias: bev)(status, code, name, id)
transactions(name, amount, value, salary)
Task: Find id from employees where a matching record exists in transactions with the same type.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "transactions",
"outer_alias": "bev",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04052 | train |
v2 | Schema:
employees (alias: bev)(value, code, level, salary)
managers(id, value, name, type)
Task: Find code from employees where a matching record exists in managers with the same code.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "managers",
"outer_alias": "bev",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04053 | train |
v3 | Schema:
regions (alias: okiv)(id, code, salary, name)
schedules(id, type, code, level)
Task: Retrieve amount from regions with amount above the COUNT(value) of schedules rows sharing the same type.
SQL: | SELECT amount FROM regions AS okiv
WHERE amount > (
SELECT COUNT(value) FROM schedules AS vmob
WHERE vmob.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "schedules",
"outer_alias": "okiv",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04054 | train |
v2 | Schema:
employees (alias: bev)(date, amount, level, status)
products(salary, date, level, name)
Task: Find code from employees where a matching record exists in products with the same status.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04055 | train |
v3 | Schema:
accounts (alias: jac)(type, value, date, status)
employees(value, amount, id, status)
Task: Retrieve id from accounts with amount above the COUNT(amount) of employees rows sharing the same level.
SQL: | SELECT id FROM accounts AS jac
WHERE amount > (
SELECT COUNT(amount) FROM employees AS bev
WHERE bev.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04056 | train |
v3 | Schema:
schedules (alias: vmob)(date, salary, name, amount)
shipments(code, status, amount, level)
Task: Retrieve name from schedules with value above the SUM(value) of shipments rows sharing the same id.
SQL: | SELECT name FROM schedules AS vmob
WHERE value > (
SELECT SUM(value) FROM shipments AS vnob
WHERE vnob.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04057 | train |
v2 | Schema:
managers (alias: hac)(salary, level, amount, value)
categories(date, type, value, level)
Task: Find id from managers where a matching record exists in categories with the same type.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04058 | train |
v1 | Schema:
invoices (alias: fal)(name, amount, value, type)
branches(type, id, level, name)
Task: Select salary from invoices where type exists in branches for the same level.
SQL: | SELECT salary FROM invoices AS fal
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "branches",
"outer_alias": "fal",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04059 | train |
v1 | Schema:
departments (alias: dov)(type, date, name, status)
categories(value, amount, id, name)
Task: Select id from departments where status exists in categories for the same id.
SQL: | SELECT id FROM departments AS dov
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04060 | train |
v2 | Schema:
shipments (alias: vnob)(value, date, name, id)
products(name, status, level, amount)
Task: Find amount from shipments where a matching record exists in products with the same status.
SQL: | SELECT amount FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "products",
"outer_alias": "vnob",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04061 | train |
v1 | Schema:
invoices (alias: fal)(amount, id, level, status)
employees(type, id, code, salary)
Task: Find value from invoices where code appears in employees entries with matching type.
SQL: | SELECT value FROM invoices AS fal
WHERE code IN (
SELECT code FROM employees AS bev
WHERE bev.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04062 | train |
v2 | Schema:
accounts (alias: jac)(salary, amount, id, code)
staff(salary, id, name, value)
Task: Retrieve code from accounts that have at least one corresponding entry in staff sharing the same code.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04063 | train |
v1 | Schema:
orders (alias: kab)(level, value, id, name)
shipments(id, name, code, value)
Task: Retrieve id from orders whose id is found in shipments rows where id matches the outer record.
SQL: | SELECT id FROM orders AS kab
WHERE id IN (
SELECT id FROM shipments AS vnob
WHERE vnob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04064 | train |
v2 | Schema:
regions (alias: okiv)(amount, name, code, level)
categories(name, date, type, id)
Task: Retrieve name from regions that have at least one corresponding entry in categories sharing the same type.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04065 | train |
v3 | Schema:
projects (alias: uliv)(amount, type, value, code)
products(name, salary, type, amount)
Task: Retrieve id from projects with salary above the SUM(amount) of products rows sharing the same id.
SQL: | SELECT id FROM projects AS uliv
WHERE salary > (
SELECT SUM(amount) FROM products AS nad
WHERE nad.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "products",
"outer_alias": "uliv",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04066 | train |
v2 | Schema:
staff (alias: xnob)(type, code, salary, value)
categories(value, salary, amount, level)
Task: Retrieve name from staff that have at least one corresponding entry in categories sharing the same id.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04067 | train |
v2 | Schema:
products (alias: nad)(code, id, date, salary)
invoices(type, id, name, amount)
Task: Retrieve amount from products that have at least one corresponding entry in invoices sharing the same code.
SQL: | SELECT amount FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = nad.code
); | {
"outer_table": "products",
"inner_table": "invoices",
"outer_alias": "nad",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04068 | train |
v3 | Schema:
requests (alias: ejof)(amount, id, date, status)
accounts(value, status, date, id)
Task: Retrieve amount from requests with salary above the SUM(salary) of accounts rows sharing the same status.
SQL: | SELECT amount FROM requests AS ejof
WHERE salary > (
SELECT SUM(salary) FROM accounts AS jac
WHERE jac.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04069 | train |
v3 | Schema:
sales (alias: cif)(value, level, salary, type)
categories(status, type, id, code)
Task: Retrieve value from sales with salary above the MAX(value) of categories rows sharing the same id.
SQL: | SELECT value FROM sales AS cif
WHERE salary > (
SELECT MAX(value) FROM categories AS egiv
WHERE egiv.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04070 | train |
v1 | Schema:
projects (alias: uliv)(level, amount, status, salary)
employees(amount, code, value, id)
Task: Find code from projects where level appears in employees entries with matching id.
SQL: | SELECT code FROM projects AS uliv
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "employees",
"outer_alias": "uliv",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04071 | train |
v1 | Schema:
items (alias: ikob)(date, level, type, value)
departments(id, value, type, code)
Task: Select salary from items where code exists in departments for the same type.
SQL: | SELECT salary FROM items AS ikob
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "departments",
"outer_alias": "ikob",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04072 | train |
v3 | Schema:
categories (alias: egiv)(amount, value, date, level)
invoices(name, amount, id, code)
Task: Retrieve amount from categories with amount above the MAX(amount) of invoices rows sharing the same type.
SQL: | SELECT amount FROM categories AS egiv
WHERE amount > (
SELECT MAX(amount) FROM invoices AS fal
WHERE fal.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04073 | train |
v1 | Schema:
sales (alias: cif)(amount, code, status, id)
orders(value, id, level, type)
Task: Retrieve name from sales whose code is found in orders rows where code matches the outer record.
SQL: | SELECT name FROM sales AS cif
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "orders",
"outer_alias": "cif",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04074 | train |
v3 | Schema:
requests (alias: ejof)(type, name, date, salary)
schedules(level, value, salary, id)
Task: Retrieve value from requests with value above the AVG(amount) of schedules rows sharing the same id.
SQL: | SELECT value FROM requests AS ejof
WHERE value > (
SELECT AVG(amount) FROM schedules AS vmob
WHERE vmob.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04075 | train |
v2 | Schema:
orders (alias: kab)(name, level, amount, type)
shipments(value, amount, salary, type)
Task: Find amount from orders where a matching record exists in shipments with the same type.
SQL: | SELECT amount FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04076 | train |
v1 | Schema:
departments (alias: dov)(salary, date, amount, status)
branches(salary, code, amount, value)
Task: Select salary from departments where type exists in branches for the same id.
SQL: | SELECT salary FROM departments AS dov
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04077 | train |
v1 | Schema:
items (alias: ikob)(amount, id, date, level)
categories(level, type, code, date)
Task: Find code from items where status appears in categories entries with matching level.
SQL: | SELECT code FROM items AS ikob
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "categories",
"outer_alias": "ikob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04078 | train |
v1 | Schema:
shipments (alias: vnob)(amount, value, salary, type)
requests(type, id, level, status)
Task: Find id from shipments where code appears in requests entries with matching id.
SQL: | SELECT id FROM shipments AS vnob
WHERE code IN (
SELECT code FROM requests AS ejof
WHERE ejof.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04079 | train |
v2 | Schema:
schedules (alias: vmob)(level, date, type, amount)
accounts(type, name, salary, value)
Task: Retrieve value from schedules that have at least one corresponding entry in accounts sharing the same status.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04080 | train |
v1 | Schema:
tasks (alias: znob)(value, amount, status, name)
departments(type, name, status, code)
Task: Retrieve value from tasks whose id is found in departments rows where id matches the outer record.
SQL: | SELECT value FROM tasks AS znob
WHERE id IN (
SELECT id FROM departments AS dov
WHERE dov.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "departments",
"outer_alias": "znob",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04081 | train |
v2 | Schema:
branches (alias: agov)(salary, date, code, type)
requests(code, name, type, status)
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_04082 | train |
v3 | Schema:
regions (alias: okiv)(amount, code, level, status)
items(amount, name, status, salary)
Task: Retrieve amount from regions with salary above the AVG(salary) of items rows sharing the same type.
SQL: | SELECT amount FROM regions AS okiv
WHERE salary > (
SELECT AVG(salary) FROM items AS ikob
WHERE ikob.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "items",
"outer_alias": "okiv",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04083 | train |
v3 | Schema:
sales (alias: cif)(code, amount, level, name)
categories(amount, status, type, value)
Task: Find name from sales where salary exceeds the total amount from categories for the same id.
SQL: | SELECT name FROM sales AS cif
WHERE salary > (
SELECT SUM(amount) FROM categories AS egiv
WHERE egiv.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04084 | train |
v3 | Schema:
branches (alias: agov)(salary, name, level, id)
transactions(date, value, type, level)
Task: Retrieve id from branches with salary above the COUNT(amount) of transactions rows sharing the same code.
SQL: | SELECT id FROM branches AS agov
WHERE salary > (
SELECT COUNT(amount) FROM transactions AS gev
WHERE gev.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04085 | train |
v1 | Schema:
accounts (alias: jac)(value, code, id, date)
employees(name, status, date, level)
Task: Select salary from accounts where level exists in employees for the same level.
SQL: | SELECT salary FROM accounts AS jac
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04086 | train |
v3 | Schema:
departments (alias: dov)(value, level, amount, date)
shipments(value, date, name, level)
Task: Find value from departments where amount exceeds the average value from shipments for the same level.
SQL: | SELECT value FROM departments AS dov
WHERE amount > (
SELECT AVG(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": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04087 | train |
v2 | Schema:
departments (alias: dov)(name, id, level, code)
sales(code, value, status, id)
Task: Retrieve value from departments that have at least one corresponding entry in sales sharing the same status.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04088 | train |
v3 | Schema:
invoices (alias: fal)(level, code, salary, name)
accounts(amount, status, code, date)
Task: Retrieve salary from invoices with value above the AVG(amount) of accounts rows sharing the same type.
SQL: | SELECT salary FROM invoices AS fal
WHERE value > (
SELECT AVG(amount) FROM accounts AS jac
WHERE jac.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04089 | train |
v1 | Schema:
employees (alias: bev)(code, value, date, type)
customers(amount, date, status, id)
Task: Retrieve name from employees whose type is found in customers rows where code matches the outer record.
SQL: | SELECT name FROM employees AS bev
WHERE type IN (
SELECT type FROM customers AS lex
WHERE lex.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04090 | train |
v3 | Schema:
customers (alias: lex)(value, type, status, id)
products(name, salary, type, status)
Task: Find salary from customers where salary exceeds the minimum amount from products for the same type.
SQL: | SELECT salary FROM customers AS lex
WHERE salary > (
SELECT MIN(amount) FROM products AS nad
WHERE nad.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04091 | train |
v2 | Schema:
orders (alias: kab)(value, name, date, salary)
accounts(name, amount, status, salary)
Task: Find id from orders where a matching record exists in accounts with the same status.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04092 | train |
v3 | Schema:
branches (alias: agov)(code, name, salary, date)
schedules(date, level, id, code)
Task: Find code from branches where amount exceeds the minimum amount from schedules for the same id.
SQL: | SELECT code FROM branches AS agov
WHERE amount > (
SELECT MIN(amount) FROM schedules AS vmob
WHERE vmob.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "schedules",
"outer_alias": "agov",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04093 | train |
v1 | Schema:
tasks (alias: znob)(type, level, amount, id)
branches(type, date, value, name)
Task: Retrieve amount from tasks whose type is found in branches rows where status matches the outer record.
SQL: | SELECT amount FROM tasks AS znob
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "branches",
"outer_alias": "znob",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04094 | train |
v3 | Schema:
transactions (alias: gev)(salary, id, level, type)
shipments(value, amount, type, salary)
Task: Find name from transactions where amount exceeds the minimum amount from shipments for the same level.
SQL: | SELECT name FROM transactions AS gev
WHERE amount > (
SELECT MIN(amount) FROM shipments AS vnob
WHERE vnob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "shipments",
"outer_alias": "gev",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04095 | train |
v3 | Schema:
branches (alias: agov)(level, date, code, id)
staff(date, type, id, value)
Task: Find amount from branches where value exceeds the average amount from staff for the same status.
SQL: | SELECT amount FROM branches AS agov
WHERE value > (
SELECT AVG(amount) FROM staff AS xnob
WHERE xnob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "staff",
"outer_alias": "agov",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04096 | train |
v2 | Schema:
departments (alias: dov)(value, type, code, status)
schedules(code, salary, type, status)
Task: Find salary from departments where a matching record exists in schedules with the same id.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "schedules",
"outer_alias": "dov",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04097 | train |
v1 | Schema:
items (alias: ikob)(date, level, amount, status)
transactions(id, type, amount, date)
Task: Find id from items where code appears in transactions entries with matching level.
SQL: | SELECT id FROM items AS ikob
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "transactions",
"outer_alias": "ikob",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04098 | train |
v2 | Schema:
employees (alias: bev)(level, date, name, type)
tasks(code, amount, level, date)
Task: Find name from employees where a matching record exists in tasks with the same level.
SQL: | SELECT name FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "tasks",
"outer_alias": "bev",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04099 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.