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 |
|---|---|---|---|---|---|---|
v2 | Schema:
products (alias: nad)(name, salary, code, id)
employees(status, level, code, id)
Task: Find amount from products where a matching record exists in employees with the same type.
SQL: | SELECT amount FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = nad.type
); | {
"outer_table": "products",
"inner_table": "employees",
"outer_alias": "nad",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09900 | train |
v3 | Schema:
items (alias: ikob)(id, status, name, value)
products(date, code, name, value)
Task: Find amount from items where salary exceeds the count of salary from products for the same level.
SQL: | SELECT amount FROM items AS ikob
WHERE salary > (
SELECT COUNT(salary) FROM products AS nad
WHERE nad.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09901 | train |
v3 | Schema:
products (alias: nad)(status, salary, id, code)
tasks(id, level, value, code)
Task: Retrieve salary from products with amount above the MAX(amount) of tasks rows sharing the same code.
SQL: | SELECT salary FROM products AS nad
WHERE amount > (
SELECT MAX(amount) FROM tasks AS znob
WHERE znob.code = nad.code
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "nad",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09902 | train |
v1 | Schema:
managers (alias: hac)(value, code, type, salary)
invoices(date, value, level, name)
Task: Select name from managers where id exists in invoices for the same id.
SQL: | SELECT name FROM managers AS hac
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09903 | train |
v1 | Schema:
orders (alias: kab)(id, status, amount, level)
accounts(status, salary, id, type)
Task: Retrieve code from orders whose level is found in accounts rows where status matches the outer record.
SQL: | SELECT code FROM orders AS kab
WHERE level IN (
SELECT level FROM accounts AS jac
WHERE jac.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09904 | train |
v2 | Schema:
tasks (alias: znob)(value, code, name, level)
items(amount, level, id, salary)
Task: Find value from tasks where a matching record exists in items with the same level.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "items",
"outer_alias": "znob",
"inner_alias": "ikob",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09905 | train |
v1 | Schema:
transactions (alias: gev)(amount, code, value, type)
accounts(level, code, status, salary)
Task: Retrieve code from transactions whose status is found in accounts rows where code matches the outer record.
SQL: | SELECT code FROM transactions AS gev
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "accounts",
"outer_alias": "gev",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09906 | train |
v1 | Schema:
branches (alias: agov)(date, status, code, salary)
projects(salary, value, date, level)
Task: Retrieve id from branches whose type is found in projects rows where level matches the outer record.
SQL: | SELECT id FROM branches AS agov
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "projects",
"outer_alias": "agov",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09907 | train |
v1 | Schema:
departments (alias: dov)(type, level, value, id)
managers(code, date, type, value)
Task: Select name from departments where level exists in managers for the same level.
SQL: | SELECT name FROM departments AS dov
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09908 | train |
v2 | Schema:
departments (alias: dov)(amount, status, value, date)
schedules(level, name, status, type)
Task: Retrieve amount from departments that have at least one corresponding entry in schedules sharing the same type.
SQL: | SELECT amount FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "schedules",
"outer_alias": "dov",
"inner_alias": "vmob",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09909 | train |
v1 | Schema:
items (alias: ikob)(amount, type, code, date)
invoices(amount, status, date, value)
Task: Select value from items where id exists in invoices for the same code.
SQL: | SELECT value FROM items AS ikob
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "invoices",
"outer_alias": "ikob",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09910 | train |
v1 | Schema:
tasks (alias: znob)(salary, value, amount, name)
branches(amount, status, type, level)
Task: Select salary from tasks where id exists in branches for the same level.
SQL: | SELECT salary FROM tasks AS znob
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "branches",
"outer_alias": "znob",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09911 | train |
v3 | Schema:
items (alias: ikob)(type, date, amount, code)
employees(status, type, code, level)
Task: Retrieve salary from items with value above the COUNT(salary) of employees rows sharing the same status.
SQL: | SELECT salary FROM items AS ikob
WHERE value > (
SELECT COUNT(salary) FROM employees AS bev
WHERE bev.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "ikob",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09912 | train |
v2 | Schema:
orders (alias: kab)(code, id, type, amount)
invoices(date, amount, name, salary)
Task: Retrieve name from orders that have at least one corresponding entry in invoices sharing the same status.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09913 | train |
v3 | Schema:
orders (alias: kab)(amount, code, salary, id)
invoices(code, value, level, date)
Task: Find id from orders where salary exceeds the minimum amount from invoices for the same id.
SQL: | SELECT id FROM orders AS kab
WHERE salary > (
SELECT MIN(amount) FROM invoices AS fal
WHERE fal.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09914 | train |
v3 | Schema:
regions (alias: okiv)(status, value, amount, salary)
sales(value, status, id, amount)
Task: Find salary from regions where amount exceeds the average value from sales for the same code.
SQL: | SELECT salary FROM regions AS okiv
WHERE amount > (
SELECT AVG(value) FROM sales AS cif
WHERE cif.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09915 | train |
v3 | Schema:
branches (alias: agov)(date, status, id, salary)
shipments(salary, status, value, name)
Task: Retrieve code from branches with value above the MIN(salary) of shipments rows sharing the same code.
SQL: | SELECT code FROM branches AS agov
WHERE value > (
SELECT MIN(salary) FROM shipments AS vnob
WHERE vnob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09916 | train |
v1 | Schema:
shipments (alias: vnob)(level, status, salary, date)
invoices(name, level, amount, status)
Task: Find value from shipments where status appears in invoices entries with matching status.
SQL: | SELECT value FROM shipments AS vnob
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "invoices",
"outer_alias": "vnob",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09917 | train |
v3 | Schema:
customers (alias: lex)(date, code, amount, value)
branches(code, id, value, date)
Task: Find value from customers where value exceeds the minimum salary from branches for the same code.
SQL: | SELECT value FROM customers AS lex
WHERE value > (
SELECT MIN(salary) FROM branches AS agov
WHERE agov.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09918 | train |
v2 | Schema:
customers (alias: lex)(level, salary, id, value)
staff(amount, code, salary, id)
Task: Find id from customers where a matching record exists in staff with the same code.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "xnob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09919 | train |
v2 | Schema:
departments (alias: dov)(value, id, type, amount)
categories(level, date, amount, salary)
Task: Retrieve salary from departments that have at least one corresponding entry in categories sharing the same id.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09920 | train |
v3 | Schema:
invoices (alias: fal)(status, type, level, value)
accounts(date, level, code, type)
Task: Find value from invoices where salary exceeds the minimum amount from accounts for the same status.
SQL: | SELECT value FROM invoices AS fal
WHERE salary > (
SELECT MIN(amount) FROM accounts AS jac
WHERE jac.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09921 | train |
v3 | Schema:
orders (alias: kab)(level, salary, value, type)
shipments(type, code, value, date)
Task: Find value from orders where value exceeds the count of amount from shipments for the same code.
SQL: | SELECT value FROM orders AS kab
WHERE value > (
SELECT COUNT(amount) FROM shipments AS vnob
WHERE vnob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09922 | train |
v3 | Schema:
projects (alias: uliv)(name, amount, id, status)
schedules(amount, code, id, value)
Task: Retrieve code from projects with amount above the MIN(value) of schedules rows sharing the same id.
SQL: | SELECT code FROM projects AS uliv
WHERE amount > (
SELECT MIN(value) FROM schedules AS vmob
WHERE vmob.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "schedules",
"outer_alias": "uliv",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09923 | train |
v3 | Schema:
customers (alias: lex)(type, name, salary, date)
sales(level, value, salary, id)
Task: Retrieve code from customers with salary above the AVG(salary) of sales rows sharing the same id.
SQL: | SELECT code FROM customers AS lex
WHERE salary > (
SELECT AVG(salary) FROM sales AS cif
WHERE cif.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09924 | train |
v1 | Schema:
staff (alias: xnob)(amount, date, status, level)
shipments(code, salary, date, level)
Task: Select name from staff where type exists in shipments for the same code.
SQL: | SELECT name FROM staff AS xnob
WHERE type IN (
SELECT type FROM shipments AS vnob
WHERE vnob.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "xnob",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09925 | train |
v3 | Schema:
staff (alias: xnob)(status, amount, value, salary)
categories(type, id, name, salary)
Task: Retrieve code from staff with value above the AVG(salary) of categories rows sharing the same code.
SQL: | SELECT code FROM staff AS xnob
WHERE value > (
SELECT AVG(salary) FROM categories AS egiv
WHERE egiv.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09926 | train |
v2 | Schema:
projects (alias: uliv)(status, salary, code, date)
sales(name, type, status, salary)
Task: Find id from projects where a matching record exists in sales with the same status.
SQL: | SELECT id FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09927 | train |
v2 | Schema:
orders (alias: kab)(code, status, value, id)
accounts(salary, name, code, date)
Task: Retrieve code from orders that have at least one corresponding entry in accounts sharing the same id.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09928 | train |
v1 | Schema:
invoices (alias: fal)(salary, type, amount, level)
transactions(id, name, level, value)
Task: Find id from invoices where level appears in transactions entries with matching level.
SQL: | SELECT id FROM invoices AS fal
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09929 | train |
v3 | Schema:
schedules (alias: vmob)(level, date, type, name)
departments(salary, status, level, id)
Task: Retrieve code from schedules with salary above the MIN(amount) of departments rows sharing the same level.
SQL: | SELECT code FROM schedules AS vmob
WHERE salary > (
SELECT MIN(amount) FROM departments AS dov
WHERE dov.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "vmob",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09930 | train |
v1 | Schema:
orders (alias: kab)(salary, code, level, name)
branches(code, value, id, amount)
Task: Retrieve value from orders whose type is found in branches rows where id matches the outer record.
SQL: | SELECT value FROM orders AS kab
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09931 | train |
v3 | Schema:
branches (alias: agov)(value, salary, code, name)
managers(amount, salary, name, status)
Task: Retrieve value from branches with salary above the MIN(amount) of managers rows sharing the same status.
SQL: | SELECT value FROM branches AS agov
WHERE salary > (
SELECT MIN(amount) FROM managers AS hac
WHERE hac.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09932 | train |
v1 | Schema:
orders (alias: kab)(id, salary, value, code)
invoices(type, value, code, level)
Task: Find code from orders where code appears in invoices entries with matching id.
SQL: | SELECT code FROM orders AS kab
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09933 | train |
v1 | Schema:
branches (alias: agov)(date, name, status, level)
regions(amount, level, date, name)
Task: Select value from branches where type exists in regions for the same id.
SQL: | SELECT value FROM branches AS agov
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09934 | train |
v2 | Schema:
schedules (alias: vmob)(id, value, salary, status)
staff(amount, status, type, value)
Task: Retrieve code from schedules that have at least one corresponding entry in staff sharing the same type.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "staff",
"outer_alias": "vmob",
"inner_alias": "xnob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09935 | train |
v2 | Schema:
transactions (alias: gev)(salary, name, id, date)
managers(level, salary, date, status)
Task: Retrieve value from transactions that have at least one corresponding entry in managers sharing the same id.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "managers",
"outer_alias": "gev",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09936 | train |
v1 | Schema:
customers (alias: lex)(id, amount, salary, code)
tasks(amount, status, code, value)
Task: Select id from customers where code exists in tasks for the same status.
SQL: | SELECT id FROM customers AS lex
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "tasks",
"outer_alias": "lex",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09937 | train |
v2 | Schema:
tasks (alias: znob)(level, status, code, value)
transactions(value, salary, type, status)
Task: Find id from tasks where a matching record exists in transactions with the same id.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09938 | train |
v2 | Schema:
categories (alias: egiv)(value, status, salary, name)
invoices(type, status, code, amount)
Task: Retrieve amount from categories that have at least one corresponding entry in invoices sharing the same level.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09939 | train |
v3 | Schema:
projects (alias: uliv)(type, date, value, id)
transactions(name, code, level, amount)
Task: Retrieve name from projects with salary above the SUM(amount) of transactions rows sharing the same type.
SQL: | SELECT name FROM projects AS uliv
WHERE salary > (
SELECT SUM(amount) FROM transactions AS gev
WHERE gev.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09940 | train |
v2 | Schema:
invoices (alias: fal)(date, amount, salary, type)
categories(amount, salary, code, status)
Task: Retrieve name from invoices that have at least one corresponding entry in categories sharing the same id.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09941 | train |
v2 | Schema:
staff (alias: xnob)(level, id, status, type)
items(value, salary, amount, status)
Task: Retrieve name from staff that have at least one corresponding entry in items sharing the same status.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "items",
"outer_alias": "xnob",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09942 | train |
v1 | Schema:
categories (alias: egiv)(name, date, code, value)
branches(amount, value, id, salary)
Task: Select amount from categories where code exists in branches for the same code.
SQL: | SELECT amount FROM categories AS egiv
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09943 | train |
v2 | Schema:
sales (alias: cif)(amount, id, level, salary)
employees(status, level, type, name)
Task: Retrieve name from sales that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT name FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "employees",
"outer_alias": "cif",
"inner_alias": "bev",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09944 | train |
v1 | Schema:
accounts (alias: jac)(code, id, amount, type)
staff(level, status, id, value)
Task: Find name from accounts where status appears in staff entries with matching level.
SQL: | SELECT name FROM accounts AS jac
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09945 | train |
v1 | Schema:
departments (alias: dov)(status, date, type, salary)
invoices(code, date, status, value)
Task: Find code from departments where id appears in invoices entries with matching level.
SQL: | SELECT code FROM departments AS dov
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09946 | train |
v2 | Schema:
regions (alias: okiv)(level, value, type, status)
departments(date, name, salary, status)
Task: Retrieve code from regions that have at least one corresponding entry in departments sharing the same status.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09947 | train |
v1 | Schema:
managers (alias: hac)(amount, name, status, date)
shipments(date, code, status, type)
Task: Select salary from managers where level exists in shipments for the same type.
SQL: | SELECT salary FROM managers AS hac
WHERE level IN (
SELECT level FROM shipments AS vnob
WHERE vnob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "hac",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09948 | train |
v2 | Schema:
orders (alias: kab)(name, amount, value, date)
invoices(value, date, salary, name)
Task: Retrieve id from orders that have at least one corresponding entry in invoices sharing the same level.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09949 | train |
v2 | Schema:
customers (alias: lex)(code, amount, value, status)
transactions(code, status, level, name)
Task: Retrieve id from customers that have at least one corresponding entry in transactions sharing the same level.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "transactions",
"outer_alias": "lex",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09950 | train |
v1 | Schema:
managers (alias: hac)(id, value, amount, status)
requests(id, level, salary, status)
Task: Select code from managers where code exists in requests for the same type.
SQL: | SELECT code FROM managers AS hac
WHERE code IN (
SELECT code FROM requests AS ejof
WHERE ejof.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "requests",
"outer_alias": "hac",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09951 | train |
v1 | Schema:
departments (alias: dov)(amount, level, code, id)
items(date, code, id, name)
Task: Retrieve value from departments whose type is found in items rows where id matches the outer record.
SQL: | SELECT value FROM departments AS dov
WHERE type IN (
SELECT type FROM items AS ikob
WHERE ikob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09952 | train |
v3 | Schema:
tasks (alias: znob)(amount, salary, name, level)
staff(code, id, status, level)
Task: Find salary from tasks where salary exceeds the total salary from staff for the same level.
SQL: | SELECT salary FROM tasks AS znob
WHERE salary > (
SELECT SUM(salary) FROM staff AS xnob
WHERE xnob.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09953 | train |
v3 | Schema:
transactions (alias: gev)(date, id, type, name)
staff(code, date, name, amount)
Task: Find id from transactions where value exceeds the minimum salary from staff for the same status.
SQL: | SELECT id FROM transactions AS gev
WHERE value > (
SELECT MIN(salary) FROM staff AS xnob
WHERE xnob.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09954 | train |
v3 | Schema:
accounts (alias: jac)(level, id, status, date)
customers(name, salary, status, amount)
Task: Retrieve salary from accounts with value above the COUNT(amount) of customers rows sharing the same code.
SQL: | SELECT salary FROM accounts AS jac
WHERE value > (
SELECT COUNT(amount) FROM customers AS lex
WHERE lex.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09955 | train |
v2 | Schema:
accounts (alias: jac)(type, code, value, status)
transactions(date, status, type, value)
Task: Retrieve salary from accounts that have at least one corresponding entry in transactions sharing the same level.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09956 | train |
v3 | Schema:
projects (alias: uliv)(level, status, value, code)
transactions(amount, value, code, salary)
Task: Retrieve salary from projects with value above the AVG(salary) of transactions rows sharing the same level.
SQL: | SELECT salary FROM projects AS uliv
WHERE value > (
SELECT AVG(salary) FROM transactions AS gev
WHERE gev.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09957 | train |
v3 | Schema:
regions (alias: okiv)(status, amount, name, value)
invoices(date, name, amount, id)
Task: Retrieve value from regions with amount above the SUM(salary) of invoices rows sharing the same id.
SQL: | SELECT value FROM regions AS okiv
WHERE amount > (
SELECT SUM(salary) FROM invoices AS fal
WHERE fal.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "invoices",
"outer_alias": "okiv",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09958 | train |
v2 | Schema:
employees (alias: bev)(code, status, value, type)
customers(salary, date, status, level)
Task: Retrieve name from employees that have at least one corresponding entry in customers sharing the same code.
SQL: | SELECT name FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09959 | train |
v2 | Schema:
sales (alias: cif)(name, salary, id, status)
items(type, value, status, name)
Task: Retrieve name from sales that have at least one corresponding entry in items sharing the same id.
SQL: | SELECT name FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09960 | train |
v3 | Schema:
shipments (alias: vnob)(type, name, amount, level)
products(name, salary, date, type)
Task: Retrieve code from shipments with salary above the COUNT(value) of products rows sharing the same code.
SQL: | SELECT code FROM shipments AS vnob
WHERE salary > (
SELECT COUNT(value) FROM products AS nad
WHERE nad.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "products",
"outer_alias": "vnob",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09961 | train |
v1 | Schema:
transactions (alias: gev)(salary, value, name, id)
projects(value, amount, salary, type)
Task: Select value from transactions where status exists in projects for the same status.
SQL: | SELECT value FROM transactions AS gev
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09962 | train |
v3 | Schema:
regions (alias: okiv)(id, type, name, date)
orders(level, amount, id, value)
Task: Retrieve id from regions with value above the COUNT(amount) of orders rows sharing the same type.
SQL: | SELECT id FROM regions AS okiv
WHERE value > (
SELECT COUNT(amount) FROM orders AS kab
WHERE kab.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09963 | train |
v2 | Schema:
transactions (alias: gev)(level, salary, code, type)
invoices(value, type, salary, status)
Task: Find amount from transactions where a matching record exists in invoices with the same level.
SQL: | SELECT amount FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "gev",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09964 | train |
v3 | Schema:
accounts (alias: jac)(name, amount, level, code)
regions(type, level, salary, id)
Task: Find salary from accounts where salary exceeds the maximum salary from regions for the same level.
SQL: | SELECT salary FROM accounts AS jac
WHERE salary > (
SELECT MAX(salary) FROM regions AS okiv
WHERE okiv.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09965 | train |
v2 | Schema:
sales (alias: cif)(id, salary, level, status)
accounts(salary, status, date, id)
Task: Retrieve id from sales that have at least one corresponding entry in accounts sharing the same id.
SQL: | SELECT id FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "accounts",
"outer_alias": "cif",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09966 | train |
v3 | Schema:
regions (alias: okiv)(salary, amount, id, type)
transactions(name, type, amount, code)
Task: Retrieve name from regions with amount above the SUM(value) of transactions rows sharing the same status.
SQL: | SELECT name FROM regions AS okiv
WHERE amount > (
SELECT SUM(value) FROM transactions AS gev
WHERE gev.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "transactions",
"outer_alias": "okiv",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09967 | train |
v2 | Schema:
shipments (alias: vnob)(name, level, value, code)
regions(status, name, id, salary)
Task: Retrieve code from shipments that have at least one corresponding entry in regions sharing the same level.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09968 | train |
v2 | Schema:
products (alias: nad)(date, status, name, type)
regions(type, code, amount, status)
Task: Find salary from products where a matching record exists in regions with the same id.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = nad.id
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09969 | train |
v2 | Schema:
categories (alias: egiv)(amount, type, status, id)
schedules(level, date, amount, code)
Task: Retrieve code from categories that have at least one corresponding entry in schedules sharing the same level.
SQL: | SELECT code FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09970 | train |
v3 | Schema:
employees (alias: bev)(level, type, amount, salary)
projects(salary, status, amount, id)
Task: Retrieve name from employees with value above the SUM(amount) of projects rows sharing the same id.
SQL: | SELECT name FROM employees AS bev
WHERE value > (
SELECT SUM(amount) FROM projects AS uliv
WHERE uliv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09971 | train |
v2 | Schema:
tasks (alias: znob)(salary, code, type, date)
requests(date, status, code, amount)
Task: Retrieve salary from tasks that have at least one corresponding entry in requests sharing the same code.
SQL: | SELECT salary FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09972 | train |
v2 | Schema:
branches (alias: agov)(id, amount, salary, status)
orders(value, code, name, amount)
Task: Retrieve salary from branches that have at least one corresponding entry in orders sharing the same level.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09973 | train |
v3 | Schema:
employees (alias: bev)(type, name, value, salary)
projects(name, status, value, level)
Task: Find code from employees where amount exceeds the maximum amount from projects for the same type.
SQL: | SELECT code FROM employees AS bev
WHERE amount > (
SELECT MAX(amount) FROM projects AS uliv
WHERE uliv.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09974 | train |
v3 | Schema:
projects (alias: uliv)(status, value, amount, name)
tasks(code, type, status, id)
Task: Retrieve salary from projects with value above the AVG(value) of tasks rows sharing the same level.
SQL: | SELECT salary FROM projects AS uliv
WHERE value > (
SELECT AVG(value) FROM tasks AS znob
WHERE znob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09975 | train |
v1 | Schema:
departments (alias: dov)(type, code, amount, value)
transactions(salary, amount, status, level)
Task: Select code from departments where code exists in transactions for the same id.
SQL: | SELECT code FROM departments AS dov
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09976 | train |
v3 | Schema:
products (alias: nad)(level, status, amount, id)
items(code, id, amount, date)
Task: Retrieve code from products with salary above the SUM(amount) of items rows sharing the same id.
SQL: | SELECT code FROM products AS nad
WHERE salary > (
SELECT SUM(amount) FROM items AS ikob
WHERE ikob.id = nad.id
); | {
"outer_table": "products",
"inner_table": "items",
"outer_alias": "nad",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09977 | train |
v1 | Schema:
schedules (alias: vmob)(name, type, date, status)
branches(date, name, status, amount)
Task: Select id from schedules where id exists in branches for the same status.
SQL: | SELECT id FROM schedules AS vmob
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "vmob",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09978 | train |
v2 | Schema:
staff (alias: xnob)(date, level, status, id)
categories(date, id, level, type)
Task: Retrieve name from staff that have at least one corresponding entry in categories sharing the same level.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09979 | train |
v3 | Schema:
regions (alias: okiv)(code, status, id, type)
departments(amount, value, type, date)
Task: Find code from regions where value exceeds the minimum amount from departments for the same id.
SQL: | SELECT code FROM regions AS okiv
WHERE value > (
SELECT MIN(amount) FROM departments AS dov
WHERE dov.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09980 | train |
v2 | Schema:
managers (alias: hac)(salary, date, amount, id)
tasks(id, code, value, status)
Task: Find salary from managers where a matching record exists in tasks with the same status.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09981 | train |
v1 | Schema:
employees (alias: bev)(status, code, salary, level)
categories(code, value, name, type)
Task: Retrieve value from employees whose id is found in categories rows where status matches the outer record.
SQL: | SELECT value FROM employees AS bev
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09982 | train |
v1 | Schema:
branches (alias: agov)(code, value, name, type)
staff(level, salary, type, value)
Task: Retrieve id from branches whose level is found in staff rows where type matches the outer record.
SQL: | SELECT id FROM branches AS agov
WHERE level IN (
SELECT level FROM staff AS xnob
WHERE xnob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "staff",
"outer_alias": "agov",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09983 | train |
v2 | Schema:
transactions (alias: gev)(amount, type, code, status)
requests(value, level, code, salary)
Task: Retrieve id from transactions that have at least one corresponding entry in requests sharing the same code.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09984 | train |
v2 | Schema:
items (alias: ikob)(value, level, code, type)
requests(level, amount, type, value)
Task: Find value from items where a matching record exists in requests with the same level.
SQL: | SELECT value FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "ikob",
"inner_alias": "ejof",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09985 | train |
v1 | Schema:
customers (alias: lex)(amount, status, level, name)
tasks(value, status, id, name)
Task: Retrieve amount from customers whose status is found in tasks rows where id matches the outer record.
SQL: | SELECT amount FROM customers AS lex
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "tasks",
"outer_alias": "lex",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09986 | train |
v2 | Schema:
tasks (alias: znob)(salary, value, code, id)
branches(date, type, value, level)
Task: Retrieve code from tasks that have at least one corresponding entry in branches sharing the same code.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "branches",
"outer_alias": "znob",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09987 | train |
v2 | Schema:
sales (alias: cif)(type, code, id, status)
orders(id, salary, level, date)
Task: Find amount from sales where a matching record exists in orders with the same id.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "orders",
"outer_alias": "cif",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09988 | train |
v2 | Schema:
employees (alias: bev)(value, type, code, status)
categories(level, name, status, amount)
Task: Find value from employees where a matching record exists in categories with the same type.
SQL: | SELECT value FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09989 | train |
v3 | Schema:
regions (alias: okiv)(level, date, salary, code)
categories(date, level, status, amount)
Task: Retrieve salary from regions with value above the MAX(value) of categories rows sharing the same status.
SQL: | SELECT salary FROM regions AS okiv
WHERE value > (
SELECT MAX(value) FROM categories AS egiv
WHERE egiv.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09990 | train |
v2 | Schema:
managers (alias: hac)(name, salary, date, amount)
invoices(code, status, type, salary)
Task: Retrieve id from managers that have at least one corresponding entry in invoices sharing the same type.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09991 | train |
v3 | Schema:
sales (alias: cif)(status, code, name, amount)
shipments(amount, name, salary, code)
Task: Find salary from sales where amount exceeds the minimum value from shipments for the same status.
SQL: | SELECT salary FROM sales AS cif
WHERE amount > (
SELECT MIN(value) FROM shipments AS vnob
WHERE vnob.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09992 | train |
v2 | Schema:
shipments (alias: vnob)(salary, status, date, type)
categories(level, type, id, code)
Task: Find value from shipments where a matching record exists in categories with the same code.
SQL: | SELECT value FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "categories",
"outer_alias": "vnob",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09993 | train |
v2 | Schema:
schedules (alias: vmob)(value, level, type, id)
items(type, id, status, date)
Task: Retrieve name from schedules that have at least one corresponding entry in items sharing the same id.
SQL: | SELECT name FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "items",
"outer_alias": "vmob",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09994 | train |
v3 | Schema:
accounts (alias: jac)(id, amount, status, date)
requests(type, level, code, salary)
Task: Retrieve id from accounts with amount above the MIN(amount) of requests rows sharing the same code.
SQL: | SELECT id FROM accounts AS jac
WHERE amount > (
SELECT MIN(amount) FROM requests AS ejof
WHERE ejof.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "requests",
"outer_alias": "jac",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09995 | train |
v2 | Schema:
items (alias: ikob)(id, amount, code, name)
branches(salary, status, date, value)
Task: Find code from items where a matching record exists in branches with the same id.
SQL: | SELECT code FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "ikob",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09996 | train |
v3 | Schema:
transactions (alias: gev)(code, date, value, salary)
invoices(id, date, level, code)
Task: Find amount from transactions where salary exceeds the total value from invoices for the same type.
SQL: | SELECT amount FROM transactions AS gev
WHERE salary > (
SELECT SUM(value) FROM invoices AS fal
WHERE fal.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "gev",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09997 | train |
v2 | Schema:
employees (alias: bev)(level, amount, name, id)
staff(code, value, id, status)
Task: Find salary from employees where a matching record exists in staff with the same status.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "staff",
"outer_alias": "bev",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09998 | train |
v2 | Schema:
projects (alias: uliv)(date, code, salary, level)
tasks(value, id, code, level)
Task: Find salary from projects where a matching record exists in tasks with the same type.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09999 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.