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:
regions (alias: okiv)(type, date, status, value)
requests(code, type, id, amount)
Task: Retrieve value from regions whose type is found in requests rows where type matches the outer record.
SQL: | SELECT value FROM regions AS okiv
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "requests",
"outer_alias": "okiv",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08900 | train |
v3 | Schema:
regions (alias: okiv)(date, status, level, type)
staff(amount, id, name, status)
Task: Retrieve value from regions with value above the MAX(amount) of staff rows sharing the same level.
SQL: | SELECT value FROM regions AS okiv
WHERE value > (
SELECT MAX(amount) FROM staff AS xnob
WHERE xnob.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08901 | train |
v1 | Schema:
customers (alias: lex)(salary, amount, status, name)
items(code, level, value, salary)
Task: Retrieve value from customers whose level is found in items rows where status matches the outer record.
SQL: | SELECT value FROM customers AS lex
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08902 | train |
v3 | Schema:
items (alias: ikob)(level, name, code, id)
schedules(level, salary, date, type)
Task: Retrieve code from items with value above the COUNT(value) of schedules rows sharing the same code.
SQL: | SELECT code FROM items AS ikob
WHERE value > (
SELECT COUNT(value) FROM schedules AS vmob
WHERE vmob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_08903 | train |
v1 | Schema:
tasks (alias: znob)(code, type, value, status)
branches(date, status, amount, level)
Task: Retrieve name from tasks whose id is found in branches rows where status matches the outer record.
SQL: | SELECT name FROM tasks AS znob
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "branches",
"outer_alias": "znob",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08904 | train |
v1 | Schema:
categories (alias: egiv)(status, code, value, date)
requests(code, value, status, type)
Task: Find name from categories where status appears in requests entries with matching type.
SQL: | SELECT name FROM categories AS egiv
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08905 | train |
v2 | Schema:
tasks (alias: znob)(type, value, code, name)
employees(salary, type, level, status)
Task: Retrieve name from tasks that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT name FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08906 | train |
v2 | Schema:
branches (alias: agov)(name, amount, type, value)
accounts(status, salary, level, name)
Task: Retrieve id from branches that have at least one corresponding entry in accounts sharing the same code.
SQL: | SELECT id FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08907 | train |
v2 | Schema:
branches (alias: agov)(salary, id, code, level)
accounts(status, amount, code, id)
Task: Retrieve name from branches that have at least one corresponding entry in accounts sharing the same code.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08908 | train |
v1 | Schema:
staff (alias: xnob)(name, value, salary, status)
items(salary, status, code, date)
Task: Retrieve code from staff whose id is found in items rows where id matches the outer record.
SQL: | SELECT code FROM staff AS xnob
WHERE id IN (
SELECT id FROM items AS ikob
WHERE ikob.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "items",
"outer_alias": "xnob",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_08909 | train |
v1 | Schema:
requests (alias: ejof)(salary, id, code, level)
accounts(salary, type, date, amount)
Task: Select code from requests where id exists in accounts for the same code.
SQL: | SELECT code FROM requests AS ejof
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08910 | train |
v3 | Schema:
accounts (alias: jac)(amount, type, id, value)
requests(amount, id, name, code)
Task: Retrieve salary from accounts with value above the COUNT(amount) of requests rows sharing the same id.
SQL: | SELECT salary FROM accounts AS jac
WHERE value > (
SELECT COUNT(amount) FROM requests AS ejof
WHERE ejof.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "requests",
"outer_alias": "jac",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08911 | train |
v3 | Schema:
accounts (alias: jac)(status, amount, code, type)
invoices(value, date, salary, code)
Task: Retrieve salary from accounts with amount above the AVG(value) of invoices rows sharing the same level.
SQL: | SELECT salary FROM accounts AS jac
WHERE amount > (
SELECT AVG(value) FROM invoices AS fal
WHERE fal.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08912 | train |
v3 | Schema:
managers (alias: hac)(name, status, date, id)
staff(code, amount, type, date)
Task: Retrieve code from managers with value above the MAX(salary) of staff rows sharing the same id.
SQL: | SELECT code FROM managers AS hac
WHERE value > (
SELECT MAX(salary) FROM staff AS xnob
WHERE xnob.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "hac",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08913 | train |
v3 | Schema:
items (alias: ikob)(status, salary, type, value)
projects(date, type, status, name)
Task: Find code from items where value exceeds the maximum salary from projects for the same status.
SQL: | SELECT code FROM items AS ikob
WHERE value > (
SELECT MAX(salary) FROM projects AS uliv
WHERE uliv.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "code",
"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_08914 | train |
v1 | Schema:
managers (alias: hac)(name, type, level, value)
tasks(name, type, id, level)
Task: Find value from managers where type appears in tasks entries with matching id.
SQL: | SELECT value FROM managers AS hac
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08915 | train |
v1 | Schema:
employees (alias: bev)(date, level, type, value)
requests(amount, id, code, date)
Task: Find salary from employees where code appears in requests entries with matching code.
SQL: | SELECT salary FROM employees AS bev
WHERE code IN (
SELECT code FROM requests AS ejof
WHERE ejof.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "requests",
"outer_alias": "bev",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08916 | train |
v3 | Schema:
projects (alias: uliv)(code, amount, id, name)
categories(name, date, level, id)
Task: Retrieve value from projects with salary above the MIN(value) of categories rows sharing the same id.
SQL: | SELECT value FROM projects AS uliv
WHERE salary > (
SELECT MIN(value) FROM categories AS egiv
WHERE egiv.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08917 | train |
v1 | Schema:
products (alias: nad)(id, name, date, status)
customers(name, date, code, salary)
Task: Find salary from products where status appears in customers entries with matching type.
SQL: | SELECT salary FROM products AS nad
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.type = nad.type
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08918 | train |
v2 | Schema:
departments (alias: dov)(salary, level, id, amount)
tasks(code, amount, id, status)
Task: Retrieve salary from departments that have at least one corresponding entry in tasks sharing 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_08919 | train |
v1 | Schema:
invoices (alias: fal)(level, amount, status, date)
customers(status, salary, level, type)
Task: Find id from invoices where id appears in customers entries with matching id.
SQL: | SELECT id FROM invoices AS fal
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08920 | train |
v3 | Schema:
requests (alias: ejof)(level, amount, value, type)
regions(salary, value, name, code)
Task: Find value from requests where salary exceeds the minimum amount from regions for the same status.
SQL: | SELECT value FROM requests AS ejof
WHERE salary > (
SELECT MIN(amount) FROM regions AS okiv
WHERE okiv.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "regions",
"outer_alias": "ejof",
"inner_alias": "okiv",
"proj_col": "value",
"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_08921 | train |
v1 | Schema:
managers (alias: hac)(salary, date, id, amount)
staff(type, status, salary, code)
Task: Retrieve salary from managers whose id is found in staff rows where level matches the outer record.
SQL: | SELECT salary FROM managers AS hac
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "hac",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08922 | train |
v1 | Schema:
transactions (alias: gev)(value, date, status, amount)
orders(level, date, type, status)
Task: Retrieve salary from transactions whose status is found in orders rows where status matches the outer record.
SQL: | SELECT salary FROM transactions AS gev
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08923 | train |
v2 | Schema:
products (alias: nad)(type, code, value, status)
customers(salary, id, status, amount)
Task: Retrieve code from products that have at least one corresponding entry in customers sharing the same status.
SQL: | SELECT code FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = nad.status
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08924 | train |
v2 | Schema:
invoices (alias: fal)(salary, level, name, code)
staff(type, status, amount, date)
Task: Retrieve id from invoices that have at least one corresponding entry in staff sharing the same level.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08925 | train |
v3 | Schema:
requests (alias: ejof)(id, name, amount, type)
transactions(code, date, value, level)
Task: Retrieve name from requests with amount above the MIN(value) of transactions rows sharing the same type.
SQL: | SELECT name FROM requests AS ejof
WHERE amount > (
SELECT MIN(value) FROM transactions AS gev
WHERE gev.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "transactions",
"outer_alias": "ejof",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08926 | train |
v2 | Schema:
regions (alias: okiv)(salary, amount, value, date)
schedules(salary, status, date, value)
Task: Retrieve name from regions that have at least one corresponding entry in schedules sharing the same code.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "schedules",
"outer_alias": "okiv",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08927 | train |
v2 | Schema:
employees (alias: bev)(date, status, type, level)
staff(type, status, date, salary)
Task: Find name from employees where a matching record exists in staff with the same id.
SQL: | SELECT name FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "staff",
"outer_alias": "bev",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08928 | train |
v1 | Schema:
branches (alias: agov)(date, value, name, salary)
transactions(salary, type, code, status)
Task: Retrieve id from branches whose code is found in transactions rows where code matches the outer record.
SQL: | SELECT id FROM branches AS agov
WHERE code IN (
SELECT code 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": "code",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08929 | train |
v3 | Schema:
items (alias: ikob)(salary, status, code, name)
schedules(type, salary, date, level)
Task: Find amount from items where value exceeds the average amount from schedules for the same id.
SQL: | SELECT amount FROM items AS ikob
WHERE value > (
SELECT AVG(amount) FROM schedules AS vmob
WHERE vmob.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_08930 | train |
v1 | Schema:
shipments (alias: vnob)(code, name, salary, value)
invoices(id, amount, level, code)
Task: Retrieve id from shipments whose type is found in invoices rows where id matches the outer record.
SQL: | SELECT id FROM shipments AS vnob
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "invoices",
"outer_alias": "vnob",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08931 | train |
v3 | Schema:
sales (alias: cif)(type, value, id, status)
accounts(name, level, id, date)
Task: Find code from sales where value exceeds the total amount from accounts for the same code.
SQL: | SELECT code FROM sales AS cif
WHERE value > (
SELECT SUM(amount) FROM accounts AS jac
WHERE jac.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "accounts",
"outer_alias": "cif",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08932 | train |
v3 | Schema:
categories (alias: egiv)(salary, status, name, date)
staff(date, id, salary, type)
Task: Find salary from categories where salary exceeds the average amount from staff for the same status.
SQL: | SELECT salary FROM categories AS egiv
WHERE salary > (
SELECT AVG(amount) FROM staff AS xnob
WHERE xnob.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "egiv",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08933 | train |
v3 | Schema:
categories (alias: egiv)(status, level, value, id)
branches(level, id, date, value)
Task: Retrieve value from categories with amount above the SUM(salary) of branches rows sharing the same code.
SQL: | SELECT value FROM categories AS egiv
WHERE amount > (
SELECT SUM(salary) FROM branches AS agov
WHERE agov.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08934 | train |
v2 | Schema:
sales (alias: cif)(status, amount, value, level)
transactions(date, level, status, id)
Task: Find salary from sales where a matching record exists in transactions with the same code.
SQL: | SELECT salary FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08935 | train |
v3 | Schema:
customers (alias: lex)(code, status, type, value)
schedules(status, level, salary, code)
Task: Retrieve code from customers with value above the COUNT(value) of schedules rows sharing the same level.
SQL: | SELECT code FROM customers AS lex
WHERE value > (
SELECT COUNT(value) FROM schedules AS vmob
WHERE vmob.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08936 | train |
v1 | Schema:
shipments (alias: vnob)(amount, name, id, date)
customers(name, salary, type, status)
Task: Select code from shipments where status exists in customers for the same status.
SQL: | SELECT code FROM shipments AS vnob
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08937 | train |
v1 | Schema:
schedules (alias: vmob)(date, id, amount, status)
accounts(date, code, amount, status)
Task: Select id from schedules where code exists in accounts for the same id.
SQL: | SELECT id FROM schedules AS vmob
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08938 | train |
v1 | Schema:
shipments (alias: vnob)(value, type, amount, id)
staff(date, amount, level, status)
Task: Select salary from shipments where id exists in staff for the same code.
SQL: | SELECT salary FROM shipments AS vnob
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "vnob",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08939 | train |
v2 | Schema:
schedules (alias: vmob)(amount, id, date, code)
sales(salary, value, status, id)
Task: Retrieve name from schedules that have at least one corresponding entry in sales sharing the same id.
SQL: | SELECT name FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08940 | train |
v1 | Schema:
sales (alias: cif)(salary, level, type, id)
employees(amount, id, code, name)
Task: Retrieve salary from sales whose id is found in employees rows where level matches the outer record.
SQL: | SELECT salary FROM sales AS cif
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "employees",
"outer_alias": "cif",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08941 | train |
v2 | Schema:
transactions (alias: gev)(type, name, level, code)
products(level, code, date, status)
Task: Find id from transactions where a matching record exists in products with the same code.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "gev",
"inner_alias": "nad",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08942 | train |
v3 | Schema:
invoices (alias: fal)(level, type, id, salary)
sales(salary, type, id, date)
Task: Retrieve id from invoices with amount above the SUM(amount) of sales rows sharing the same type.
SQL: | SELECT id FROM invoices AS fal
WHERE amount > (
SELECT SUM(amount) FROM sales AS cif
WHERE cif.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "sales",
"outer_alias": "fal",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08943 | train |
v3 | Schema:
shipments (alias: vnob)(name, date, level, type)
sales(code, status, amount, name)
Task: Retrieve name from shipments with value above the MIN(amount) of sales rows sharing the same type.
SQL: | SELECT name FROM shipments AS vnob
WHERE value > (
SELECT MIN(amount) FROM sales AS cif
WHERE cif.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08944 | train |
v1 | Schema:
invoices (alias: fal)(value, name, type, level)
accounts(level, date, id, amount)
Task: Retrieve salary from invoices whose id is found in accounts rows where level matches the outer record.
SQL: | SELECT salary FROM invoices AS fal
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08945 | train |
v3 | Schema:
regions (alias: okiv)(amount, level, type, status)
sales(salary, date, amount, status)
Task: Retrieve code from regions with value above the AVG(value) of sales rows sharing the same type.
SQL: | SELECT code FROM regions AS okiv
WHERE value > (
SELECT AVG(value) FROM sales AS cif
WHERE cif.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08946 | train |
v2 | Schema:
accounts (alias: jac)(level, date, value, id)
requests(amount, salary, id, level)
Task: Find code from accounts where a matching record exists in requests with the same id.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "requests",
"outer_alias": "jac",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08947 | train |
v3 | Schema:
products (alias: nad)(id, salary, amount, date)
employees(code, status, date, amount)
Task: Retrieve salary from products with amount above the COUNT(salary) of employees rows sharing the same level.
SQL: | SELECT salary FROM products AS nad
WHERE amount > (
SELECT COUNT(salary) FROM employees AS bev
WHERE bev.level = nad.level
); | {
"outer_table": "products",
"inner_table": "employees",
"outer_alias": "nad",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08948 | train |
v2 | Schema:
managers (alias: hac)(status, code, salary, type)
employees(name, id, type, status)
Task: Retrieve id from managers that have at least one corresponding entry in employees sharing the same status.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08949 | train |
v3 | Schema:
categories (alias: egiv)(salary, level, type, value)
customers(type, level, name, id)
Task: Retrieve code from categories with value above the SUM(value) of customers rows sharing the same level.
SQL: | SELECT code FROM categories AS egiv
WHERE value > (
SELECT SUM(value) FROM customers AS lex
WHERE lex.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "customers",
"outer_alias": "egiv",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08950 | train |
v1 | Schema:
accounts (alias: jac)(date, level, name, value)
orders(date, salary, level, type)
Task: Select value from accounts where status exists in orders for the same status.
SQL: | SELECT value FROM accounts AS jac
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "orders",
"outer_alias": "jac",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08951 | train |
v3 | Schema:
accounts (alias: jac)(value, salary, name, level)
schedules(id, status, value, name)
Task: Find amount from accounts where salary exceeds the total value from schedules for the same type.
SQL: | SELECT amount FROM accounts AS jac
WHERE salary > (
SELECT SUM(value) FROM schedules AS vmob
WHERE vmob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08952 | train |
v2 | Schema:
schedules (alias: vmob)(status, type, date, salary)
accounts(amount, code, value, salary)
Task: Retrieve value from schedules that have at least one corresponding entry in accounts sharing the same code.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08953 | train |
v3 | Schema:
orders (alias: kab)(status, id, type, amount)
schedules(id, status, name, amount)
Task: Retrieve amount from orders with amount above the MIN(salary) of schedules rows sharing the same type.
SQL: | SELECT amount FROM orders AS kab
WHERE amount > (
SELECT MIN(salary) FROM schedules AS vmob
WHERE vmob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08954 | train |
v2 | Schema:
tasks (alias: znob)(date, status, salary, value)
staff(date, id, type, value)
Task: Find id from tasks where a matching record exists in staff with the same type.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08955 | train |
v2 | Schema:
shipments (alias: vnob)(amount, name, salary, level)
staff(id, code, value, date)
Task: Retrieve salary from shipments that have at least one corresponding entry in staff sharing the same level.
SQL: | SELECT salary 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": "salary",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08956 | train |
v1 | Schema:
shipments (alias: vnob)(name, code, value, status)
transactions(value, date, name, salary)
Task: Retrieve code from shipments whose code is found in transactions rows where id matches the outer record.
SQL: | SELECT code FROM shipments AS vnob
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08957 | train |
v3 | Schema:
customers (alias: lex)(amount, code, id, status)
managers(value, date, name, type)
Task: Retrieve code from customers with salary above the SUM(amount) of managers rows sharing the same type.
SQL: | SELECT code FROM customers AS lex
WHERE salary > (
SELECT SUM(amount) FROM managers AS hac
WHERE hac.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08958 | train |
v3 | Schema:
orders (alias: kab)(status, amount, name, type)
categories(status, name, id, amount)
Task: Find amount from orders where salary exceeds the minimum amount from categories for the same code.
SQL: | SELECT amount FROM orders AS kab
WHERE salary > (
SELECT MIN(amount) FROM categories AS egiv
WHERE egiv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08959 | train |
v2 | Schema:
categories (alias: egiv)(date, id, status, amount)
orders(level, value, amount, status)
Task: Retrieve salary from categories that have at least one corresponding entry in orders sharing the same level.
SQL: | SELECT salary 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": "salary",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_08960 | train |
v2 | Schema:
shipments (alias: vnob)(code, value, salary, amount)
schedules(id, date, name, type)
Task: Retrieve name from shipments that have at least one corresponding entry in schedules sharing the same id.
SQL: | SELECT name FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08961 | train |
v3 | Schema:
shipments (alias: vnob)(name, level, status, salary)
tasks(code, level, date, id)
Task: Find code from shipments where value exceeds the average salary from tasks for the same status.
SQL: | SELECT code FROM shipments AS vnob
WHERE value > (
SELECT AVG(salary) FROM tasks AS znob
WHERE znob.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "tasks",
"outer_alias": "vnob",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08962 | train |
v3 | Schema:
customers (alias: lex)(id, amount, salary, date)
requests(value, status, id, level)
Task: Find value from customers where amount exceeds the maximum salary from requests for the same id.
SQL: | SELECT value FROM customers AS lex
WHERE amount > (
SELECT MAX(salary) FROM requests AS ejof
WHERE ejof.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "lex",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08963 | train |
v2 | Schema:
orders (alias: kab)(name, code, level, date)
products(level, name, salary, id)
Task: Retrieve code from orders that have at least one corresponding entry in products sharing the same level.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08964 | train |
v1 | Schema:
managers (alias: hac)(date, name, code, level)
tasks(salary, status, level, value)
Task: Find code from managers where code appears in tasks entries with matching type.
SQL: | SELECT code FROM managers AS hac
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08965 | train |
v2 | Schema:
schedules (alias: vmob)(amount, value, type, date)
accounts(value, salary, name, type)
Task: Find name from schedules where a matching record exists in accounts with the same status.
SQL: | SELECT name 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": "name",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08966 | train |
v2 | Schema:
shipments (alias: vnob)(date, amount, salary, value)
accounts(status, id, name, type)
Task: Find salary from shipments where a matching record exists in accounts with the same code.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08967 | train |
v2 | Schema:
sales (alias: cif)(status, id, date, type)
schedules(value, level, id, salary)
Task: Retrieve code from sales that have at least one corresponding entry in schedules sharing the same id.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "schedules",
"outer_alias": "cif",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08968 | train |
v2 | Schema:
regions (alias: okiv)(code, value, salary, date)
branches(value, date, amount, salary)
Task: Find name from regions where a matching record exists in branches with the same status.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "branches",
"outer_alias": "okiv",
"inner_alias": "agov",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08969 | train |
v2 | Schema:
accounts (alias: jac)(name, id, amount, value)
branches(name, date, type, code)
Task: Retrieve amount from accounts that have at least one corresponding entry in branches sharing the same status.
SQL: | SELECT amount FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "branches",
"outer_alias": "jac",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08970 | train |
v3 | Schema:
departments (alias: dov)(date, name, value, code)
sales(status, code, value, amount)
Task: Retrieve salary from departments with salary above the MIN(amount) of sales rows sharing the same status.
SQL: | SELECT salary FROM departments AS dov
WHERE salary > (
SELECT MIN(amount) FROM sales AS cif
WHERE cif.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08971 | train |
v1 | Schema:
regions (alias: okiv)(date, name, value, id)
shipments(salary, code, type, amount)
Task: Select name from regions where code exists in shipments for the same id.
SQL: | SELECT name FROM regions AS okiv
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "shipments",
"outer_alias": "okiv",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_08972 | train |
v1 | Schema:
orders (alias: kab)(status, name, id, salary)
sales(code, name, status, amount)
Task: Retrieve amount from orders whose type is found in sales rows where code matches the outer record.
SQL: | SELECT amount FROM orders AS kab
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "sales",
"outer_alias": "kab",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08973 | train |
v1 | Schema:
tasks (alias: znob)(salary, status, amount, code)
projects(name, value, id, salary)
Task: Find value from tasks where id appears in projects entries with matching type.
SQL: | SELECT value FROM tasks AS znob
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "projects",
"outer_alias": "znob",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08974 | train |
v3 | Schema:
invoices (alias: fal)(date, level, value, salary)
transactions(type, status, id, value)
Task: Find code from invoices where salary exceeds the minimum salary from transactions for the same type.
SQL: | SELECT code FROM invoices AS fal
WHERE salary > (
SELECT MIN(salary) FROM transactions AS gev
WHERE gev.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08975 | train |
v3 | Schema:
accounts (alias: jac)(status, value, code, id)
regions(salary, status, name, value)
Task: Find value from accounts where value exceeds the count of salary from regions for the same code.
SQL: | SELECT value FROM accounts AS jac
WHERE value > (
SELECT COUNT(salary) FROM regions AS okiv
WHERE okiv.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08976 | train |
v1 | Schema:
transactions (alias: gev)(level, amount, id, salary)
staff(date, amount, name, id)
Task: Retrieve code from transactions whose type is found in staff rows where id matches the outer record.
SQL: | SELECT code FROM transactions AS gev
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08977 | train |
v3 | Schema:
projects (alias: uliv)(date, salary, name, status)
staff(id, value, amount, status)
Task: Find amount from projects where value exceeds the total value from staff for the same level.
SQL: | SELECT amount FROM projects AS uliv
WHERE value > (
SELECT SUM(value) FROM staff AS xnob
WHERE xnob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08978 | train |
v2 | Schema:
invoices (alias: fal)(name, type, level, date)
orders(amount, id, type, level)
Task: Retrieve id from invoices that have at least one corresponding entry in orders sharing the same status.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08979 | train |
v3 | Schema:
invoices (alias: fal)(status, salary, name, amount)
managers(value, name, salary, date)
Task: Find salary from invoices where amount exceeds the maximum value from managers for the same level.
SQL: | SELECT salary FROM invoices AS fal
WHERE amount > (
SELECT MAX(value) FROM managers AS hac
WHERE hac.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "managers",
"outer_alias": "fal",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08980 | train |
v1 | Schema:
branches (alias: agov)(status, name, value, id)
staff(level, salary, value, type)
Task: Find amount from branches where code appears in staff entries with matching type.
SQL: | SELECT amount FROM branches AS agov
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "staff",
"outer_alias": "agov",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_08981 | train |
v2 | Schema:
employees (alias: bev)(type, code, id, salary)
orders(status, date, value, type)
Task: Find id from employees where a matching record exists in orders with the same level.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08982 | train |
v3 | Schema:
accounts (alias: jac)(level, salary, type, id)
shipments(value, amount, id, name)
Task: Retrieve code from accounts with value above the MIN(amount) of shipments rows sharing the same level.
SQL: | SELECT code FROM accounts AS jac
WHERE value > (
SELECT MIN(amount) FROM shipments AS vnob
WHERE vnob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "shipments",
"outer_alias": "jac",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08983 | train |
v2 | Schema:
transactions (alias: gev)(code, status, type, value)
shipments(level, id, date, value)
Task: Find code from transactions where a matching record exists in shipments with the same level.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "shipments",
"outer_alias": "gev",
"inner_alias": "vnob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08984 | train |
v3 | Schema:
shipments (alias: vnob)(id, level, date, value)
orders(id, name, value, status)
Task: Retrieve salary from shipments with amount above the MAX(value) of orders rows sharing the same status.
SQL: | SELECT salary FROM shipments AS vnob
WHERE amount > (
SELECT MAX(value) FROM orders AS kab
WHERE kab.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08985 | train |
v3 | Schema:
shipments (alias: vnob)(salary, status, id, amount)
branches(amount, level, type, name)
Task: Retrieve value from shipments with value above the AVG(value) of branches rows sharing the same id.
SQL: | SELECT value FROM shipments AS vnob
WHERE value > (
SELECT AVG(value) FROM branches AS agov
WHERE agov.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "branches",
"outer_alias": "vnob",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08986 | train |
v1 | Schema:
customers (alias: lex)(status, salary, id, date)
projects(level, type, value, id)
Task: Retrieve amount from customers whose level is found in projects rows where status matches the outer record.
SQL: | SELECT amount FROM customers AS lex
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08987 | train |
v3 | Schema:
tasks (alias: znob)(status, code, type, name)
invoices(date, id, type, salary)
Task: Retrieve salary from tasks with amount above the MIN(amount) of invoices rows sharing the same type.
SQL: | SELECT salary FROM tasks AS znob
WHERE amount > (
SELECT MIN(amount) FROM invoices AS fal
WHERE fal.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08988 | train |
v3 | Schema:
projects (alias: uliv)(amount, id, type, status)
shipments(name, level, salary, date)
Task: Find code from projects where salary exceeds the maximum amount from shipments for the same code.
SQL: | SELECT code FROM projects AS uliv
WHERE salary > (
SELECT MAX(amount) FROM shipments AS vnob
WHERE vnob.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "shipments",
"outer_alias": "uliv",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08989 | train |
v3 | Schema:
schedules (alias: vmob)(amount, type, status, code)
products(salary, code, date, level)
Task: Retrieve value from schedules with amount above the MIN(amount) of products rows sharing the same type.
SQL: | SELECT value FROM schedules AS vmob
WHERE amount > (
SELECT MIN(amount) FROM products AS nad
WHERE nad.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "products",
"outer_alias": "vmob",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_08990 | train |
v2 | Schema:
requests (alias: ejof)(salary, status, type, date)
accounts(name, date, amount, status)
Task: Find salary from requests where a matching record exists in accounts with the same level.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_08991 | train |
v3 | Schema:
tasks (alias: znob)(amount, value, name, salary)
requests(date, id, type, code)
Task: Retrieve name from tasks with value above the MIN(value) of requests rows sharing the same id.
SQL: | SELECT name FROM tasks AS znob
WHERE value > (
SELECT MIN(value) FROM requests AS ejof
WHERE ejof.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_08992 | train |
v3 | Schema:
customers (alias: lex)(type, status, code, salary)
requests(type, id, status, level)
Task: Retrieve name from customers with amount above the MAX(value) of requests rows sharing the same status.
SQL: | SELECT name FROM customers AS lex
WHERE amount > (
SELECT MAX(value) FROM requests AS ejof
WHERE ejof.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "lex",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08993 | train |
v2 | Schema:
customers (alias: lex)(amount, id, code, value)
products(id, date, type, salary)
Task: Find code from customers where a matching record exists in products with the same id.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08994 | train |
v1 | Schema:
projects (alias: uliv)(name, level, amount, value)
sales(id, type, date, name)
Task: Retrieve salary from projects whose level is found in sales rows where level matches the outer record.
SQL: | SELECT salary FROM projects AS uliv
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_08995 | train |
v3 | Schema:
customers (alias: lex)(salary, status, value, date)
transactions(amount, type, name, date)
Task: Find value from customers where salary exceeds the minimum amount from transactions for the same level.
SQL: | SELECT value FROM customers AS lex
WHERE salary > (
SELECT MIN(amount) FROM transactions AS gev
WHERE gev.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "transactions",
"outer_alias": "lex",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08996 | train |
v1 | Schema:
shipments (alias: vnob)(level, type, name, code)
staff(value, status, amount, name)
Task: Find amount from shipments where status appears in staff entries with matching id.
SQL: | SELECT amount FROM shipments AS vnob
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "vnob",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_08997 | train |
v3 | Schema:
products (alias: nad)(code, type, id, amount)
accounts(amount, code, value, date)
Task: Retrieve name from products with amount above the SUM(amount) of accounts rows sharing the same status.
SQL: | SELECT name FROM products AS nad
WHERE amount > (
SELECT SUM(amount) FROM accounts AS jac
WHERE jac.status = nad.status
); | {
"outer_table": "products",
"inner_table": "accounts",
"outer_alias": "nad",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08998 | train |
v3 | Schema:
departments (alias: dov)(id, type, value, level)
schedules(salary, type, id, level)
Task: Find value from departments where salary exceeds the maximum amount from schedules for the same type.
SQL: | SELECT value FROM departments AS dov
WHERE salary > (
SELECT MAX(amount) FROM schedules AS vmob
WHERE vmob.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "schedules",
"outer_alias": "dov",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_08999 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.